opnsense-src/sys/security
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
..
audit kern: adopt the cr_gid macro for cr_groups[0] more widely 2026-01-20 08:27:09 +01:00
mac New setcred() system call and associated MAC hooks 2025-04-03 21:31:03 +02:00
mac_biba MAC: mac_biba, mac_lomac: Fix setting loader tunables 2025-02-13 18:19:56 +08:00
mac_bsdextended MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_ddb mac_ddb: Fix the show rman validator. 2022-08-12 10:20:05 -07:00
mac_do MAC/do: Fix a too stringent debug assertion for a target of 'uid=*' 2025-05-27 23:01:54 +02:00
mac_ifoff MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_ipacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_lomac MAC: mac_biba, mac_lomac: Fix setting loader tunables 2025-02-13 18:19:56 +08:00
mac_mls MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_none sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ntpd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_partition MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_pimd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_portacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_priority MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_seeotheruids MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_stub New setcred() system call and associated MAC hooks 2025-04-03 21:31:03 +02:00
mac_test New setcred() system call and associated MAC hooks 2025-04-03 21:31:03 +02:00
mac_veriexec MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2025-01-16 19:06:55 +01:00
mac_veriexec_parser sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00