git: 7007c34bf1 - main - releases/15.0R/relnotes: 'cr_gid' split out of cr_groups[0]

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Fri, 28 Nov 2025 21:29:17 UTC
The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/doc/commit/?id=7007c34bf120feb80e460ce928bb697da98b0505

commit 7007c34bf120feb80e460ce928bb697da98b0505
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-11-28 21:27:39 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-11-28 21:28:41 +0000

    releases/15.0R/relnotes: 'cr_gid' split out of cr_groups[0]
    
    In particular, mention what has to be checked.
    
    Sponsored by:   The FreeBSD Foundation
---
 website/content/en/releases/15.0R/relnotes.adoc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/website/content/en/releases/15.0R/relnotes.adoc b/website/content/en/releases/15.0R/relnotes.adoc
index 01370dc18a..ef8e511f35 100644
--- a/website/content/en/releases/15.0R/relnotes.adoc
+++ b/website/content/en/releases/15.0R/relnotes.adoc
@@ -770,6 +770,12 @@ The SOCK_SEQPACKET socket has been brought to the specification and now behaves
 a datagram socket.  Applications that were using SOCK_SEQPACKET incorrectly and relied on old implementation bugs may need to be adjusted.
 gitref:d15792780760[repository=src]
 
+The effective group ID is now stored in the new `cr_gid` field of `struct cred` and has been removed as the first element of `cr_groups[]`, which now only contains the supplementary groups.
+All downstream and out-of-tree modules using `cr_groups[0]` must be fixed to use `cr_gid` instead, and surrounding code that loops on `cr_groups[]` elements excluding `cr_groups[0]`, i.e., that intends to act on supplementary groups only, also needs to be adjusted as now supplementary groups start at `&cr_groups[0]` instead of `&cr_groups[1]`.
+Code that needs to be portable to both 15.0 and earlier versions can use `cr_gid`, which existed also previously as a macro, and can test the truth value of `&cr_groups[0] != &cr_gid` to know how to browse the supplementary groups adequately.
+gitref:be1f7435ef218b1df35[repository=src]
+(Sponsored by the FreeBSD Foundation.)
+
 [[drivers]]
 == Devices and Drivers