From: Jeff Layton Date: Mon, 24 Oct 2016 14:02:58 +0000 (-0400) Subject: client: allow UserPerm constructor to populate gid list X-Git-Tag: v11.1.0~383^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6b65e86fb8b4c655f4e3a6404c91be08b34bfc82;p=ceph.git client: allow UserPerm constructor to populate gid list Add args for the gids_count and gids list, and give them default values so that callers can populate it correctly. We'll need this for ganesha so it can populate the UserPerm from a RPC AUTH object. Note that the gidlist pointer must be valid for the lifetime of the created object! Signed-off-by: Jeff Layton --- diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index 9ce510412077..1895c15c2d49 100644 --- a/src/client/UserPerm.h +++ b/src/client/UserPerm.h @@ -42,8 +42,9 @@ private: public: UserPerm() : m_uid(-1), m_gid(-1), gid_count(0), gids(NULL), alloced_gids(false) {} - UserPerm(int uid, int gid) : m_uid(uid), m_gid(gid), gid_count(0), - gids(NULL), alloced_gids(false) {} + UserPerm(uid_t uid, gid_t gid, int ngids=0, gid_t *gidlist=NULL) : + m_uid(uid), m_gid(gid), gid_count(ngids), + gids(gidlist), alloced_gids(false) {} UserPerm(const UserPerm& o) : UserPerm() { deep_copy_from(o); }