]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add option for enabling RES_DEFNAMES in dnsserver.
authorwessels <>
Fri, 7 Feb 1997 01:02:08 +0000 (01:02 +0000)
committerwessels <>
Fri, 7 Feb 1997 01:02:08 +0000 (01:02 +0000)
src/cache_cf.cc
src/dns.cc
src/dnsserver.cc

index 28a8b46620640173947d5699cce428ae9ed08ba8..715fbf46c686324d7ba19ecb6424e98bcb0fee8f 100644 (file)
@@ -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);
index 1cab5e2c8702af85ec5c81b2af0fa465be83819d..4f7bdfbe012ba2798f016c884fa550cd66a9bc5c 100644 (file)
@@ -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;
index 4edfe22ad94ef54c68791c1fcdf02583bc64bae6..792092205fe5a49e036a1e73923644ae36ee8433 100644 (file)
@@ -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");