- Fixup 724 fix for fname_after_chroot() calls.

git-svn-id: file:///svn/unbound/trunk@3557 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-12-01 08:54:53 +00:00
parent 63d58c7613
commit 128370ac14
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,6 @@
1 December 2015: Wouter
- Fixup 724 fix for fname_after_chroot() calls.
30 November 2015: Ralph
- Implemented qname minimisation

View file

@ -346,6 +346,12 @@ service_init(int r, struct daemon** d, struct config_file** c)
(strrchr(dirbuf, '\\'))[0] = 0;
} else log_err("GetModuleFileName had no path");
dir = dirbuf;
if(dirbuf[0]) {
/* adjust cfg->directory for the
* fname_after_chroot calls later to work */
free(cfg->directory);
cfg->directory = memdup(dir, strlen(dir)+1);
}
}
if(chdir(dir)) {
log_err("could not chdir to %s: %s",