]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix authenticated users acl group check 718/head
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 15 Oct 2013 17:20:48 +0000 (10:20 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 15 Oct 2013 17:23:39 +0000 (10:23 -0700)
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 <yehuda@inktank.com>
src/rgw/rgw_acl.cc

index 3f99d72cd5bdb501f983ae73863f6d2afcffe559..025045248479fc45c91111fb2c37f4d6e885e051 100644 (file)
@@ -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);
     }