3c48c0897f
Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to somewhere in the neighborhood of INT_MAX/4 one a system with sufficent RAM and memory bandwidth. Given that the Windows group limit is 1024, this range should be sufficient for most applications r202342: Only allocate the space we need before calling kern_getgroups instead of allocating what ever the user asks for up to "ngroups_max + 1". On systems with large values of kern.ngroups this will be more efficient. The now redundant check that the array is large enough in kern_getgroups() is deliberate to allow this change to be merged to stable/8 without breaking potential third party consumers of the API. |
||
---|---|---|
.. | ||
audit_arg.c | ||
audit_bsm_domain.c | ||
audit_bsm_errno.c | ||
audit_bsm_fcntl.c | ||
audit_bsm_klib.c | ||
audit_bsm_socket_type.c | ||
audit_bsm_token.c | ||
audit_bsm.c | ||
audit_ioctl.h | ||
audit_pipe.c | ||
audit_private.h | ||
audit_syscalls.c | ||
audit_trigger.c | ||
audit_worker.c | ||
audit.c | ||
audit.h |