]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: add UserPerm-based path_walk()
authorGreg Farnum <gfarnum@redhat.com>
Thu, 7 Jul 2016 23:01:17 +0000 (16:01 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 31 Aug 2016 21:33:33 +0000 (14:33 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/client/Client.h

index d8ba521439f1f8e77888da6c36d5dc73228c88a4..8cc6ec912c53ea43b06b17523673a07999bb65ab 100644 (file)
@@ -536,6 +536,11 @@ protected:
   InodeRef cwd;
   int path_walk(const filepath& fp, InodeRef *end, bool followsym=true,
                int uid=-1, int gid=-1);
+  int path_walk(const filepath& fp, InodeRef *end, const UserPerm& perms,
+               bool followsym=true) {
+    return path_walk(fp, end, followsym, perms.uid(), perms.gid());
+  }
+
   int fill_stat(Inode *in, struct stat *st, frag_info_t *dirstat=0, nest_info_t *rstat=0);
   int fill_stat(InodeRef& in, struct stat *st, frag_info_t *dirstat=0, nest_info_t *rstat=0) {
     return fill_stat(in.get(), st, dirstat, rstat);