search for: 1cbf82c

Displaying 1 result from an estimated 1 matches for "1cbf82c".

2012 Dec 13
1
[PATCH] daemon: fix directory outside current root when executing commands
....gitignore +++ b/.gitignore @@ -404,6 +404,7 @@ Makefile.in /tests/c-api/test-last-errno /tests/c-api/test.log /tests/c-api/test-private-data +/tests/c-api/test-pwd /tests/c-api/tests /tests/c-api/tests.c /tests/c-api/test*.tmp diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 7e83a2a..1cbf82c 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -846,6 +846,8 @@ commandrvf (char **stdoutput, char **stderror, int flags, close (so_fd[PIPE_WRITE]); close (se_fd[PIPE_WRITE]); + chdir("/"); + execvp (argv[0], (void *) argv); perror (argv[0]); _exit...