]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSAuthCap: fix creation ownership check
authorSage Weil <sage@redhat.com>
Mon, 17 Aug 2015 14:08:55 +0000 (10:08 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 13:41:32 +0000 (09:41 -0400)
Check uid too.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/MDSAuthCaps.cc

index 6d36953c4d0e18b647a953ca8fa00e13f58ae8ae..4db0a280c1ec9e9099476bfe323e22ddb50c316f 100644 (file)
@@ -155,8 +155,9 @@ bool MDSAuthCaps::is_capable(const std::string &inode_path,
         return true;
       }
 
+      // we may only create things owned by caller
       if ((mask & MAY_CREATE) &&
-         (inode_gid != gid)) {
+         (inode_gid != gid || inode_uid != uid)) {
        continue;
       }