Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup_rlimits() should be called before giving up root privileges
Some Linux kernels between Linux 4.14 and 4.15 (more specifically between commits 04e35f4495dd560db30c25efca4eecae8ec8c375 and 779f4e1c6c7c661db40dfebd6dd6bda7b5f88aa3) reset the hard limit on stack size to the default 8 MB, overriding a possible higher limit set up by PAM. On such kernels, isolate was unable to set up the default ulimited stack and died. I move setting of the resource limits before giving up root privileges, so even a hard limit will be increased if needed.
- Loading branch information