From 1d9537e242798f94d8062819d5763b656dcc5acd Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 29 Jan 2020 22:06:49 +0100 Subject: rootless: enable shortcut only for podman disable joining automatically the user namespace if the process is not podman. Signed-off-by: Giuseppe Scrivano --- pkg/rootless/rootless_linux.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/rootless/rootless_linux.c') diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 041a161dc..83f4f3254 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -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] == '-') -- cgit v1.2.3-54-g00ecf