freebsd-skq/sys/i386/ibcs2
brooks f53c1c309d 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
..
coff.h
ibcs2_dirent.h
ibcs2_errno.c
ibcs2_errno.h
ibcs2_fcntl.c
ibcs2_fcntl.h
ibcs2_ioctl.c Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
ibcs2_ioctl.h
ibcs2_ipc.c
ibcs2_ipc.h
ibcs2_isc_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
ibcs2_isc_sysent.c Regen for added flags field. 2009-06-17 19:53:20 +00:00
ibcs2_isc.c
ibcs2_misc.c Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
ibcs2_mount.h
ibcs2_msg.c
ibcs2_other.c
ibcs2_proto.h Regenerate ibcs2 system call table. 2009-05-08 20:08:43 +00:00
ibcs2_signal.c
ibcs2_signal.h
ibcs2_socksys.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
ibcs2_socksys.h
ibcs2_stat.c
ibcs2_stat.h
ibcs2_statfs.h
ibcs2_stropts.h
ibcs2_syscall.h Regenerate ibcs2 system call table. 2009-05-08 20:08:43 +00:00
ibcs2_sysent.c Regenerate generated syscall files following changes to struct sysent in 2009-06-01 16:14:38 +00:00
ibcs2_sysi86.c
ibcs2_sysvec.c
ibcs2_termios.h
ibcs2_time.h
ibcs2_types.h
ibcs2_unistd.h
ibcs2_ustat.h
ibcs2_util.c
ibcs2_util.h
ibcs2_utime.h
ibcs2_utsname.h
ibcs2_xenix_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
ibcs2_xenix_sysent.c Regen for added flags field. 2009-06-17 19:53:20 +00:00
ibcs2_xenix.c
ibcs2_xenix.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
imgact_coff.c
Makefile
syscalls.conf
syscalls.isc
syscalls.isc.conf
syscalls.master Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
syscalls.xenix
syscalls.xenix.conf