From: Richard W.M. Jones Date: Thu, 3 Feb 2011 18:49:35 +0000 (+0000) Subject: daemon: change to root directory X-Git-Tag: 1.9.8~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=7eb012f3710bb554d5fc2c4229036901b0b5ad90;p=libguestfs.git daemon: change to root directory Ensure the daemon always starts with current directory == root. --- diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 8d950fa..a8b53e7 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");