mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-11 20:37:43 +02:00
Fixup.
git-svn-id: file:///svn/unbound/trunk@1070 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+6
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user