diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index f31d051e0e..e1861ad296 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -1365,11 +1365,13 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/, case isc_info_svc_user_dbpath: if (svc_user_flag & SVC_user_dba) { - // The path to the user security database (security2.fdb) - const RefPtr defConf(Config::getDefaultConfig()); - const char* secDb = defConf->getSecurityDatabase(); + // The path to the user security database + PathName secDb; + RefPtr config; + expandDatabaseName(svc_expected_db, secDb, &config); + expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr); - if (!(info = INF_put_item(item, static_cast(strlen(secDb)), secDb, info, end))) + if (!(info = INF_put_item(item, static_cast(secDb.length()), secDb.c_str(), info, end))) { return 0; } @@ -1817,11 +1819,13 @@ void Service::query(USHORT send_item_length, case isc_info_svc_user_dbpath: if (svc_user_flag & SVC_user_dba) { - // The path to the user security database (security2.fdb) - const RefPtr defConf(Config::getDefaultConfig()); - const char* secDb = defConf->getSecurityDatabase(); + // The path to the user security database + PathName secDb; + RefPtr config; + expandDatabaseName(svc_expected_db, secDb, &config); + expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr); - if (!(info = INF_put_item(item, static_cast(strlen(secDb)), secDb, info, end))) + if (!(info = INF_put_item(item, static_cast(secDb.length()), secDb.c_str(), info, end))) { return; }