From: Yehuda Sadeh Date: Tue, 15 Oct 2013 17:20:48 +0000 (-0700) Subject: rgw: fix authenticated users acl group check X-Git-Tag: v0.61.9~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcf5f117a9111c2d88b8fa5d00c975a8e377df7e;p=ceph.git rgw: fix authenticated users acl group check Fixes: #6553 Backport: bobtail, cuttlefish, dumpling Authenticated users group acl bit was not working correctly. Check to test whether user is anonymous was wrong. Signed-off-by: Yehuda Sadeh (cherry picked from commit bebbd6cb7b71697b34b8f27652cabdc40c97a33b) --- diff --git a/src/rgw/rgw_acl.cc b/src/rgw/rgw_acl.cc index 3f99d72cd5b..02504524847 100644 --- a/src/rgw/rgw_acl.cc +++ b/src/rgw/rgw_acl.cc @@ -79,7 +79,7 @@ int RGWAccessControlPolicy::get_perm(string& id, int perm_mask) { if ((perm & perm_mask) != perm_mask) { perm |= acl.get_group_perm(ACL_GROUP_ALL_USERS, perm_mask); - if (compare_group_name(id, ACL_GROUP_ALL_USERS) != 0) { + if (!compare_group_name(id, ACL_GROUP_ALL_USERS)) { /* this is not the anonymous user */ perm |= acl.get_group_perm(ACL_GROUP_AUTHENTICATED_USERS, perm_mask); }