From 81b5086a3f35dbae5fec8dd40f58a4646d83b0a8 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 15 Oct 2013 10:20:48 -0700 Subject: 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) --- src/rgw/rgw_acl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_acl.cc b/src/rgw/rgw_acl.cc index 1a906495879..45e98b44c8b 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); } -- cgit v1.2.1