8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 02:43:03 +01:00

Correction

This commit is contained in:
brodsom 2003-09-19 03:37:24 +00:00
parent f19805a34a
commit 7944736211

View File

@ -156,12 +156,14 @@ static inline void is_service_running(SVC service)
} }
} }
static inline void need_admin_privs(ISC_STATUS *status, char* message) static inline void need_admin_privs(ISC_STATUS **status, char* message)
{ {
*status++ = isc_insufficient_svc_privileges; ISC_STATUS *stat = *status;
*status++ = isc_arg_string; *stat++ = isc_insufficient_svc_privileges;
*status++ = (ISC_STATUS) ERR_string(message,strlen(message)); *stat++ = isc_arg_string;
*status++ = isc_arg_end; *stat++ = (ISC_STATUS) ERR_string(message,strlen(message));
*stat++ = isc_arg_end;
*status = stat;
} }
/* Option block for service parameter block */ /* Option block for service parameter block */
@ -1008,7 +1010,7 @@ int SVC_output(SLONG output_data, UCHAR * output_buf)
WHY_set_shutdown(FALSE); WHY_set_shutdown(FALSE);
} }
else else
need_admin_privs(status, "isc_info_svc_svr_online"); need_admin_privs(&status, "isc_info_svc_svr_online");
break; break;
case isc_info_svc_svr_offline: case isc_info_svc_svr_offline:
@ -1018,7 +1020,7 @@ int SVC_output(SLONG output_data, UCHAR * output_buf)
WHY_set_shutdown(TRUE); WHY_set_shutdown(TRUE);
} }
else else
need_admin_privs(status, "isc_info_svc_svr_offline"); need_admin_privs(&status, "isc_info_svc_svr_offline");
break; break;
#endif /* SERVER_SHUTDOWN */ #endif /* SERVER_SHUTDOWN */
@ -1079,7 +1081,7 @@ int SVC_output(SLONG output_data, UCHAR * output_buf)
THREAD_EXIT; THREAD_EXIT;
} }
else else
need_admin_privs("isc_info_svc_default_config"); need_admin_privs(&status, "isc_info_svc_default_config");
break; break;
case isc_info_svc_set_config: case isc_info_svc_set_config:
@ -1090,7 +1092,7 @@ int SVC_output(SLONG output_data, UCHAR * output_buf)
THREAD_EXIT; THREAD_EXIT;
} }
else { else {
need_admin_privs("isc_info_svc_set_config"); need_admin_privs(&status, "isc_info_svc_set_config");
} }
break; break;
*/ */
@ -1478,7 +1480,7 @@ void SVC_query(SVC service,
THREAD_EXIT; THREAD_EXIT;
} }
else else
need_admin_privs("isc_info_svc_default_config"); need_admin_privs(&status, "isc_info_svc_default_config");
break; break;
case isc_info_svc_set_config: case isc_info_svc_set_config:
@ -1489,7 +1491,7 @@ void SVC_query(SVC service,
THREAD_EXIT; THREAD_EXIT;
} }
else { else {
need_admin_privs("isc_info_svc_set_config"); need_admin_privs(&status, "isc_info_svc_set_config");
} }
break; break;
*/ */