Do not set rlimits if we are rootless

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1437
Approved by: rhatdan
This commit is contained in:
Matthew Heon 2018-09-13 13:31:58 -04:00 committed by Atomic Bot
parent 9126b45a3f
commit 8e65b294c6
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ func main() {
// Only if not rootless, set rlimits for open files. // Only if not rootless, set rlimits for open files.
// We open numerous FDs for ports opened // We open numerous FDs for ports opened
if os.Geteuid() == 0 { if !rootless.IsRootless() {
rlimits := new(syscall.Rlimit) rlimits := new(syscall.Rlimit)
rlimits.Cur = 1048576 rlimits.Cur = 1048576
rlimits.Max = 1048576 rlimits.Max = 1048576