From: Wouter Wijngaards Date: Thu, 24 Apr 2008 13:03:59 +0000 (+0000) Subject: Fixup. X-Git-Tag: release-0.11^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ba9161e754cca87759a546bd6ffc8e4ae0d18fc;p=thirdparty%2Funbound.git Fixup. git-svn-id: file:///svn/unbound/trunk@1070 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/unbound.c b/daemon/unbound.c index 9a328ceec..c3ab9739d 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -323,11 +323,13 @@ do_chroot(struct daemon* daemon, struct config_file* cfg, int debug_mode, strncmp(dir, cfg->chrootdir, strlen(cfg->chrootdir)) == 0) dir += strlen(cfg->chrootdir); - if(chdir(dir)) { - fatal_exit("Could not chdir to %s: %s", - dir, strerror(errno)); + if(dir[0]) { + if(chdir(dir)) { + fatal_exit("Could not chdir to %s: %s", + dir, strerror(errno)); + } + verbose(VERB_QUERY, "chdir to %s", dir); } - verbose(VERB_QUERY, "chdir to %s", dir); } if(cfg->username && cfg->username[0]) { if(setgid(gid) != 0)