]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: add pick_my_perms() function for implementers
authorGreg Farnum <gfarnum@redhat.com>
Wed, 29 Jun 2016 00:02:42 +0000 (17:02 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 31 Aug 2016 21:33:32 +0000 (14:33 -0700)
We need to get rid of the internal uid/gid selection and switch to
permission-checking that handles multiple groups -- while also preserving
the client_mount_(uid|gid) config params. So expose a function which
can be called externally that replicates our current uid/gid selection,
but uses our new UserPerm struct.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/client/Client.h

index 7119223d24b85e74fd4559f3e6098ef4a3fc50c9..d3ef2d5c2129416184237100bc25e21129a248e8 100644 (file)
@@ -302,6 +302,10 @@ class Client : public Dispatcher, public md_config_obs_t {
 public:
   void tick();
 
+  UserPerm pick_my_perms() {
+    return UserPerm(get_uid(), get_gid());
+  }
+
 protected:
   MonClient *monclient;
   Messenger *messenger;