From ed326206f2b0ed80cdeddc63430bfbe60016c7df Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 19 Mar 2019 10:59:43 +0100 Subject: 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 --- pkg/spec/createconfig.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/spec') 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 } -- cgit v1.2.3-54-g00ecf