summaryrefslogtreecommitdiff
path: root/pkg/rootless
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-06-20 14:32:12 +0200
committerSascha Grunert <sgrunert@suse.com>2019-06-20 15:07:01 +0200
commit6e318a01a0a73d4c3c749ea03353bfc1be935d01 (patch)
tree4705365b6a6d19be0aa69c3ca122fdd5568028ca /pkg/rootless
parentb4f9bc868e2f5b3ffc5b7487be9d7b717dd6ae5b (diff)
downloadpodman-6e318a01a0a73d4c3c749ea03353bfc1be935d01.tar.gz
podman-6e318a01a0a73d4c3c749ea03353bfc1be935d01.tar.bz2
podman-6e318a01a0a73d4c3c749ea03353bfc1be935d01.zip
Fix execvp uage in rootless_linux.c
The second argument of `execlp` should be of type `char *`, so we need to add an additional argument there. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'pkg/rootless')
-rw-r--r--pkg/rootless/rootless_linux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index eb62d55e9..7be786ded 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -471,7 +471,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
close (fd);
setenv ("_PODMAN_PAUSE", "1", 1);
- execlp (argv[0], NULL);
+ execlp (argv[0], argv[0], NULL);
/* If the execve fails, then do the pause here. */
do_pause ();
@@ -693,7 +693,6 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
pid = syscall_clone (CLONE_NEWUSER|CLONE_NEWNS|SIGCHLD, NULL);
if (pid < 0)
{
- FILE *fp;
fprintf (stderr, "cannot clone: %s\n", strerror (errno));
check_proc_sys_userns_file (_max_user_namespaces);
check_proc_sys_userns_file (_unprivileged_user_namespaces);