rootless: enable shortcut only for podman

disable joining automatically the user namespace if the process is not
podman.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2020-01-29 22:06:49 +01:00 committed by Brent Baude
parent f8067d70b0
commit 1d9537e242
1 changed files with 3 additions and 0 deletions

View File

@ -200,6 +200,9 @@ can_use_shortcut ()
if (argv == NULL)
return false;
if (strstr (argv[0], "podman") == NULL)
return false;
for (argc = 0; argv[argc]; argc++)
{
if (argc == 0 || argv[argc][0] == '-')