summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-08-12 12:33:28 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-08-12 12:33:28 +0200
commit9e2f9c8b7804cec7ed7bcf595272de976f799ef6 (patch)
tree9b346f4828d79ac689102eb82d031bdae734e8be /cmd/podman/shared
parent0ecf0aa1b8083fc71ccea88982fcb3a848c2947f (diff)
downloadpodman-9e2f9c8b7804cec7ed7bcf595272de976f799ef6.tar.gz
podman-9e2f9c8b7804cec7ed7bcf595272de976f799ef6.tar.bz2
podman-9e2f9c8b7804cec7ed7bcf595272de976f799ef6.zip
cmd: drop check for euid==0
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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