| #
c36a44e1
|
| 09-Oct-2025 |
Olivier Certner <olce@FreeBSD.org> |
initgroups.3: Clarify that ENOMEM is a possible value for 'errno'
The current phrasing could be interpreted as meaning that initgroups(3) could return ENOMEM instead of -1, which it actually did unt
initgroups.3: Clarify that ENOMEM is a possible value for 'errno'
The current phrasing could be interpreted as meaning that initgroups(3) could return ENOMEM instead of -1, which it actually did until I fixed it in commit 0b018cfd81d8 ("initgroups(3): Fix return value on allocation failure").
While here, mention setgroups(2) as a system call rather than a library function.
MFC with: 0b018cfd81d8 ("initgroups(3): Fix return value on allocation failure") Sponsored by: The FreeBSD Foundation
show more ...
|
| #
9dc1ac86
|
| 29-Aug-2025 |
Olivier Certner <olce@FreeBSD.org> |
initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms"), initgroups() does not set the effective GID any
initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff2e ("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: 9da2fe96ff2e ("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
show more ...
|
| #
dc36d6f9
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
| #
b2c76c41
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| #
c36a44e1
|
| 09-Oct-2025 |
Olivier Certner <olce@FreeBSD.org> |
initgroups.3: Clarify that ENOMEM is a possible value for 'errno'
The current phrasing could be interpreted as meaning that initgroups(3) could return ENOMEM instead of -1, which it actually did unt
initgroups.3: Clarify that ENOMEM is a possible value for 'errno'
The current phrasing could be interpreted as meaning that initgroups(3) could return ENOMEM instead of -1, which it actually did until I fixed it in commit 0b018cfd81d8 ("initgroups(3): Fix return value on allocation failure").
While here, mention setgroups(2) as a system call rather than a library function.
MFC with: 0b018cfd81d8 ("initgroups(3): Fix return value on allocation failure") Sponsored by: The FreeBSD Foundation
show more ...
|
| #
9dc1ac86
|
| 29-Aug-2025 |
Olivier Certner <olce@FreeBSD.org> |
initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms"), initgroups() does not set the effective GID any
initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff2e ("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: 9da2fe96ff2e ("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
show more ...
|
| #
dc36d6f9
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
lib: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
| #
b2c76c41
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| #
348238db
|
| 01-Mar-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r314420 through r314481.
|
| #
fbbd9655
|
| 28-Feb-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
| #
8f0ea33f
|
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
5c9ef378
|
| 04-Nov-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r274095.
|
| #
20cc9ac4
|
| 27-Oct-2014 |
Mark Johnston <markj@FreeBSD.org> |
getgrouplist(3) was reimplemented in terms of getgrent_r(3) in r174547, so this bug is no longer valid.
MFC after: 3 days
|
| #
348238db
|
| 01-Mar-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r314420 through r314481.
|
| #
fbbd9655
|
| 28-Feb-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
| #
8f0ea33f
|
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
5c9ef378
|
| 04-Nov-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r274095.
|
| #
20cc9ac4
|
| 27-Oct-2014 |
Mark Johnston <markj@FreeBSD.org> |
getgrouplist(3) was reimplemented in terms of getgrent_r(3) in r174547, so this bug is no longer valid.
MFC after: 3 days
|
| #
10b3b545
|
| 17-Sep-2009 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Merge from head
|
| #
09c817ba
|
| 03-Jul-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC
|
| #
54404cfb
|
| 19-Jun-2009 |
Brooks Davis <brooks@FreeBSD.org> |
In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of siz
In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).
This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group.
In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless.
Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future.
MFC after: 2 weeks
show more ...
|
| #
c879ae35
|
| 09-Jan-2007 |
Warner Losh <imp@FreeBSD.org> |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
| #
5567b258
|
| 22-Jan-2002 |
Mark Murray <markm@FreeBSD.org> |
Use the proper type (gid_t) for (group)->gr_gid to be orthogonal with uid_t usage and (user)->pw_uid.
PR: 3242
|