freebsd-dev/lib/libc/sys
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
..
__error.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
_exit.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abort2.2 Fix markup, language, function prototype, and example code. 2006-09-30 10:24:00 +00:00
accept.2 Add Xr to getsockname(2) 2008-06-20 14:47:06 +00:00
access.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
acct.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
adjtime.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
aio_cancel.2 style(9) cleanup 2008-04-03 02:41:54 +00:00
aio_error.2 Fix typo 2006-09-26 09:47:46 +00:00
aio_read.2 Sort .Xr by section number. 2005-12-13 13:43:35 +00:00
aio_return.2 Reword previous delta a little bit. 2006-10-07 10:49:20 +00:00
aio_suspend.2 style(9) cleanup 2008-04-03 02:41:54 +00:00
aio_waitcomplete.2
aio_write.2 Sort .Xr by section number. 2005-12-13 13:43:35 +00:00
bind.2 Document EINVAL for bind(2). 2009-06-01 09:32:12 +00:00
brk.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
chdir.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
chflags.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
chmod.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
chown.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
chroot.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
clock_gettime.2 Add missing words. 2008-02-25 13:03:18 +00:00
close.2 Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
closefrom.2 Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
connect.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
cpuset_getaffinity.2 MFp4: 2008-11-29 14:32:14 +00:00
cpuset.2 Support for CPU sets is going to appear in 7.1 before 8.0. 2008-09-29 15:44:48 +00:00
dup.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
execve.2 When calculating arguments to the interpreter for the shebang script 2008-08-26 10:53:32 +00:00
extattr_get_file.2 Update this manual page to describe the extattr_list_file() and the 2008-01-29 18:15:38 +00:00
fcntl.2 Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
fcntl.c Call the fcntl compatiblity wrapper from the thread library fcntl wrappers 2008-05-30 14:47:42 +00:00
fhopen.2 Use 'manual page' instead of 'man page' for consistency. 2005-06-30 13:18:15 +00:00
flock.2 Xref flopen.3 which references this manual page. 2008-01-22 15:56:48 +00:00
fork.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fsync.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ftruncate.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
getdirentries.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getdtablesize.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getfh.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getfsstat.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getgid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getgroups.2 In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
getitimer.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getlogin.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpeername.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpgrp.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpriority.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getrlimit.2 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
getrusage.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getsid.2
getsockname.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getsockopt.2 Bring missing getsockopt(2) options: SO_LABEL SO_PEERLABEL SO_LISTENQLIMIT 2008-06-12 22:58:35 +00:00
gettimeofday.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getuid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
intro.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ioctl.2 Take a sentence into the present by removing a reference to FreeBSD 3.0. 2007-07-14 19:23:29 +00:00
issetugid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
jail.2 Add hierarchical jails. A jail may further virtualize its environment 2009-05-27 14:11:23 +00:00
kenv.2 Use 'manual page' instead of 'man page' for consistency. 2005-06-30 13:18:15 +00:00
kill.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
kldfind.2
kldfirstmod.2
kldload.2
kldnext.2 Markup fixes. 2006-09-17 21:27:35 +00:00
kldstat.2 Add a BUGS section to note that mount/chroot changes since 2007-10-22 21:49:39 +00:00
kldsym.2
kldunload.2 Document that kldunloadf can return EINVAL. 2008-12-25 09:15:31 +00:00
kqueue.2 We've been able to support EVFILT_VNODE filtering on non-UFS 2007-09-07 13:10:09 +00:00
kse.2 New sentence -> new line. While here, fix apostrophe abuse. 2007-02-14 07:38:39 +00:00
ktrace.2 remove whitespace bug (8 spaces into one tab) 2008-08-02 13:49:12 +00:00
link.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
lio_listio.2 Add missing word "returns." 2006-10-07 05:13:32 +00:00
listen.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
lseek.2 Bump date. 2007-04-05 21:17:52 +00:00
lseek.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
madvise.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
Makefile.inc Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
mincore.2 Add support to mincore for detecting whether a page is part of a 2008-03-28 04:29:27 +00:00
minherit.2 Bump manpage date, missed during the last change. 2007-10-30 15:28:43 +00:00
mkdir.2 - Forgot to bump a date after last change 2008-06-30 08:46:09 +00:00
mkfifo.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
mknod.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
mlock.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
mlockall.2 Fixed markup. 2004-07-03 23:14:34 +00:00
mmap.2 Finish what revision 1.40 started. Revision 1.40 removed a false statement 2008-10-24 14:40:13 +00:00
mmap.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
modfind.2
modnext.2 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
modstat.2 Update the definition of modspecific structure 2008-07-15 10:06:37 +00:00
mount.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
mprotect.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
mq_close.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_getattr.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_notify.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_open.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_receive.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_send.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_setattr.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
msync.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
munmap.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nanosleep.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nfssvc.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ntp_adjtime.2 Use better manuals for these ntp system calls. These were replaced by 2007-09-15 14:33:55 +00:00
open.2 Add missing POSIX 1003.1-2008 open(2) flag; O_TTY_INIT. 2009-02-28 10:10:30 +00:00
pathconf.2 Bump date. 2007-04-05 21:17:52 +00:00
pipe.2 Several cleanups related to pipe(2). 2008-11-11 14:55:59 +00:00
poll.2 Sort sections. 2005-01-20 09:17:07 +00:00
posix_openpt.2 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
pread.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
profil.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ptrace.2 Document missing requests. 2009-03-27 11:03:02 +00:00
pwrite.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
quotactl.2 Docment the acceptable values for the id parameter. 2007-02-01 02:31:02 +00:00
read.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
readlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
reboot.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
recv.2 It's silly to claim recv(2) is to be removed in favour of recvfrom(2) 2008-11-30 21:40:01 +00:00
rename.2 Add one more EACCES clause to rename.2. 2008-11-07 15:01:40 +00:00
revoke.2 Add revoke(1). 2009-06-15 21:52:27 +00:00
rfork.2 Document RFTHREAD 2007-05-14 13:58:54 +00:00
rmdir.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rtprio.2 Sort sections. 2005-01-20 09:17:07 +00:00
sched_get_priority_max.2 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
sched_setparam.2 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
sched_setscheduler.2 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
sched_yield.2 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
sctp_generic_recvmsg.2 Sort man page cross references by section, no need for a comma after the 2009-04-13 18:32:26 +00:00
sctp_generic_sendmsg.2 Sort man page cross references by section, no need for a comma after the 2009-04-13 18:32:26 +00:00
sctp_peeloff.2 Sort man page cross references by section, no need for a comma after the 2009-04-13 18:32:26 +00:00
select.2 Add note about other systems. 2007-12-19 03:33:13 +00:00
semctl.2 Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
semget.2 Expand contractions. 2005-02-15 09:27:00 +00:00
semop.2 Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
send.2 Standardize the various prison_foo_ip[46] functions and prison_if to 2009-02-05 14:06:09 +00:00
sendfile.2 Give sendfile(2) a SF_SYNC flag which makes it wait until all mbufs 2008-02-03 15:54:41 +00:00
setfib.2 Correct the information about when the respective functionality first 2009-04-23 08:37:56 +00:00
setgroups.2 In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
setpgid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setregid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setresuid.2
setreuid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setsid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setuid.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
shm_open.2 Add a new file descriptor type for IPC shared memory objects and use it to 2008-01-08 21:58:16 +00:00
shmat.2 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
shmctl.2 Hopefully, improve the grammar and wording in the changes to shmctl(2) 2009-03-05 12:04:42 +00:00
shmget.2 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
shutdown.2 Fix license. Clause 4 is still required (UCB materiel). 2007-03-07 13:38:11 +00:00
sigaction.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigaltstack.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigpending.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigprocmask.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigqueue.2 Markup fixes. 2006-09-17 21:27:35 +00:00
sigreturn.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigstack.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigsuspend.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigwait.2 -mdoc sweep. 2005-11-17 13:00:00 +00:00
sigwaitinfo.2 Sort .Xr by section number. 2005-12-13 13:43:35 +00:00
socket.2 Note that the protocol argument can be set to 0. 2009-01-05 12:18:46 +00:00
socketpair.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
stack_protector.c Expose __stack_chk_fail_local() so -fstack-protector-all works. 2007-06-05 08:24:34 +00:00
stat.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
statfs.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
swapon.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
Symbol.map Retire the unused stub for the nfsclnt() system call. 2009-06-17 18:52:42 +00:00
symlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
sync.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sysarch.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
syscall.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
timer_create.2 - add missing include 2009-01-12 13:12:02 +00:00
timer_delete.2 Fix library names. 2007-06-18 01:50:03 +00:00
timer_settime.2 Fix library names. 2007-06-18 01:50:03 +00:00
truncate.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
truncate.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
umask.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
undelete.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
unlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
utimes.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
utrace.2 Fixed markup. 2004-07-03 23:14:34 +00:00
uuidgen.2 Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
vfork.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
wait.2 Implement WNOWAIT flag for wait4(2). It specifies that process whose status 2008-08-26 12:37:16 +00:00
write.2 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00