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

Additional protection against empty configuration file of audit trace session

This commit is contained in:
hvlad 2020-08-07 10:58:02 +03:00
parent c1e95605ae
commit b7eb87807a

View File

@ -215,6 +215,10 @@ void ConfigStorage::checkAudit()
if (m_sharedMemory->getHeader()->change_number != 0)
return;
// Prevent second attempt to create audit session if first one was failed.
// This also prevents multiply logging of the same error.
setDirty();
// put default (audit) trace file contents into storage
AutoPtr<FILE> cfgFile;
@ -254,8 +258,10 @@ void ConfigStorage::checkAudit()
}
p[len] = 0;
}
else {
else
{
gds__log("Audit configuration file \"%s\" is empty", configFileName.c_str());
return;
}
session.ses_user = DBA_USER_NAME;