summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-08-23 23:02:04 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-26 07:22:42 +0000
commit720eb85ba55d8c825262e9b2e058ec8a8e0e4d9f (patch)
tree73ef0abad027bc6bffe97d75b6936b8c7562cca8 /cmd/podman/main.go
parent1ac4dbb50861d502cb819c63335848a60ffa7dec (diff)
downloadpodman-720eb85ba55d8c825262e9b2e058ec8a8e0e4d9f.tar.gz
podman-720eb85ba55d8c825262e9b2e058ec8a8e0e4d9f.tar.bz2
podman-720eb85ba55d8c825262e9b2e058ec8a8e0e4d9f.zip
rootless: fix exec
We cannot re-exec into a new user namespace to gain privileges and access an existing as the new namespace is not the owner of the existing container. "unshare" is used to join the user namespace of the target container. The current implementation assumes that the main process of the container didn't create a new user namespace. Since in the setup phase we are not running with euid=0, we must skip the setup for containers/storage. Closes: https://github.com/containers/libpod/issues/1329 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1331 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 053049266..1734a2c9e 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -25,7 +25,7 @@ var (
exitCode = 125
)
-var cmdsNotRequiringRootless = map[string]bool{"help": true, "version": true}
+var cmdsNotRequiringRootless = map[string]bool{"help": true, "version": true, "exec": true}
func main() {
debug := false