mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Fixed CORE-6227: isc_info_svc_user_dbpath always returns alias of main security database
This commit is contained in:
parent
96c59e6540
commit
c6523020b1
@ -1365,11 +1365,13 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
|
|||||||
case isc_info_svc_user_dbpath:
|
case isc_info_svc_user_dbpath:
|
||||||
if (svc_user_flag & SVC_user_dba)
|
if (svc_user_flag & SVC_user_dba)
|
||||||
{
|
{
|
||||||
// The path to the user security database (security2.fdb)
|
// The path to the user security database
|
||||||
const RefPtr<const Config> defConf(Config::getDefaultConfig());
|
PathName secDb;
|
||||||
const char* secDb = defConf->getSecurityDatabase();
|
RefPtr<const Config> config;
|
||||||
|
expandDatabaseName(svc_expected_db, secDb, &config);
|
||||||
|
expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr);
|
||||||
|
|
||||||
if (!(info = INF_put_item(item, static_cast<USHORT>(strlen(secDb)), secDb, info, end)))
|
if (!(info = INF_put_item(item, static_cast<USHORT>(secDb.length()), secDb.c_str(), info, end)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1817,11 +1819,13 @@ void Service::query(USHORT send_item_length,
|
|||||||
case isc_info_svc_user_dbpath:
|
case isc_info_svc_user_dbpath:
|
||||||
if (svc_user_flag & SVC_user_dba)
|
if (svc_user_flag & SVC_user_dba)
|
||||||
{
|
{
|
||||||
// The path to the user security database (security2.fdb)
|
// The path to the user security database
|
||||||
const RefPtr<const Config> defConf(Config::getDefaultConfig());
|
PathName secDb;
|
||||||
const char* secDb = defConf->getSecurityDatabase();
|
RefPtr<const Config> config;
|
||||||
|
expandDatabaseName(svc_expected_db, secDb, &config);
|
||||||
|
expandDatabaseName(config->getSecurityDatabase(), secDb, nullptr);
|
||||||
|
|
||||||
if (!(info = INF_put_item(item, static_cast<USHORT>(strlen(secDb)), secDb, info, end)))
|
if (!(info = INF_put_item(item, static_cast<USHORT>(secDb.length()), secDb.c_str(), info, end)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user