about summary refs log tree commit diff
path: root/src/misc/initgroups.c
Commit message (Collapse)AuthorAgeFilesLines
* initgroups: do not artificially limit number of supplementary groupsRich Felker2024-04-131-4/+22
| | | | | | | | | | | | | | | | | | | | | 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.
* include cleanups: remove unused headers and add feature test macrosSzabolcs Nagy2013-12-121-5/+1
|
* cleanup src/linux and src/misc trees, etc.Rich Felker2012-09-071-0/+15
previously, it was pretty much random which one of these trees a given function appeared in. they have now been organized into: src/linux: non-POSIX linux syscalls (possibly shard with other nixen) src/legacy: various obsolete/legacy functions, mostly wrappers src/misc: still mostly uncategorized; some misc POSIX, some nonstd src/crypt: crypt hash functions further cleanup will be done later.