Signed-off-by: Greg Farnum <gfarnum@redhat.com>
return UserPerm(uid, gid);
}
+ static UserPerm pick_my_perms(CephContext *c) {
+ uid_t uid = c->_conf->client_mount_uid >= 0 ? c->_conf->client_mount_uid : ::geteuid();
+ gid_t gid = c->_conf->client_mount_gid >= 0 ? c->_conf->client_mount_gid : ::getegid();
+ return UserPerm(uid, gid);
+ }
protected:
MonClient *monclient;
Messenger *messenger;
std::string mount_root;
if (root)
mount_root = root;
- UserPerm perms = cmount->get_client()->pick_my_perms();
+ UserPerm perms = Client::pick_my_perms(cmount->get_ceph_context());
return cmount->mount(mount_root, perms);
}