mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 02:03:03 +01:00
Backported implementation of CORE-5266: Allow statement 'create OR ALTER user sysdba password ...' to initialize empty securityN.fdb
This commit is contained in:
parent
d1210a78e6
commit
685344727f
@ -362,12 +362,13 @@ void UserManagement::execute(USHORT id)
|
||||
|
||||
OldAttributes oldAttributes;
|
||||
int ret = manager->execute(&statusWrapper, &cmd, &oldAttributes);
|
||||
checkSecurityResult(ret, &status, command->userName()->get(), command->operation());
|
||||
if (ret == 0 || status.getErrors()[1] != isc_missing_data_structures)
|
||||
checkSecurityResult(ret, &status, command->userName()->get(), command->operation());
|
||||
else
|
||||
statusWrapper.init();
|
||||
|
||||
if (command->op == Auth::ADDMOD_OPER)
|
||||
{
|
||||
command->op = oldAttributes.present ? Auth::MOD_OPER : Auth::ADD_OPER;
|
||||
}
|
||||
|
||||
if (command->attr.entered())
|
||||
{
|
||||
@ -384,9 +385,8 @@ void UserManagement::execute(USHORT id)
|
||||
while (cur != curEnd)
|
||||
{
|
||||
if (cur->name == prev)
|
||||
{
|
||||
(Arg::Gds(isc_dup_attribute) << cur->name).raise();
|
||||
}
|
||||
|
||||
prev = cur->name;
|
||||
++cur;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user