From 363647b99e6698529712fbe0cd78c810d500bcf3 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 3 Mar 2010 15:57:27 -0800 Subject: [PATCH] osd: OSDCaps have a better check for ownership --- src/osd/OSDCaps.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/osd/OSDCaps.cc b/src/osd/OSDCaps.cc index 0fa9faa08e312..74fe4f3f68d6a 100644 --- a/src/osd/OSDCaps.cc +++ b/src/osd/OSDCaps.cc @@ -175,14 +175,12 @@ int OSDCaps::get_pool_cap(int pool_id, __u64 uid) OSDPoolCap& c = iter->second; cap |= c.allow; cap &= ~c.deny; - } - - //the owner has full access unless they've removed some by setting - //new caps - if (cap == default_action - && uid != CEPH_AUTH_UID_DEFAULT - && uid == auth_uid) + } else if ( uid != CEPH_AUTH_UID_DEFAULT + && uid == auth_uid) { + //the owner has full access unless they've removed some by setting + //new caps cap = OSD_POOL_CAP_ALL; + } return cap; } -- 2.39.5