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

More rigorous test for existing configures sec db

This should fix #7826
This commit is contained in:
Paul Reeves 2023-11-05 12:43:52 +01:00
parent 11604e1a13
commit 7c6f7db340
2 changed files with 20 additions and 8 deletions

View File

@ -615,6 +615,8 @@ program Setup;
// a) Form a module or have common functionality
// b) Debugged.
// This hopefully keeps the main script simpler to follow.
const
UNDEFINED = -1;
Var
InstallRootDir: String;
@ -630,6 +632,7 @@ Var
// databases.conf, fbtrace.conf and the security database.
SYSDBAPassword: String; // SYSDBA password
init_secdb: integer; // Is set to UNDEFINED by default in InitializeSetup
#ifdef setuplogging
// Not yet implemented - leave log in %TEMP%
@ -722,6 +725,7 @@ begin
InitExistingInstallRecords;
AnalyzeEnvironment;
result := AnalysisAssessment;
init_secdb := UNDEFINED;
end;
@ -1035,7 +1039,8 @@ begin
IncrementSharedCount(Is64BitInstallMode, GetAppPath+'\security4.fdb', false);
IncrementSharedCount(Is64BitInstallMode, GetAppPath+'\replication.conf', false);
InitSecurityDB;
if init_secdb = 1 then
InitSecurityDB;
//Fix up conf file
UpdateFirebirdConf;

View File

@ -1200,13 +1200,20 @@ end;
function ConfigureAuthentication: boolean;
begin
if IsNotServerInstall then
Result := false
else
if FileExists(WizardDirValue + '\security4.fdb') then
Result := false
else
Result := true;
// if it is the first time we are called test for existence of the security db
if init_secdb = UNDEFINED then begin
if FileExists(WizardDirValue + '\security4.fdb') then
Result := false
else
Result := true
end
else
// else the result is the current setting of init_secdb
Result := Boolean(init_secdb);
// Whatever the result, cast it to an integer and update init_secdb
init_secdb := Integer(Result);
end;