From 7eb012f3710bb554d5fc2c4229036901b0b5ad90 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Feb 2011 18:49:35 +0000 Subject: [PATCH] daemon: change to root directory Ensure the daemon always starts with current directory == root. --- daemon/guestfsd.c | 2 ++ 1 file changed, 2 insertions(+) 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"); -- 1.8.3.1