]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: calculate path in check_access()
authorJashan Kamboj <jashank42@gmail.com>
Mon, 15 Jun 2015 21:20:55 +0000 (02:50 +0530)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 13:39:30 +0000 (09:39 -0400)
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
src/mds/Server.cc

index a7228aafa23f90eefe9d8a6f2ca34fef55fc5834..41a697a4cfaab8ab0acd9e8f946e9d3927cf69f8 100644 (file)
@@ -2116,6 +2116,9 @@ bool Server::check_access(MDRequestRef& mdr, CInode *in, unsigned mask)
   // FIXME: behave with hard links
   string path;
 
+  //path calculation
+  in->make_path_string(path, false, in->get_projected_parent_dn());
+
   // FIXME: it depends on the inode!
   if (s->auth_caps.is_capable(path, in->inode.uid, in->inode.gid, in->inode.mode,
                              uid, mask)) {