freebsd-skq/lib/libc
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 Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4. 2008-11-09 10:45:13 +00:00
arm Use GCC's __SOFTFP__ to test whether we're being compiled 2009-05-31 02:03:40 +00:00
compat-43 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
db Add some casts to silence compiler warning about signedness. 2009-03-28 07:44:08 +00:00
gdtoa Unbreak the build for arm and powerpc. 2008-04-12 14:53:52 +00:00
gen In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
gmon Remove .mcount from gmon's Symbol map and add it to the appropriate 2007-05-13 14:16:55 +00:00
i386 Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(), 2009-04-01 19:23:46 +00:00
ia64 Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4. 2008-11-09 10:45:13 +00:00
include Revert unnecessary memset after calloc. 2009-05-28 15:02:21 +00:00
inet Merge the resolver part of BIND 9.4.3 into HEAD. 2008-12-14 19:39:53 +00:00
isc Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
locale Change dstp to be const and remove bogus cast. 2009-01-15 20:45:59 +00:00
mips These warnings are only relevant on NetBSD it seems. They don't seem 2009-02-19 19:53:58 +00:00
nameser This commit was generated by cvs2svn to compensate for changes in r174223, 2007-12-03 15:07:58 +00:00
net Document how to enable strict RFC 1034 enforcements. 2009-05-29 07:55:44 +00:00
nls Improve the German translation. 2009-03-25 12:36:37 +00:00
posix1e Fix off by one error in acl_create_entry(3). 2009-05-28 07:20:52 +00:00
powerpc Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4. 2008-11-09 10:45:13 +00:00
quad Fix a typo that prevented the quad symbols from being exported 2007-07-06 13:42:24 +00:00
regex Add two example regexps: (1) one for matching all the characters 2008-09-05 17:41:20 +00:00
resolv Add an option to enforce strict RFC 1034 compliance. 2009-05-29 07:34:54 +00:00
rpc Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
softfloat Reflect license change from NetBSD. 2009-03-10 21:13:26 +00:00
sparc64 Provide a type for the argument. 2009-02-02 21:51:52 +00:00
stdio Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised 2009-04-06 13:50:04 +00:00
stdlib Our grantpt(3) and unlockpt(3) don't comply with POSIX. 2009-05-04 18:14:45 +00:00
stdtime Spacing fixes. No actual change. 2009-06-09 09:02:58 +00:00
string Correct the information about when the respective functionality first 2009-04-23 08:37:56 +00:00
sys In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
uuid Move uuid_enc_le, uuid_dec_le, uuid_enc_be and uuid_dec_be symbols 2008-09-19 15:52:56 +00:00
xdr Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
yp Fix some "in in" typos in comments. 2008-03-26 07:32:08 +00:00
Makefile - Reenable Native Language Support in libc. This feature was disabled due 2009-03-13 10:40:38 +00:00
Versions.def Keep versions on a dependency chain to exclude even remote possiblity 2008-05-07 15:39:34 +00:00