Skip to content

Commit

Permalink
Also grant Readdir when token grants read permission.
Browse files Browse the repository at this point in the history
Before this change, directory listing is impossible with a read claim,
leading to the confusing situation that trying to access files in a directory
may return 404 but listing the directory returns permission denied.
  • Loading branch information
olifre committed Mar 16, 2022
1 parent c6aa536 commit b48a245
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/XrdSciTokens/XrdSciTokensAccess.cc
Expand Up @@ -701,6 +701,7 @@ class XrdAccSciTokens : public XrdAccAuthorize, public XrdSciTokensHelper
MakeCanonical(base_path + acl_path, path);
if (!strcmp(acl_authz, "read")) {
xrd_rules.emplace_back(AOP_Read, path);
xrd_rules.emplace_back(AOP_Readdir, path);
xrd_rules.emplace_back(AOP_Stat, path);
} else if (!strcmp(acl_authz, "write")) {
xrd_rules.emplace_back(AOP_Update, path);
Expand Down

0 comments on commit b48a245

Please sign in to comment.