]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDCaps: fix allow_all()
authorJosh Durgin <josh.durgin@inktank.com>
Thu, 27 Sep 2012 21:44:57 +0000 (14:44 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Thu, 27 Sep 2012 22:38:18 +0000 (15:38 -0700)
OSD_CAP_ANY is not a mask. Treating it as one made any allowance
equivalent to 'allow *'.

Fixes: #3228
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/osd/OSDCap.h

index 7f2e9f76eb58113be0869b3032b9d1df023d0881..941428c3f18062bf45383fa9577266b6517db022 100644 (file)
@@ -50,7 +50,7 @@ struct OSDCapSpec {
   OSDCapSpec(std::string n, std::string a) : allow(0), class_name(n), class_allow(a) {}
 
   bool allow_all() const {
-    return allow & OSD_CAP_ANY;
+    return allow == OSD_CAP_ANY;
   }
 };