From: David B. <dml...@gm...> - 2006-12-31 18:43:27
|
> Perhaps you could use execlp()? It does what your which() + execl() do > in your code above. > Yeah I figured there was an easier way :) here's another patch - David Brown --- fusermount.c.old 2006-12-09 16:13:53.000000000 -0800 +++ fusermount.c 2006-12-31 10:06:18.000000000 -0800 @@ -116,9 +116,9 @@ } if (res == 0) { setuid(geteuid()); - execl("/bin/mount", "/bin/mount", "-i", "-f", "-t", type, "-o", opts, + execlp("mount", "mount", "-i", "-f", "-t", type, "-o", opts, fsname, mnt, NULL); - perror("execl /bin/mount"); + perror("execlp mount"); exit(1); } res = waitpid(res, &status, 0); |