mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
lwresd should only try to load /etc/resolv.conf if the -c option was not
specified.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: globals.h,v 1.46 2000/10/13 22:35:46 bwelling Exp $ */
|
||||
/* $Id: globals.h,v 1.47 2000/11/01 20:59:22 bwelling Exp $ */
|
||||
|
||||
#ifndef NAMED_GLOBALS_H
|
||||
#define NAMED_GLOBALS_H 1
|
||||
@@ -76,6 +76,7 @@ EXTERN const char * lwresd_g_conffile INIT(NS_SYSCONFDIR
|
||||
"/lwresd.conf");
|
||||
EXTERN const char * lwresd_g_resolvconffile INIT("/etc"
|
||||
"/resolv.conf");
|
||||
EXTERN isc_boolean_t ns_g_conffileset INIT(ISC_FALSE);
|
||||
EXTERN isc_boolean_t lwresd_g_useresolvconf INIT(ISC_FALSE);
|
||||
|
||||
/*
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.89 2000/10/13 22:35:43 bwelling Exp $ */
|
||||
/* $Id: main.c,v 1.90 2000/11/01 20:59:19 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -172,8 +172,8 @@ library_unexpected_error(const char *file, int line, const char *format,
|
||||
static void
|
||||
lwresd_usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: lwresd [-C conffile] [-d debuglevel] "
|
||||
"[-f|-g] [-n number_of_cpus]\n"
|
||||
"usage: lwresd [-c conffile | -C resolvconffile] "
|
||||
"[-d debuglevel] [-f|-g] [-n number_of_cpus]\n"
|
||||
" [-p port] [-P listen-port] [-s] "
|
||||
"[-t chrootdir]\n"
|
||||
" [-u username] [-i pidfile]\n");
|
||||
@@ -276,10 +276,14 @@ parse_command_line(int argc, char *argv[]) {
|
||||
case 'c':
|
||||
ns_g_conffile = isc_commandline_argument;
|
||||
lwresd_g_conffile = isc_commandline_argument;
|
||||
if (lwresd_g_useresolvconf)
|
||||
ns_main_earlyfatal("cannot specify -c and -C");
|
||||
ns_g_conffileset = ISC_TRUE;
|
||||
break;
|
||||
/* XXXBEW Should -C be removed? */
|
||||
case 'C':
|
||||
lwresd_g_resolvconffile = isc_commandline_argument;
|
||||
if (ns_g_conffileset)
|
||||
ns_main_earlyfatal("cannot specify -c and -C");
|
||||
lwresd_g_useresolvconf = ISC_TRUE;
|
||||
break;
|
||||
case 'd':
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.233 2000/10/31 03:21:44 marka Exp $ */
|
||||
/* $Id: server.c,v 1.234 2000/11/01 20:59:20 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1313,7 +1313,9 @@ load_configuration(const char *filename, ns_server_t *server,
|
||||
result = dns_c_parse_namedconf(filename, ns_g_mctx, &cctx,
|
||||
&callbacks);
|
||||
}
|
||||
if (result == ISC_R_FILENOTFOUND && ns_g_lwresdonly) {
|
||||
if (result == ISC_R_FILENOTFOUND &&
|
||||
ns_g_lwresdonly && !ns_g_conffileset)
|
||||
{
|
||||
isc_log_write(ns_g_lctx,
|
||||
NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_INFO, "loading configuration from '%s'",
|
||||
|
Reference in New Issue
Block a user