From a0bb9c7aa72ca122041f2062449eabff1de83754 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Fri, 7 Feb 1997 01:02:08 +0000 Subject: [PATCH] Add option for enabling RES_DEFNAMES in dnsserver. --- src/cache_cf.cc | 4 +++- src/dns.cc | 7 +++++-- src/dnsserver.cc | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 28a8b46620..715fbf46c6 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.169 1997/01/31 22:30:29 wessels Exp $ + * $Id: cache_cf.cc,v 1.170 1997/02/06 18:02:08 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1214,6 +1214,8 @@ parseConfigFile(const char *file_name) else if (!strcmp(token, "dns_children")) parseIntegerValue(&Config.dnsChildren); + else if (!strcmp(token, "dns_defnames")) + parseOnOff(&Config.Options.res_defnames); else if (!strcmp(token, "redirect_program")) parsePathname(&Config.Program.redirect); diff --git a/src/dns.cc b/src/dns.cc index 1cab5e2c87..4f7bdfbe01 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,5 +1,5 @@ /* - * $Id: dns.cc,v 1.28 1996/12/04 18:22:47 wessels Exp $ + * $Id: dns.cc,v 1.29 1997/02/06 18:02:10 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -199,7 +199,10 @@ dnsOpenServer(const char *command) fclose(debug_log); close(fd); close(cfd); - execlp(command, "(dnsserver)", NULL); + if (Config.Options.res_defnames) + execlp(command, "(dnsserver)", "-D", NULL); + else + execlp(command, "(dnsserver)", NULL); debug(50, 0, "dnsOpenServer: %s: %s\n", command, xstrerror()); _exit(1); return 0; diff --git a/src/dnsserver.cc b/src/dnsserver.cc index 4edfe22ad9..792092205f 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -1,6 +1,6 @@ /* - * $Id: dnsserver.cc,v 1.31 1997/01/02 07:20:28 wessels Exp $ + * $Id: dnsserver.cc,v 1.32 1997/02/06 18:02:10 wessels Exp $ * * DEBUG: section 0 DNS Resolver * AUTHOR: Harvest Derived @@ -273,7 +273,7 @@ main(int argc, char *argv[]) #endif #endif - while ((c = getopt(argc, argv, "vhd")) != -1) { + while ((c = getopt(argc, argv, "vhdD")) != -1) { switch (c) { case 'v': printf("dnsserver version %s\n", SQUID_VERSION); @@ -286,6 +286,11 @@ main(int argc, char *argv[]) if (!logfile) fprintf(stderr, "Could not open dnsserver's log file\n"); break; + case 'D': +#ifdef RES_DEFNAMES + _res.options |= RES_DEFNAMES; +#endif + break; case 'h': default: fprintf(stderr, "usage: dnsserver -hvd\n"); -- 2.39.5