mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-04 22:09:36 -05:00
- 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:
parent
63d58c7613
commit
128370ac14
2 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
1 December 2015: Wouter
|
||||
- Fixup 724 fix for fname_after_chroot() calls.
|
||||
|
||||
30 November 2015: Ralph
|
||||
- Implemented qname minimisation
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue