8
0
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:
AlexPeshkoff 2016-08-10 16:58:56 +03:00
parent d1210a78e6
commit 685344727f

View File

@ -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;
}