diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-06-01 13:13:48 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-15 14:53:18 +0000 |
commit | 399c3a5e4bba2cbdab70af712b3ed75b48f4a761 (patch) | |
tree | 05a4cf585f2178c47fa5ea9458aa835d8bedf3f7 /libpod/runtime.go | |
parent | ed0261176b2bd9ccd9a6cbf77727429429b8fedc (diff) | |
download | podman-399c3a5e4bba2cbdab70af712b3ed75b48f4a761.tar.gz podman-399c3a5e4bba2cbdab70af712b3ed75b48f4a761.tar.bz2 podman-399c3a5e4bba2cbdab70af712b3ed75b48f4a761.zip |
oci: do not set the cgroup path in Rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #871
Approved by: mheon
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index b208bc718..05b8134b8 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -183,7 +183,9 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) { configPath := ConfigPath foundConfig := true - if _, err := os.Stat(OverrideConfigPath); err == nil { + if os.Getuid() != 0 { + foundConfig = false + } else if _, err := os.Stat(OverrideConfigPath); err == nil { // Use the override configuration path configPath = OverrideConfigPath } else if _, err := os.Stat(ConfigPath); err != nil { |