838d985825
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 |
||
---|---|---|
.. | ||
kvm_amd64.c | ||
kvm_arm.c | ||
kvm_cptime.c | ||
kvm_file.c | ||
kvm_getcptime.3 | ||
kvm_geterr.3 | ||
kvm_getfiles.3 | ||
kvm_getloadavg.3 | ||
kvm_getloadavg.c | ||
kvm_getpcpu.3 | ||
kvm_getprocs.3 | ||
kvm_getswapinfo.3 | ||
kvm_getswapinfo.c | ||
kvm_i386.c | ||
kvm_ia64.c | ||
kvm_minidump_amd64.c | ||
kvm_minidump_arm.c | ||
kvm_minidump_i386.c | ||
kvm_mips.c | ||
kvm_nlist.3 | ||
kvm_open.3 | ||
kvm_pcpu.c | ||
kvm_powerpc.c | ||
kvm_private.h | ||
kvm_proc.c | ||
kvm_read.3 | ||
kvm_sparc64.c | ||
kvm_sparc.c | ||
kvm.3 | ||
kvm.c | ||
kvm.h | ||
Makefile |