diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-03 00:47:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 00:47:34 +0200 |
commit | 93560ab6defe4aa3d79a269a0735edf0ea59622a (patch) | |
tree | a0847429bad40539bc155a3fb4c69a8b0c611623 /cmd/podman/pause.go | |
parent | 3fa818a036c4df4987abd2e790d5c9f5259ccfec (diff) | |
parent | a704be59e51d301c3419af53bb57c139766bcae2 (diff) | |
download | podman-93560ab6defe4aa3d79a269a0735edf0ea59622a.tar.gz podman-93560ab6defe4aa3d79a269a0735edf0ea59622a.tar.bz2 podman-93560ab6defe4aa3d79a269a0735edf0ea59622a.zip |
Merge pull request #3477 from ashley-cui/pauserootless
Fix rootless detection error for pause & unpause
Diffstat (limited to 'cmd/podman/pause.go')
-rw-r--r-- | cmd/podman/pause.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/pause.go b/cmd/podman/pause.go index 4bef20867..ee5fd352d 100644 --- a/cmd/podman/pause.go +++ b/cmd/podman/pause.go @@ -1,11 +1,10 @@ package main import ( - "os" - "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/adapter" + "github.com/containers/libpod/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" ) @@ -39,7 +38,7 @@ func init() { } func pauseCmd(c *cliconfig.PauseValues) error { - if os.Geteuid() != 0 { + if rootless.IsRootless() && !remoteclient { return errors.New("pause is not supported for rootless containers") } |