Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default value for "role" which should handle VOMS attributes where role is missing entirely #1879

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/XrdVoms/XrdVomsMapfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@ XrdVomsMapfile::Apply(XrdSecEntity &entity)

int from_vorg = 0, from_role = 0, from_grps = 0;
XrdOucString vorg = entity.vorg, entry_vorg;
XrdOucString role = entity.role, entry_role;
XrdOucString role = entity.role ? entity.role : "", entry_role = "NULL";
XrdOucString grps = entity.grps, entry_grps;
if (m_edest) m_edest->Log(LogMask::Debug, "VOMSMapfile", "Applying VOMS mapfile to incoming credential");
while (((from_vorg = vorg.tokenize(entry_vorg, from_vorg, ' ')) != -1) &&
((from_role = role.tokenize(entry_role, from_role, ' ')) != -1) &&
((role == "") || (from_role = role.tokenize(entry_role, from_role, ' ')) != -1) &&
((from_grps = grps.tokenize(entry_grps, from_grps, ' ')) != -1))
{
auto fqan = MakePath(entry_grps);
Expand Down