]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
privsep: Only set RLIMIT_NOFILES for supported platforms
authorRoy Marples <roy@marples.name>
Fri, 12 Nov 2021 14:24:11 +0000 (14:24 +0000)
committerRoy Marples <roy@marples.name>
Fri, 12 Nov 2021 14:24:11 +0000 (14:24 +0000)
commit43de9416e6a8484a911f4936198b121fba364c13
treedaaeff079be53b8c7dd0ba9663101812dafeb1c6
parent4fa97ba4ae259837e35256928c9d56a5507610ce
privsep: Only set RLIMIT_NOFILES for supported platforms

Basically only for NetBSD, DragonFlyBSD, kqueue or epoll platforms.
All others will use poll(2) and return EINVAL if nfds > RLIMIT_NOFILES.

Trying to work out our nfs limit relies on already listening to
all FD's which may not be the case and was problematic.
Luckily all platforms aside from Solaris have new file creation
sandboxed away aside from accept(2) so this should still be safe.
src/privsep.c