From 67644240b0756ce72224c791d6b65b858bbce49c Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Mon, 14 Dec 2009 12:14:35 +0000 Subject: [PATCH] Ugly fix to avoid detaching security database before attach is really complete. Will not be beeded after moving auth to remote level. --- src/jrd/pwd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jrd/pwd.cpp b/src/jrd/pwd.cpp index 52d734a8f3..763d475abf 100644 --- a/src/jrd/pwd.cpp +++ b/src/jrd/pwd.cpp @@ -329,9 +329,11 @@ void SecurityDatabase::prepare() // Attach as SYSDBA dpb.insertString(isc_dpb_trusted_auth, SYSDBA_USER_NAME, strlen(SYSDBA_USER_NAME)); - isc_attach_database(status, 0, user_info_name, &lookup_db, + isc_db_handle tempHandle; + isc_attach_database(status, 0, user_info_name, &tempHandle, dpb.getBufferLength(), reinterpret_cast(dpb.getBuffer())); checkStatus("isc_attach_database", isc_psw_attach); + lookup_db = tempHandle; isc_compile_request(status, &lookup_db, &lookup_req, sizeof(PWD_REQUEST), reinterpret_cast(PWD_REQUEST));