freebsd-dev/usr.sbin/lpr
Brooks Davis 54404cfb13 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
2009-06-19 15:58:24 +00:00
..
chkprintcap
common_source NI_WITHSCOPEID cleanup 2005-05-13 16:43:28 +00:00
filters Rever the previous changes. It turns out that it perfectly correct 2006-03-09 19:52:44 +00:00
filters.ru Rever the previous changes. It turns out that it perfectly correct 2006-03-09 19:52:44 +00:00
lp Add -m and -t options. 2009-06-14 06:47:21 +00:00
lpc In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
lpd use bigger local variable to calculate free space 2008-09-01 12:32:40 +00:00
lpq Sort sections. 2005-01-18 20:02:45 +00:00
lpr Sort sections. 2005-01-18 20:02:45 +00:00
lprm Sort sections. 2005-01-18 20:02:45 +00:00
lptest
pac Sort sections. 2005-01-18 20:02:45 +00:00
SMM.doc For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
Makefile
Makefile.inc Obey MK_INET6_SUPPORT. 2006-07-27 14:52:12 +00:00