mds: calculate path in check_access()

Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
This commit is contained in:
Jashan Kamboj 2015-06-16 02:50:55 +05:30 committed by Sage Weil
parent e24a9cbffd
commit 51f1028ac4

View 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)) {