summaryrefslogtreecommitdiff
path: root/cmd/podman/pause.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-08-29 10:24:50 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-29 16:25:20 +0000
commitd8c2962188a8c6900e609c0dced5a662fcc18272 (patch)
tree7d3fabb74ad7d0b63e5776d5a6475c05d58c81c4 /cmd/podman/pause.go
parent86aefb5de25496ce8894bef73bec6e5d13fd3f47 (diff)
downloadpodman-d8c2962188a8c6900e609c0dced5a662fcc18272.tar.gz
podman-d8c2962188a8c6900e609c0dced5a662fcc18272.tar.bz2
podman-d8c2962188a8c6900e609c0dced5a662fcc18272.zip
rootless: show an error when pause/unpause are used
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1371 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/pause.go')
-rw-r--r--cmd/podman/pause.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/pause.go b/cmd/podman/pause.go
index 12ff747a7..e8a576599 100644
--- a/cmd/podman/pause.go
+++ b/cmd/podman/pause.go
@@ -25,6 +25,10 @@ var (
)
func pauseCmd(c *cli.Context) error {
+ if os.Getuid() != 0 {
+ return errors.New("pause is not supported for rootless containers")
+ }
+
runtime, err := libpodruntime.GetRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")