musl/src
Rich Felker 3f49203c55 initgroups: do not artificially limit number of supplementary groups
historically linux limited the number of supplementary groups a
process could be in to 32, but this limit was raised to 65536 in linux
2.6.4. proposals to support the new limit, change NGROUPS_MAX, or make
it dynamic have been stalled due to the impact it would have on
initgroups where the groups array exists in automatic storage.

the changes here decouple initgroups from the value of NGROUPS_MAX and
allow it to fall back to allocating a buffer in the case where
getgrouplist indicates the user has more supplementary groups than
could be reported in the buffer. getgrouplist already involves
allocation, so this does not pull in any new link dependency.
likewise, getgrouplist is already using the public malloc (vs internal
libc one), so initgroups does the same. if this turns out not to be
the best choice, both can be changed together later.

the initial buffer size is left at 32, but now as the literal value,
so that any potential future change to NGROUPS_MAX will not affect
initgroups.
2024-04-13 23:05:46 -04:00
..
aio fix AS-safety of close when aio is in use and fd map is expanded 2022-10-19 14:01:32 -04:00
complex complex: fix comment in cacosh 2024-03-14 10:06:15 -04:00
conf use kernel-provided AT_MINSIGSTKSZ for sysconf(_SC_[MIN]SIGSTKSZ) 2022-08-26 11:34:46 -04:00
crypt update crypt_blowfish to support $2b$ prefix 2020-10-18 12:16:55 -04:00
ctype fix wcwidth of hangul combining (vowel/final) letters 2021-12-27 20:08:31 -05:00
dirent remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
env protect stack canary from leak via read-as-string by zeroing second byte 2022-03-08 16:52:25 -05:00
errno add missing strerror text for key management 2022-02-19 19:42:21 -05:00
exit lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
fcntl remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
fenv riscv32: add fenv and math 2024-02-29 16:36:55 -05:00
include provide an internal namespace-safe __fstat 2022-05-04 10:51:00 -04:00
internal add missing inline keyword on default a_barrier definition 2024-03-02 12:34:05 -05:00
ipc semtimedop: fix timespec kernel ABI mismatch for 32-bit timeouts on x32 2023-04-11 09:21:41 -04:00
ldso riscv32: add dlsym 2024-02-29 16:36:55 -05:00
legacy remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
linux riscv: fall back to syscall __riscv_flush_icache 2024-02-25 20:35:24 -05:00
locale iconv: fix missing bounds checking for shift_jis decoding 2024-03-02 22:17:49 -05:00
malloc disable MADV_FREE usage in mallocng 2022-10-19 14:01:31 -04:00
math math: fix fma(x,y,0) when x*y rounds to -0 2024-03-14 10:04:42 -04:00
misc initgroups: do not artificially limit number of supplementary groups 2024-04-13 23:05:46 -04:00
mman remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
mq mq_notify: block all (application) signals in the worker thread 2023-02-12 15:05:39 -05:00
multibyte mbrtowc: Fix wrong return value when n > UINT_MAX 2023-05-26 16:12:29 -04:00
network getnameinfo: fix calling __dns_parse with potentially too large rlen 2024-02-29 10:14:16 -05:00
passwd nscd: fall back gracefully on kernels without AF_UNIX support 2021-04-16 10:17:42 -04:00
prng lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
process posix_spawn: fix child spinning on write to a broken pipe 2024-02-29 10:07:03 -05:00
regex glob: fix wrong return code when aborting before any matches 2023-08-24 12:54:51 -04:00
sched sched_rr_get_interval: don't assume time_t is 32-bit on 32-bit archs 2019-07-29 12:31:20 -04:00
search hsearch: fix null pointer arithmetic UB 2023-02-12 17:41:23 -05:00
select expose ppoll in default feature profile 2024-01-21 17:22:50 -05:00
setjmp riscv32: add setjmp/longjmp and sigreturn 2024-02-29 16:36:55 -05:00
signal riscv32: add setjmp/longjmp and sigreturn 2024-02-29 16:36:55 -05:00
stat use new SYS_fchmodat2 syscall to implement fchmodat with flags 2024-02-22 19:27:23 -05:00
stdio printf: fix edge case where hex float precision was not honored 2024-04-12 19:57:59 -04:00
stdlib fix constraint violation in qsort wrapper around qsort_r 2022-05-06 19:34:48 -04:00
string fix return value of wmemcmp for extreme wchar_t values 2023-04-24 11:23:39 -04:00
temp remove LFS64 symbol aliases; replace with dynamic linker remapping 2022-10-19 14:01:31 -04:00
termios add tcgetwinsize and tcsetwinsize functions, move struct winsize 2020-08-24 21:31:18 -04:00
thread riscv32: add thread support 2024-02-29 16:36:55 -05:00
time strftime: fix breakage in last change (uninitialized pointer access) 2024-02-16 09:33:03 -05:00
unistd fix pwrite/pwritev handling of O_APPEND files 2024-03-14 10:04:28 -04:00