summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-09-13 13:31:58 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-13 17:56:58 +0000
commit8e65b294c60997b9e394a5e3543673dbebf8fe93 (patch)
treeddae5a63bda39371b542c2d6c2ff47dee73a12c7 /cmd/podman/main.go
parent9126b45a3f2255b103ef60f305f8ca9ab2805b50 (diff)
downloadpodman-8e65b294c60997b9e394a5e3543673dbebf8fe93.tar.gz
podman-8e65b294c60997b9e394a5e3543673dbebf8fe93.tar.bz2
podman-8e65b294c60997b9e394a5e3543673dbebf8fe93.zip
Do not set rlimits if we are rootless
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1437 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 48032a20e..a532bc26e 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -140,7 +140,7 @@ func main() {
// Only if not rootless, set rlimits for open files.
// We open numerous FDs for ports opened
- if os.Geteuid() == 0 {
+ if !rootless.IsRootless() {
rlimits := new(syscall.Rlimit)
rlimits.Cur = 1048576
rlimits.Max = 1048576