]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: have init_gids just set alloced_gids to true
authorJeff Layton <jlayton@redhat.com>
Mon, 2 Apr 2018 10:41:19 +0000 (06:41 -0400)
committerJeff Layton <jlayton@redhat.com>
Mon, 2 Apr 2018 17:14:35 +0000 (13:14 -0400)
We always call take_gids after init_gids, so just squash them together.

Reported-by: Jos Collin <jcollin@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/UserPerm.h
src/client/fuse_ll.cc

index a2d6ccbe888d759ce966ba79bc41a695042f02b0..d8a41957eb0dc807dc5513df01337b079574693c 100644 (file)
@@ -79,8 +79,8 @@ public:
   void init_gids(gid_t* _gids, int count) {
     gids = _gids;
     gid_count = count;
+    alloced_gids = true;
   }
-  void take_gids() { alloced_gids = true; }
   void shallow_copy(const UserPerm& o) {
     m_uid = o.m_uid;
     m_gid = o.m_gid;
index 49f769cf029db5628f1e7a77984b7ad30854dbaf..115c26bcdaad8d336d848cda72e67b0fd2f23bb8 100644 (file)
@@ -144,7 +144,6 @@ static void get_fuse_groups(UserPerm& perms, fuse_req_t req)
 
     if (count > 0) {
       perms.init_gids(gids, count);
-      perms.take_gids();
     } else if (count < 0) {
       derr << __func__ << ": getgroups failed: " << cpp_strerror(-count)
           << dendl;