|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
b2c76c41 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
| #
4cfb30ed |
| 24-Jan-2018 |
Kirk McKusick <[email protected]> |
Update .Dd missed in -r328304.
Reported by: Bjoern Zeeb (bz) MFC with: 328304
|
| #
8557409f |
| 23-Jan-2018 |
Kirk McKusick <[email protected]> |
In the C library, the setting up of the group array by various utilities is done by calling gr_addgid() for each group to be added (usually found by traversing /etc/group) then calling the setgroups(
In the C library, the setting up of the group array by various utilities is done by calling gr_addgid() for each group to be added (usually found by traversing /etc/group) then calling the setgroups() system call after the group set has been created. The gr_addgid() function (helpfully?) deduplicates the addition of group members. So, if you call it to add a group member that already exists, it is just dropped. Because group[0] is the effective group-ID and is over-written when a setgid program is run, The value in group[0] is usually duplicated so that group value is not lost when a setgid program is run.
Historically this happened because the group value indicated in the password file also appears in /etc/group (e.g., if you are group staff in the password file, you will also appear in the staff line in /etc/group). But, with the addition of the deduplication, the attempt to add group staff was lost because it already appeared in group[0]. So, the fix is to deduplicate starting from group[1] which allows a duplicate of the entry in group[0], but not in later entries.
There is some confusion about the setgroups system call because in BSD it has (always) set the entire group including the egid group (in group[0]). However, in Linux, it skips over group[0] and starts setting from group[1]. See this comment from linux_setgroups:
/* * cr_groups[0] holds egid. Setting the whole set from * the supplied set will cause egid to be changed too. * Keep cr_groups[0] unchanged to prevent that. */
To make it clear what the BSD setgroups system call does, I added the following paragraph to the setgroups(2) manual page:
The first entry of the group array (gidset[0]) is used as the effective group-ID for the process. This entry is over-written when a setgid program is run. To avoid losing access to the privileges of the gidset[0] entry, it should be duplicated later in the group array. By convention, this happens because the group value indicated in the password file also appears in /etc/group. The group value in the password file is placed in gidset[0] and that value then gets added a second time when the /etc/group file is scanned to create the group set.
Reported by: Paul McMath paulm at tetrardus.net Reviewed by: kib MFC after: 2 weeks
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
fbbd9655 |
| 28-Feb-2017 |
Warner Losh <[email protected]> |
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 <[email protected]> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0 |
|
| #
54404cfb |
| 19-Jun-2009 |
Brooks Davis <[email protected]> |
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 ...
|
|
Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
| #
0cf1d3bf |
| 16-Jun-2008 |
Tony Finch <[email protected]> |
Make it clearer that privilege is needed to reduce as well as increase group membership.
|
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
| #
c879ae35 |
| 09-Jan-2007 |
Warner Losh <[email protected]> |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0 |
|
| #
988d4dc3 |
| 19-Nov-2003 |
Diomidis Spinellis <[email protected]> |
Documented missing EINVAL errno value kern_prot.c: if (ngrp > NGROUPS) return (EINVAL);
MFC after: 2 weeks
|
|
Revision tags: release/4.9.0_cvs, release/4.9.0 |
|
| #
743d5d51 |
| 10-Sep-2003 |
Ruslan Ermilov <[email protected]> |
mdoc(7): Properly mark C headers.
|
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0 |
|
| #
2efeeba5 |
| 19-Dec-2002 |
Ruslan Ermilov <[email protected]> |
mdoc(7) police: "The .Fa argument.".
|
| #
2faeeff4 |
| 18-Dec-2002 |
Ruslan Ermilov <[email protected]> |
mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".
Use "The .Fn system call" a-la "The .Nm utility".
When referring to a non-BSD implementation in the HISTOR
mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".
Use "The .Fn system call" a-la "The .Nm utility".
When referring to a non-BSD implementation in the HISTORY section, call syscall a function, to be safe.
show more ...
|
|
Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs |
|
| #
32eef9ae |
| 01-Oct-2001 |
Ruslan Ermilov <[email protected]> |
mdoc(7) police: Use the new .In macro for #include statements.
|
| #
b1250632 |
| 09-Aug-2001 |
Yaroslav Tykhiy <[email protected]> |
Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by: ru
|
| #
7ebcc426 |
| 15-Jul-2001 |
Dima Dorfman <[email protected]> |
Remove whitespace at EOL.
|
| #
a307d598 |
| 10-Jul-2001 |
Ruslan Ermilov <[email protected]> |
mdoc(7) police: removed HISTORY info from the .Os call.
|
|
Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs |
|
| #
25bb73e0 |
| 21-Apr-2000 |
Alexey Zelkin <[email protected]> |
Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
|
|
Revision tags: release/4.0.0_cvs, release/3.4.0_cvs, release/3.3.0_cvs |
|
| #
7f3dea24 |
| 28-Aug-1999 |
Peter Wemm <[email protected]> |
$Id$ -> $FreeBSD$
|
| #
fbc400a6 |
| 12-Jul-1999 |
Nik Clayton <[email protected]> |
Add $Id$, to make it simpler for members of the translation teams to track.
The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage
Add $Id$, to make it simpler for members of the translation teams to track.
The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so;
.\" $Id$ .\"
If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted.
Approved by: bde
show more ...
|
|
Revision tags: release/3.2.0, release/3.1.0, release/3.0.0, release/2.2.8, release/2.2.7, release/2.2.6, release/2.2.5_cvs, release/2.2.2_cvs, release/2.2.1_cvs, release/2.2.0, release/2.1.7_cvs, release/2.1.6_cvs, release/2.1.6.1, release/2.1.5_cvs |
|
| #
7bdf80e5 |
| 22-Aug-1996 |
Mike Pritchard <[email protected]> |
Correctly use .Fn instead of .Nm to reference function names in a bunch of man pages.
Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros instead of explicitly specifying the version in the te
Correctly use .Fn instead of .Nm to reference function names in a bunch of man pages.
Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros instead of explicitly specifying the version in the text in a bunch of man pages.
show more ...
|
|
Revision tags: release/2.1.0_cvs, release/2.0.5_cvs, release/2.0, release/1.1.5.1_cvs |
|
| #
58f0484f |
| 27-May-1994 |
Rodney W. Grimes <[email protected]> |
BSD 4.4 Lite Lib Sources
|