From 134bc0ed7bee513a19369764899833506fad2cbe Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 8 Feb 2008 16:57:00 +0000 Subject: [PATCH] Fixed CORE-1726: isc_service_start failed --- src/jrd/svc.cpp | 9 ++++++++- src/jrd/svc.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index 6671f2bed7..3e19aa32f9 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -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); } diff --git a/src/jrd/svc.h b/src/jrd/svc.h index c71edb2264..2f6181f8af 100644 --- a/src/jrd/svc.h +++ b/src/jrd/svc.h @@ -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