Re: [HEADSUP] ucred / group changes in FreeBSD 15.0
Date: Fri, 08 Aug 2025 13:44:49 UTC
On 8/8/25 03:36, Dag-Erling Smørgrav wrote: > Kyle Evans <kevans@FreeBSD.org> writes: >> The major struct ucred change[0] here is that we now track the egid >> outside of the cr_groups array. We've had a cr_gid macro to alias >> cr_groups[0] for over 30 years, but the macro has now been replaced by >> actual members in struct ucred and struct xucred. In the xucred case, >> we use some union trickery to alias it to the first element of >> cr_groups to avoid breaking the ABI. > > Why not just: > > gid_t cr_gid; /* effective group id */ > gid_t cr_groups[XU_NGROUPS - 1]; > > which would be fully ABI compatible? > kib might have a more well-reasoned opinion here, but my perhaps slightly-paranoid view was that we should consider cr_groups sizing to be a property of the ABI since it's a cross-platform interface. I didn't look into ports here to decide if anybody does silly things, since it's easy to preserve for 15.0.