| 910 | } |
| 911 | |
| 912 | ISC_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 | |
| 957 | ISC_STATUS API_ROUTINE isc_modify_user(ISC_STATUS* status, const USER_SEC_DATA* input_user_data) |
| 958 | { |
nothing calls this directly
no test coverage detected