nspawn: bump RLIMIT_NOFILE for nspawn payload similar to how host PID 1 does it for...
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Oct 2021 15:34:46 +0000 (17:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Oct 2021 21:42:55 +0000 (23:42 +0200)
commitdbf1aca619af7bb7e15f0961e281e77c4cecd555
tree3db1c9e30eae3c67517d2225410a52ecee4d3588
parenta07ab1dd8cd6dc4bcb8a112a58ae5ec9643ad110
nspawn: bump RLIMIT_NOFILE for nspawn payload similar to how host PID 1 does it for its payload

We try to pass containers roughly the same rlimits as the host gets from
the kernel. However, this means we'd set the RLIMIT_NOFILE to 4K. Which
is quite limiting though, and is something we actually departed from in
PID1: since 52d620757817bc0fa7de3ddbe43024544ced7ea0 we raise the limit
substantially for all userspace.

Given that nspawn is quite often invoked without proper PID1, let's raise the
limits for container payloads the same way as we do from the real PID1
to its service payloads.
src/nspawn/nspawn.c