Skip to content

Commit

Permalink
Postfix for CORE-5269
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPeshkoff committed Aug 3, 2016
1 parent 9d8b20a commit 8bc941c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/jrd/Mapping.cpp
Expand Up @@ -1124,16 +1124,16 @@ class SysPrivCache : public PermanentStorage
return true;
}

string zRole;
zRole += ROLESEP;
zRole += role;
zRole += ROLESEP;

string* r = get(name);
if (!r)
return false;

granted = r->find(zRole);
string zRole;
zRole += ROLESEP;
zRole += role;
zRole += ROLESEP;
MAP_DEBUG(fprintf(stderr, "isRoleGranted '%s' '%s'\n", r->c_str(), role.c_str()));
granted = r->find(zRole) != string::npos;
return true;
}

Expand Down Expand Up @@ -1164,8 +1164,10 @@ class SysPrivCache : public PermanentStorage
z += ROLESEP;
while(curs->fetchNext(&st, buffer) == IStatus::RESULT_OK)
{
MAP_DEBUG(fprintf(stderr, "populate 2 %s\n", (const char*) role));
z += role;
string r = (const char*) role;
r.trim();
MAP_DEBUG(fprintf(stderr, "populate 2 %s\n", r.c_str()));
z += r;
z += ROLESEP;
}

Expand Down

0 comments on commit 8bc941c

Please sign in to comment.