From c8b9013ed3849859b71aae2d44a5a57fe3ad5858 Mon Sep 17 00:00:00 2001 From: David Sheets Date: Thu, 11 Feb 2016 12:03:46 +0000 Subject: [PATCH] transfused: use an absolute path for fusermount Gets rid of non-portable execvpe for execve and prevents diversion. Explicit diversion will be introduced as a command-line option later. --- alpine/packages/transfused/transfused.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/alpine/packages/transfused/transfused.c b/alpine/packages/transfused/transfused.c index 7e398d69d..30699edaf 100644 --- a/alpine/packages/transfused/transfused.c +++ b/alpine/packages/transfused/transfused.c @@ -19,9 +19,6 @@ int debug = 0; int save_trace; -// execvpe is in unistd.h on Linux. -int execvpe(const char *path, char *const argv[], char *const envp[]); - typedef struct { char * socket9p_root; } parameters; @@ -39,7 +36,7 @@ typedef struct { int to; } copy_thread_state; -char * fusermount = "fusermount"; +char * fusermount = "/bin/fusermount"; void die(int exit_code, const char * perror_arg, const char * fmt, ...) { va_list argp; @@ -237,7 +234,7 @@ int get_fuse_sock(char *const optv[]) { // fork and exec fusermount fusermount_pid = fork(); if (!fusermount_pid) // child - if (execvpe(fusermount, argv, envp)) + if (execve(fusermount, argv, envp)) die(1, "Failed to execute fusermount", ""); // parent