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

Fixed CORE-1726: isc_service_start failed

This commit is contained in:
alexpeshkoff 2008-02-08 16:57:00 +00:00
parent 243162b356
commit 134bc0ed7b
2 changed files with 9 additions and 1 deletions

View File

@ -530,7 +530,7 @@ Service::Service(USHORT service_length, const TEXT* service_name,
svc_resp_buf(0), svc_resp_ptr(0), svc_resp_buf_len(0),
svc_resp_len(0), svc_flags(0), svc_user_flag(0), svc_spb_version(0), svc_do_shutdown(false),
svc_username(getPool()), svc_enc_password(getPool()),
svc_trusted_login(getPool()),
svc_trusted_login(getPool()), svc_trusted_role(false), svc_uses_security_database(false),
svc_switches(getPool()), svc_perm_sw(getPool())
{
memset(svc_status_array, 0, sizeof svc_status_array);
@ -585,6 +585,8 @@ Service::Service(USHORT service_length, const TEXT* service_name,
options.spb_remote_address.isEmpty() ? "" : "/") +
options.spb_remote_address;
svc_uses_security_database = true;
SecurityDatabase::initialize();
SecurityDatabase::verifyUser(name, options.spb_user_name.nullStr(),
options.spb_password.nullStr(),
options.spb_password_enc.nullStr(),
@ -675,6 +677,11 @@ void Service::detach()
}
#endif //SERVER_SHUTDOWN
if (svc_uses_security_database)
{
SecurityDatabase::shutdown();
}
// Mark service as detached.
finish(SVC_detached);
}

View File

@ -218,6 +218,7 @@ private:
Firebird::string svc_enc_password;
Firebird::string svc_trusted_login;
bool svc_trusted_role;
bool svc_uses_security_database;
Firebird::string svc_switches; // Full set of switches
Firebird::string svc_perm_sw; // Switches, taken from services table
// and/or passed using spb_command_line