opnsense-src/sys/netsmb
Kyle Evans e96d270bdb kern: adopt the cr_gid macro for cr_groups[0] more widely
A future change may split cr_gid out of cr_groups[0] so that there's a
cleaner separation between the supplemental groups and the effective
group.  Do the mechanical conversion where we can, and drop some
comments where we need further work because some assumptions about
cr_gid == cr_groups[0] have been made.

This should not be a functional change, but downstreams and other
out-of-tree code are advised to investigate their usage of cr_groups
sooner rather than later, as a future change will render assumptions
about these two being equivalent harmful.

Reviewed by:	asomers, kib, olce
Differential Revision:	https://reviews.freebsd.org/D51153

(cherry picked from commit 46c07316f90628a82dd461376ccff64a81254325)

This was MFCed to ease application of further commits.

NOTE: Downstreams and out-of-tree code targeting stable/14 need not do
the switch, as splitting 'cr_gid' out of cr_groups[], as we did in
stable/15 (and is in 15.0), is not on the agenda for stable/14.

Comments that were added temporarily for stable/15, alluding to the
future split, have been removed.
2026-01-20 08:27:09 +01:00
..
netbios.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_conn.c kern: adopt the cr_gid macro for cr_groups[0] more widely 2026-01-20 08:27:09 +01:00
smb_conn.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_crypt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smb_dev.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smb_dev.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_iod.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smb_rq.c netsmb: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:16 +08:00
smb_rq.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_smb.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smb_subr.c netsmb: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:16 +08:00
smb_subr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_tran.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_trantcp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smb_trantcp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
smb_usr.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00