]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDCap: rbd profile permits use of "rbd_info" 36414/head
authorFlorian Florensa <fflorensa@online.net>
Mon, 22 Jun 2020 10:53:40 +0000 (12:53 +0200)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sun, 2 Aug 2020 15:30:09 +0000 (18:30 +0300)
User restricted to a namespace needs to be able to read rbd_info in
default namespace in order to create volumes.

Fixes: https://tracker.ceph.com/issues/46139
Signed-off-by: Florian Florensa <fflorensa@online.net>
(cherry picked from commit 1e9fceabc457dd46a622710c6ec81cfe30a2656e)

src/osd/OSDCap.cc

index dfc7eae9ec37816a6ac7434c7c459c503f31c371..d5339a059367081504be031afd0b0a3b3ece567f 100644 (file)
@@ -332,6 +332,8 @@ void OSDCapGrant::expand_profile()
 
   if (profile.name == "rbd") {
     // RBD read-write grant
+    profile_grants.emplace_back(OSDCapMatch(string(), "rbd_info"),
+                                OSDCapSpec(osd_rwxa_t(OSD_CAP_R)));
     profile_grants.emplace_back(OSDCapMatch(string(), "rbd_children"),
                                 OSDCapSpec(osd_rwxa_t(OSD_CAP_CLS_R)));
     profile_grants.emplace_back(OSDCapMatch(string(), "rbd_mirroring"),