From 84cfdb20617ac7a5a1138375599e28cdad26b824 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 10 Jul 2018 17:26:06 +0200 Subject: rootless: fix when argv[0] is not an absolute path use execvp instead of exec so that we keep the PATH environment variable and the lookup for the "podman" executable works. Closes: https://github.com/projectatomic/libpod/issues/1070 Signed-off-by: Giuseppe Scrivano Closes: #1072 Approved by: mheon --- pkg/rootless/rootless_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/rootless') diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 0f2008375..f2684f75f 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -112,7 +112,7 @@ reexec_in_user_namespace(int ready) setresuid (0, 0, 0) < 0) _exit (1); - execv (argv[0], argv); + execvp (argv[0], argv); _exit (1); } -- cgit v1.2.3-54-g00ecf