Files
src/lib
Olivier Certner 9dc1ac8691 initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to
match other platforms"), initgroups() does not set the effective GID
anymore and uses all passed groups as the supplementary group list.
This effectively breaks backwards compatibility with programs/libraries
compiled on a FreeBSD 14 or earlier system.

Restore compatibility by creating a new version of the 'initgroups'
symbol that designates the current implementation and providing
a pre-FreeBSD-15-compatible version under the symbol's previously
exported version.  The new version calls the new setgroups(2) system
call, while the compatible one calls the original one (called
freebsd14_setgroups()).

Update the manual page with some history and comparison with other
current open-source systems.  Add a "SECURITY CONSIDERATIONS" section
highlighting some security properties of this approach and the reasons
we adopt it.  While here, revamp the manual page, in particular to use
the exact POSIX terminology where possible.

Note for MFC to stable/14: Only the manual page update is to be MFCed,
and the text changed to reflect the old behavior and inform readers of
the new upcoming behavior in 15.

Reviewed by:    kib
Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52282
2025-09-17 14:16:06 +02:00
..
2025-05-31 14:27:30 +02:00
2025-09-04 16:06:47 -07:00
2025-04-28 10:01:30 -06:00
2024-10-14 10:26:17 -07:00
2025-08-08 18:08:21 +02:00
2024-10-14 10:26:17 -07:00
2025-01-01 15:11:06 -06:00
2024-05-20 16:27:50 +02:00
2025-04-30 15:05:00 +02:00
2024-10-14 10:26:17 -07:00
2024-10-14 10:26:17 -07:00
2025-05-04 00:06:22 -07:00
2024-10-14 10:26:17 -07:00
2025-02-25 11:35:26 -04:00
2025-08-08 13:27:26 -05:00
2024-10-08 16:13:39 -03:00
2024-10-14 10:26:17 -07:00
2025-07-17 16:36:17 -07:00
2024-10-14 10:26:17 -07:00
2025-08-06 12:31:24 +01:00
2024-11-12 12:11:51 -05:00
2025-09-07 22:05:17 +02:00
2024-10-14 10:26:17 -07:00
2024-10-14 10:26:17 -07:00
2025-08-20 19:42:20 +01:00