MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / callRemoteServiceManager

Function callRemoteServiceManager

src/common/call_service.cpp:369–539  ·  view source on GitHub ↗

callRemoteServiceManager @brief Calls service manager to execute command, specified in userInfo @param status @param handle @param userInfo @param outputFunction @param functionArg **/

Source from the content-addressed store, hash-verified

367
368 **/
369void callRemoteServiceManager(ISC_STATUS* status,
370 isc_svc_handle handle,
371 Auth::UserData& userData,
372 Firebird::IListUsers* callback)
373{
374 char spb_buffer[1024];
375 char* spb = spb_buffer;
376 const int op = userData.op;
377 if (op != Auth::DIS_OPER &&
378 op != Auth::OLD_DIS_OPER &&
379 op != Auth::MAP_SET_OPER &&
380 op != Auth::MAP_DROP_OPER &&
381 !userData.user.entered())
382 {
383 status[0] = isc_arg_gds;
384 status[1] = isc_gsec_switches_error;
385 status[2] = isc_arg_end;
386 return;
387 }
388
389 switch (op)
390 {
391 case Auth::ADD_OPER:
392 stuffSpbByte(spb, isc_action_svc_add_user);
393 userInfoToSpb(spb, userData);
394 break;
395
396 case Auth::MOD_OPER:
397 stuffSpbByte(spb, isc_action_svc_modify_user);
398 userInfoToSpb(spb, userData);
399 break;
400
401 case Auth::DEL_OPER:
402 stuffSpbByte(spb, isc_action_svc_delete_user);
403 stuffSpb2(spb, isc_spb_sec_username, userData.user.get());
404 if (userData.role.entered())
405 {
406 stuffSpb2(spb, isc_spb_sql_role_name, userData.role.get());
407 }
408 break;
409
410 case Auth::DIS_OPER:
411 case Auth::OLD_DIS_OPER:
412 {
413 char usersDisplayTag = 0;
414 checkServerUsersVersion(handle, usersDisplayTag);
415 stuffSpbByte(spb, usersDisplayTag);
416 }
417 if (userData.user.entered())
418 {
419 stuffSpb2(spb, isc_spb_sec_username, userData.user.get());
420 }
421 if (userData.role.entered())
422 {
423 stuffSpb2(spb, isc_spb_sql_role_name, userData.role.get());
424 }
425 break;
426

Callers 2

gsecFunction · 0.85
executeSecurityCommandFunction · 0.85

Calls 15

stuffSpbByteFunction · 0.85
userInfoToSpbFunction · 0.85
stuffSpb2Function · 0.85
checkServerUsersVersionFunction · 0.85
stuffSpbShortFunction · 0.85
stuffSpbLongFunction · 0.85
init_statusFunction · 0.85
typeBufferFunction · 0.85
setAttrFunction · 0.70
checkFunction · 0.70
enteredMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected