MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE isc_delete_user

Function API_ROUTINE isc_delete_user

src/yvalve/alt.cpp:912–955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912ISC_STATUS API_ROUTINE isc_delete_user(ISC_STATUS* status, const USER_SEC_DATA* input_user_data)
913{
914/**************************************
915 *
916 * i s c _ d e l e t e _ u s e r
917 *
918 **************************************
919 *
920 * Functional description
921 * Deletes a user from the server's security
922 * database.
923 * Return 0 if the user was deleted
924 *
925 * Return > 0 if any error occurs.
926 *
927 **************************************/
928 Auth::UserData userInfo;
929 userInfo.op = Auth::DEL_OPER;
930 Firebird::LocalStatus s;
931 Firebird::CheckStatusWrapper statusWrapper(&s);
932
933 if (input_user_data->user_name)
934 {
935 Firebird::string work = input_user_data->user_name;
936 if (work.length() > USERNAME_LENGTH) {
937 return user_error(status, isc_usrname_too_long);
938 }
939
940 Firebird::string::size_type l = work.find(' ');
941 if (l != Firebird::string::npos) {
942 work.resize(l);
943 }
944
945 userInfo.user.set(&statusWrapper, work.c_str());
946 Firebird::check(&statusWrapper);
947 userInfo.user.setEntered(&statusWrapper, 1);
948 Firebird::check(&statusWrapper);
949 }
950 else {
951 return user_error(status, isc_usrname_required);
952 }
953
954 return executeSecurityCommand(status, input_user_data, userInfo);
955}
956
957ISC_STATUS API_ROUTINE isc_modify_user(ISC_STATUS* status, const USER_SEC_DATA* input_user_data)
958{

Callers

nothing calls this directly

Calls 9

user_errorFunction · 0.85
executeSecurityCommandFunction · 0.85
checkFunction · 0.50
lengthMethod · 0.45
findMethod · 0.45
resizeMethod · 0.45
setMethod · 0.45
c_strMethod · 0.45
setEnteredMethod · 0.45

Tested by

no test coverage detected