summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-02-03 18:49:35 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-02-03 18:50:17 +0000
commit7eb012f3710bb554d5fc2c4229036901b0b5ad90 (patch)
tree73000c52e673e527e0d6cb8458cf913f8e4a41f8
parent58bcfdf321878c475f283caf07c11b6fa7efc4fb (diff)
downloadlibguestfs-7eb012f3710bb554d5fc2c4229036901b0b5ad90.tar.gz
libguestfs-7eb012f3710bb554d5fc2c4229036901b0b5ad90.tar.xz
libguestfs-7eb012f3710bb554d5fc2c4229036901b0b5ad90.zip
daemon: change to root directory
Ensure the daemon always starts with current directory == root.
-rw-r--r--daemon/guestfsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 8d950fa1..a8b53e73 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -142,6 +142,8 @@ main (int argc, char *argv[])
int dont_fork = 0;
char *cmdline;
+ chdir ("/");
+
if (winsock_init () == -1)
error (EXIT_FAILURE, 0, "winsock initialization failed");