summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-12 16:53:46 +0200
committerGitHub <noreply@github.com>2019-08-12 16:53:46 +0200
commitec93c9d8753c1cf346fe7fee3035af1a0dcf9b55 (patch)
tree37a407bad913399b31b543db9caa7dbb5e13a232 /cmd/podman/shared
parentf18cfa47686a30166cfe6f743dbda0e13575e4f2 (diff)
parent9e2f9c8b7804cec7ed7bcf595272de976f799ef6 (diff)
downloadpodman-ec93c9d8753c1cf346fe7fee3035af1a0dcf9b55.tar.gz
podman-ec93c9d8753c1cf346fe7fee3035af1a0dcf9b55.tar.bz2
podman-ec93c9d8753c1cf346fe7fee3035af1a0dcf9b55.zip
Merge pull request #3786 from giuseppe/fix-rootless-checks
rootless: drop some superflous checks
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/create.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 84cba4b75..e29e6b28e 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -55,7 +55,7 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.
rootfs = c.InputArgs[0]
}
- if c.IsSet("cidfile") && os.Geteuid() == 0 {
+ if c.IsSet("cidfile") {
cidFile, err = util.OpenExclusiveFile(c.String("cidfile"))
if err != nil && os.IsExist(err) {
return nil, nil, errors.Errorf("container id file exists. Ensure another container is not using it or delete %s", c.String("cidfile"))
@@ -70,8 +70,8 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.
imageName := ""
var data *inspect.ImageData = nil
- // Set the storage if we are running as euid == 0 and there is no rootfs specified
- if rootfs == "" && os.Geteuid() == 0 {
+ // Set the storage if there is no rootfs specified
+ if rootfs == "" {
var writer io.Writer
if !c.Bool("quiet") {
writer = os.Stderr