opnsense-src/sys
Brooks Davis 838d985825 Rework the credential code to support larger values of NGROUPS and
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
and 1023 respectively.  (Previously they were equal, but under a close
reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
is the number of supplemental groups, not total number of groups.)

The bulk of the change consists of converting the struct ucred member
cr_groups from a static array to a pointer.  Do the equivalent in
kinfo_proc.

Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
a process credential before modifying it and for setting group lists
respectively.  Both interfaces take care for the details of allocating
groups array. crsetgroups() takes care of truncating the group list
to the current maximum (NGROUPS) if necessary.  In the future,
crsetgroups() may be responsible for insuring invariants such as sorting
the supplemental groups to allow groupmember() to be implemented as a
binary search.

Because we can not change struct xucred without breaking application
ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
always 16 and is to be used or NGRPS as appropriate for things such as
NFS which need to use no more than 16 groups.  When feasible, truncate
the group list rather than generating an error.

Minor changes:
  - Reduce the number of hand rolled versions of groupmember().
  - Do not assign to both cr_gid and cr_groups[0].
  - Modify ipfw to cache ucreds instead of part of their contents since
    they are immutable once referenced by more than one entity.

Submitted by:	Isilon Systems (initial implementation)
X-MFC after:	never
PR:		bin/113398 kern/133867
2009-06-19 17:10:35 +00:00
..
amd64 I have several machines where the following warning is printed: 2009-06-15 21:55:29 +00:00
arm Track the kernel mapping of a physical page by a new entry in vm_page 2009-06-18 20:42:37 +00:00
boot Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor 2009-06-15 18:22:41 +00:00
bsm Merge OpenBSM 1.1 from OpenBSM vendor branch to head. 2009-04-19 16:17:13 +00:00
cam Include <camlib.h> for cam_path_string(). 2009-06-14 12:46:34 +00:00
cddl Rename the host-related prison fields to be the same as the host.* 2009-06-13 15:39:12 +00:00
compat Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
conf Introduce support for adaptive spinning in lockmgr. 2009-06-17 01:55:42 +00:00
contrib All consumers of in_cksum.h have been properly #ifdefed already, 2009-06-10 11:19:34 +00:00
crypto Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(), 2009-05-27 09:52:12 +00:00
ddb Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
dev Replace use of ic->ic_flags with vap->iv_flags to operate on per-vap flags 2009-06-18 11:12:10 +00:00
fs Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
gdb
geom Fix tabs, slightly improve comments. 2009-06-18 11:12:11 +00:00
gnu Do not use casts (int *)0 and (struct thread *)0 for the arguments of 2009-06-16 15:13:45 +00:00
i386 Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
ia64 Import ACPICA 20090521. 2009-06-05 18:44:36 +00:00
isa Rename statclock_disable variable to atrtcclock_disable that it actually is, 2009-05-03 17:47:21 +00:00
kern Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
kgssapi When the KOBJMETHOD() macro was updated, it resulted in the 2009-06-14 17:33:46 +00:00
libkern add explanatory header license 2009-06-09 21:29:16 +00:00
mips Add a .cvsignore file and along with that put an svn:ignore proprty 2009-06-17 10:48:32 +00:00
modules adds opt_inet6.h to fix a error during compiling wlan as a module. 2009-06-17 04:23:37 +00:00
net Add explicit includes for jail.h to the files that need them and 2009-06-17 15:01:01 +00:00
net80211 ieee80211_dwds_mcast(): check the correct mbuf ptr after encap. 2009-06-18 21:15:41 +00:00
netatalk Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
netgraph s/usb2_/usb_|usbd_/ on all function names for the USB stack. 2009-06-15 01:02:43 +00:00
netinet Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
netinet6 Add explicit includes for jail.h to the files that need them and 2009-06-17 15:01:01 +00:00
netipsec Add the explicit include of vimage.h to another five .c files still 2009-06-17 12:44:11 +00:00
netipx Put the variable declarations for TCPDEBUG under #ifdef INET as well. 2009-06-10 09:28:50 +00:00
netnatm Reimplement the netisr framework in order to support parallel netisr 2009-06-01 10:41:38 +00:00
netncp Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netsmb Rework socket upcalls to close some races with setup/teardown of upcalls. 2009-06-01 21:17:03 +00:00
nfs Add cpu_flush_dcache() for use after non-DMA based I/O so that a 2009-05-18 18:37:18 +00:00
nfsclient Fix some of the style errors in *getpages(). 2009-06-18 05:56:24 +00:00
nfsserver Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
nlm Since svc_[dg|vc|tli|tp]_create() did not hold a reference count on the 2009-06-17 22:50:26 +00:00
opencrypto Fix cryptodev UIO creation. 2009-05-23 13:23:46 +00:00
pc98 Remove MAC kernel config files and add "options MAC" to GENERIC, with the 2009-06-02 18:31:08 +00:00
pci When user_frac in the polling subsystem is low it is going to busy the 2009-05-30 15:14:44 +00:00
powerpc Teach cpu_est_clockrate() about the G5's slightly different PMC. This 2009-06-17 16:34:40 +00:00
rpc Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
security Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use 2009-06-10 20:59:32 +00:00
sparc64 Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor 2009-06-15 18:22:41 +00:00
sun4v Adjust the padding of struct pcpu to r193219. 2009-06-03 19:31:26 +00:00
sys Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
tools - Add a way to change filter oversampling factor through 2009-06-15 04:31:34 +00:00
ufs Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
vm Track the kernel mapping of a physical page by a new entry in vm_page 2009-06-18 20:42:37 +00:00
xdr MFdevbranch 192944 2009-05-28 08:18:12 +00:00
xen Make ipi_cpu() function as intended. 2009-05-30 08:53:13 +00:00
Makefile Remove the unmaintained University of Michigan NFSv4 client from 8.x 2009-05-22 12:35:12 +00:00