]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix authenticated users acl group check
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 15 Oct 2013 17:20:48 +0000 (10:20 -0700)
committerSage Weil <sage@inktank.com>
Tue, 15 Oct 2013 22:05:17 +0000 (15:05 -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>
(cherry picked from commit bebbd6cb7b71697b34b8f27652cabdc40c97a33b)

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);
     }