996. [func] Issue warning if the configuration filename contains

the chroot path.
This commit is contained in:
Mark Andrews 2003-08-04 00:53:02 +00:00
parent c8c7e23e28
commit 96e8abc92a
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,6 @@
996. [func] Issue warning if the configuration filename contains
the chroot path.
994. [func] Treat non-authoritative responses to queries for type
NS as referrals even if the NS records are in the
answer section, because BIND 8 servers incorrectly

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.119.2.3.2.2 2003/08/02 00:15:10 marka Exp $ */
/* $Id: main.c,v 1.119.2.3.2.3 2003/08/04 00:53:02 marka Exp $ */
#include <config.h>
@ -135,7 +135,7 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
NS_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
"exiting (due to assertion failure)");
} else {
fprintf(stderr, "%s:%d: %s(%s) failed\n",
fprintf(stderr, "%s:%d: %s(%s) failed\n",
file, line, isc_assertion_typetotext(type), cond);
fflush(stderr);
}
@ -611,6 +611,18 @@ main(int argc, char *argv[]) {
parse_command_line(argc, argv);
/*
* Warn about common configuration error.
*/
if (ns_g_chrootdir != NULL) {
int len = strlen(ns_g_chrootdir);
if (strncmp(ns_g_chrootdir, ns_g_conffile, len) == 0 &&
(ns_g_conffile[len] == '/' || ns_g_conffile[len] == '\\'))
ns_main_earlywarning("config filename (-c %s) contains "
"chroot path (-t %s)",
ns_g_conffile, ns_g_chrootdir);
}
setup();
/*