daemon: change to root directory
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 3 Feb 2011 18:49:35 +0000 (18:49 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 3 Feb 2011 18:50:17 +0000 (18:50 +0000)
Ensure the daemon always starts with current directory == root.

daemon/guestfsd.c

index 8d950fa..a8b53e7 100644 (file)
@@ -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");