aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/rtw89
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2025-11-14 18:22:53 +0000
committerOlivier Certner <olce@FreeBSD.org>2025-11-24 20:31:06 +0000
commit4cd93df95e697942adf0ff038fc8f357cbb07cf9 (patch)
treec88faa13741272bde63257b492e7a467fe6621a9 /sys/modules/rtw89
parentb92b1b47583036bd02e656564ff22c92b8949077 (diff)
setcred(): Remove an optimization for when cr_groups[0] was the egidHEADmain
Because setcred() has (always) treated the effective GID separately from the supplementary groups, when cr_groups[0] was storing the effective GID, it internally needed to build an array containing both the effective GID and the specified supplementary groups to eventually call crsetgroups_internal(). As kern_setcred() was only used to actually implement user_setcred()/sys_setcred(), which need to allocate a buffer to copy in the userland groups array into, some optimization was put in place where these would allocate an array with one more element than 'wc_supp_groups', copyin() the latter into the subarray starting at index 1 and pass the pointer to the whole array to kern_setcred() in 'preallocated_groups'. This would allow kern_setcred() not to have to allocate memory again to make room for the additional effective GID. Since commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]"), crsetgroups_internal() only takes supplementary groups, so this machinery has become obsolete. It was not removed as part of that commit, but just minimally amended to simplify the changes and lower the risks. Finally remove it. Reviewed by: kevans MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53772
Diffstat (limited to 'sys/modules/rtw89')
0 files changed, 0 insertions, 0 deletions