diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-07-10 17:26:06 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-10 16:13:43 +0000 |
commit | 84cfdb20617ac7a5a1138375599e28cdad26b824 (patch) | |
tree | 49bb2f7408a213dae1da464622a405700c84dca8 /pkg/rootless/rootless_linux.c | |
parent | 4f9b1ae62553efb2f88ec143ed0782585e7d8d51 (diff) | |
download | podman-84cfdb20617ac7a5a1138375599e28cdad26b824.tar.gz podman-84cfdb20617ac7a5a1138375599e28cdad26b824.tar.bz2 podman-84cfdb20617ac7a5a1138375599e28cdad26b824.zip |
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 <gscrivan@redhat.com>
Closes: #1072
Approved by: mheon
Diffstat (limited to 'pkg/rootless/rootless_linux.c')
-rw-r--r-- | pkg/rootless/rootless_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |