rootless: be in an userns to initialize the runtime

be sure to be in an userns for a rootless process before initializing
the runtime.  In case we are not running as uid==0, take advantage of
"podman info" that creates the runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1372
Approved by: mheon
This commit is contained in:
Giuseppe Scrivano
2018-08-30 18:26:41 +02:00
committed by Atomic Bot
parent daa28349c8
commit 14c0f9d63c
2 changed files with 27 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ var cmdsNotRequiringRootless = map[string]bool{
"help": true,
"version": true,
"exec": true,
// `info` must be executed in an user namespace.
// If this change, please also update libpod.refreshRootless()
"login": true,
"logout": true,
"kill": true,