diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-03-19 10:59:43 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-04-01 13:24:04 +0200 |
commit | ed326206f2b0ed80cdeddc63430bfbe60016c7df (patch) | |
tree | 84d3430711744e68f1217d71ed8316337c366ef2 /pkg/spec/createconfig.go | |
parent | cd35e20772a324e5dd247496705bef57b9da752d (diff) | |
download | podman-ed326206f2b0ed80cdeddc63430bfbe60016c7df.tar.gz podman-ed326206f2b0ed80cdeddc63430bfbe60016c7df.tar.bz2 podman-ed326206f2b0ed80cdeddc63430bfbe60016c7df.zip |
rootless: remove SkipStorageSetup()
in the few places where we care about skipping the storage
initialization, we can simply use the process effective UID, instead
of relying on a global boolean flag.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r-- | pkg/spec/createconfig.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go index 0a12e3dca..a433fc16d 100644 --- a/pkg/spec/createconfig.go +++ b/pkg/spec/createconfig.go @@ -12,7 +12,6 @@ import ( "github.com/containers/image/manifest" "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/namespaces" - "github.com/containers/libpod/pkg/rootless" "github.com/containers/storage" "github.com/containers/storage/pkg/stringid" "github.com/cri-o/ocicni/pkg/ocicni" @@ -271,7 +270,7 @@ func (c *CreateConfig) GetVolumeMounts(specMounts []spec.Mount) ([]spec.Mount, e func (c *CreateConfig) GetVolumesFrom() error { var options string - if rootless.SkipStorageSetup() { + if os.Geteuid() != 0 { return nil } |