Skip to content

Commit

Permalink
If a gridmap file has been configured, XrdHttp now prefers the alread…
Browse files Browse the repository at this point in the history
…y mapped username to the non-mapped one that's coming from a security extractor plugin
  • Loading branch information
Fabrizio Furano committed Jan 28, 2020
1 parent de56388 commit fe9d23f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -374,7 +374,22 @@ int XrdHttpProtocol::GetVOMSData(XrdLink *lp) {
// installed. If we have no sec extractor then do nothing, just plain https
// will work.
if (secxtractor) {
// We assume that if the sysadmin has assigned a gridmap file then he
// is interested in the mapped name, not the original one that would be
// overwritten inside the plugin
char *savestr = 0;
if (servGMap && SecEntity.name)
savestr = strdup(SecEntity.name);

int r = secxtractor->GetSecData(lp, SecEntity, ssl);

if (servGMap && savestr) {
if (SecEntity.name)
free(SecEntity.name);
SecEntity.name = savestr;
}


if (r)
TRACEI(ALL, " Certificate data extraction failed: " << SecEntity.moninfo << " Failed. err: " << r);
return r;
Expand Down

0 comments on commit fe9d23f

Please sign in to comment.