checkconf better.

git-svn-id: file:///svn/unbound/trunk@1047 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-04-15 08:22:17 +00:00
parent 97ebee32d0
commit 399a165cc3
3 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,9 @@
15 April 2008: Wouter
- fixup default rc.d pidfile location to /usr/local/etc.
- iana ports updated.
- copyright updated in ldns-testpkts to keep same as in ldns.
- fixup checkconf chroot tests a bit more, chdir must be inside
chroot dir.
14 April 2008: Wouter
- got update for parseunbound.pl statistics script from Kai Storbeck.

View File

@ -321,8 +321,14 @@ morechecks(struct config_file* cfg)
!is_dir(cfg->chrootdir)) {
fatal_exit("bad chroot directory");
}
if(cfg->directory && cfg->directory[0] &&
!is_dir(fname_after_chroot(cfg->directory, cfg, 0))) {
if((cfg->chrootdir && cfg->chrootdir[0])
&& (cfg->directory && cfg->directory[0])
&& strncmp(cfg->chrootdir, cfg->directory,
strlen(cfg->chrootdir)) != 0) {
fatal_exit("chdir directory '%s' not inside the chroot "
"directory '%s'", cfg->directory, cfg->chrootdir);
}
if(cfg->directory && cfg->directory[0] && !is_dir(cfg->directory)) {
fatal_exit("bad chdir directory");
}
if( (cfg->chrootdir && cfg->chrootdir[0]) ||

Binary file not shown.