Skip to content

Commit

Permalink
Fixed CORE-4652: Legacy user manager ignores explicitly set SQL role
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPeshkoff committed Dec 26, 2014
1 parent 05c1c94 commit ed4b5ac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/auth/SecurityDatabase/LegacyManagement.epp
Expand Up @@ -138,15 +138,15 @@ void SecurityDatabaseManagement::start(Firebird::IStatus* st, Firebird::ILogonIn
dpb.insertBytes(isc_dpb_auth_block, authBlock, authBlockSize);
else
{
const char* str = logonInfo->name();
if (str && str[0])
dpb.insertString(isc_dpb_trusted_auth, str, fb_strlen(str));

str = logonInfo->role();
if (str && str[0])
dpb.insertString(isc_dpb_sql_role_name, str, fb_strlen(str));
const char* logon = logonInfo->name();
if (logon && logon[0])
dpb.insertString(isc_dpb_trusted_auth, logon, fb_strlen(logon));
}

const char* role = logonInfo->role();
if (role && role[0])
dpb.insertString(isc_dpb_sql_role_name, role, fb_strlen(role));

ISC_STATUS_ARRAY status;
if (isc_attach_database(status, 0, secDbName, &database,
dpb.getBufferLength(), reinterpret_cast<const char*>(dpb.getBuffer())))
Expand Down

0 comments on commit ed4b5ac

Please sign in to comment.