summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-06-01 13:25:19 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-15 14:53:18 +0000
commit4086a0f7371dbe5ea104dafe83aadb77b969c0ba (patch)
tree8a83cc87f34b065a855aefc5748ee45960980b11 /libpod/container_internal.go
parenta1ec6747f187ff2dbc1256cb5c11c5775324f2e2 (diff)
downloadpodman-4086a0f7371dbe5ea104dafe83aadb77b969c0ba.tar.gz
podman-4086a0f7371dbe5ea104dafe83aadb77b969c0ba.tar.bz2
podman-4086a0f7371dbe5ea104dafe83aadb77b969c0ba.zip
podman: use a different store for the rootless case
so that the user has rw access to it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #871 Approved by: mheon
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 30dbf52e6..bd0074e56 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1296,7 +1296,9 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
g.AddProcessEnv("container", "libpod")
}
- if c.runtime.config.CgroupManager == SystemdCgroupsManager {
+ if os.Getuid() != 0 {
+ g.SetLinuxCgroupsPath("")
+ } else if c.runtime.config.CgroupManager == SystemdCgroupsManager {
// When runc is set to use Systemd as a cgroup manager, it
// expects cgroups to be passed as follows:
// slice:prefix:name