diff options
author | Rob Norris <[email protected]> | 2024-08-16 16:54:44 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-09-18 11:23:50 -0700 |
commit | 9b6f93a72f79217a02ab83319a4d6d8500f943f4 (patch) | |
tree | b08368bc3d3a0e1520d05225680f2682026153cc /module | |
parent | 6a17061213c173db79edf7280c948f7c1d7bec44 (diff) |
config: remove HAVE_GROUP_INFO_GID
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16479
Diffstat (limited to 'module')
-rw-r--r-- | module/os/linux/spl/spl-cred.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/module/os/linux/spl/spl-cred.c b/module/os/linux/spl/spl-cred.c index d407fc66b..7254df6bf 100644 --- a/module/os/linux/spl/spl-cred.c +++ b/module/os/linux/spl/spl-cred.c @@ -74,26 +74,13 @@ crgetngroups(const cred_t *cr) gi = cr->group_info; rc = gi->ngroups; -#ifndef HAVE_GROUP_INFO_GID - /* - * For Linux <= 4.8, - * crgetgroups will only returns gi->blocks[0], which contains only - * the first NGROUPS_PER_BLOCK groups. - */ - if (rc > NGROUPS_PER_BLOCK) { - WARN_ON_ONCE(1); - rc = NGROUPS_PER_BLOCK; - } -#endif + return (rc); } /* * Return an array of supplemental gids. The returned address is safe * to use as long as the caller has taken a reference with crhold(). - * - * Linux 4.9 API change, group_info changed from 2d array via ->blocks to 1d - * array via ->gid. */ gid_t * crgetgroups(const cred_t *cr) @@ -102,12 +89,8 @@ crgetgroups(const cred_t *cr) gid_t *gids = NULL; gi = cr->group_info; -#ifdef HAVE_GROUP_INFO_GID gids = KGIDP_TO_SGIDP(gi->gid); -#else - if (gi->nblocks > 0) - gids = KGIDP_TO_SGIDP(gi->blocks[0]); -#endif + return (gids); } |