search for: 7e83a2a

Displaying 2 results from an estimated 2 matches for "7e83a2a".

Did you mean: 7b835a2a
2012 Dec 13
1
[PATCH] daemon: fix directory outside current root when executing commands
...44 --- a/.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]);...
2012 Dec 13
2
[PATCH 1/2] daemon: NFC Use symbolic names in commandrvf
Improve readability of commandrvf() by replacing bare int values for file descriptors with their symbolic names STD{IN,OUT,ERR}_FILENO. Also add PIPE_READ and PIPE_WRITE for referencing relevant ends of a pipe. --- daemon/guestfsd.c | 79 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c