Commit Diff
Diff:
f7e577fe4959a8e46c5f3a3659d68e9fb3d4bd4c
fb6ed32b7cbc4317c72cc51d0bd18876ce9634b4
Commit:
fb6ed32b7cbc4317c72cc51d0bd18876ce9634b4
Tree:
dc6bff6d23e34827cf10023eddcc234316bad46b
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Wed Jul 11 15:46:33 2018 UTC
Message:
introduce "zinclude" in the config. This is intended only for zones. Once inside a zinclude'd zonefile another include or other config option is not possible, it's barred. An administrator can use his own discretion on whether to allow a zone file with include or zinclude. Syntax is: zinclude "somezonefile.zone"; While programming this I changed some stuff in delphinusdnsd for debugging purposes. Tested on OpenBSD in production and regress is written (still needs commit).
blob - e120f96ccfcf3c262fa16c7b2cfd6dfdd3d06c96
blob + acfc83a1dbbdb48717ae09ef9b85844b1478cc32
--- delphinusdns.conf.5
+++ delphinusdns.conf.5
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2014-2017 Peter J. Philipp
+.\" Copyright (c) 2014-2018 Peter J. Philipp
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -207,19 +207,19 @@ notify "these hosts" {
::1;
}
-include "/etc/delphinusdns/centroid.eu.signed";
-include "/etc/delphinusdns/virgostar.net.signed";
-include "/etc/delphinusdns/solarscale.de.signed";
+zinclude "/etc/delphinusdns/centroid.eu.signed";
+zinclude "/etc/delphinusdns/virgostar.net.signed";
+zinclude "/etc/delphinusdns/solarscale.de.signed";
.Ed
Then the included files are output of
-.Xr dd-convert 8
+.Xr dddctl 8
.Sh GRAMMAR
Syntax for
.Nm
in BNF:
.Bd -literal
-line = ( version | axfrport | include | zone | region |
+line = ( version | axfrport | include | zinclude | zone | region |
axfr | notify | whitelist | filter | recurse | logging
| comment | options )
@@ -229,6 +229,8 @@ axfrport = "axfrport" ("port number") ;
include = "include" ("filename") ;
+zinclude = "zinclude" ("filename") ;
+
zone = "zone" ("string") [ "{" zonedata "}" ]
zonedata = { [hostname] [ "," dnstype] [ "," ttl ] ["," variablednsdata] }
hostname = string
@@ -275,7 +277,7 @@ optdnssec = "dnssec" ;
.Sh FILES
.Pa /etc/delphinusdns.conf
.Sh SEE ALSO
-.Xr dd-convert 8 ,
+.Xr dddctl 8 ,
.Xr delphinusdnsd 8
.Sh AUTHORS
This software and manual was written by
blob - 29f691d8b1e6bb09a62dcf5b641fa7b770c59a7b
blob + 625f25b75a17288adc0faaffc40d83b9083f2add
--- delphinusdnsd.8
+++ delphinusdnsd.8
@@ -100,6 +100,7 @@ Be more verbose in debug mode. This shows configfile
.Pa /etc/delphinusdns.conf
.Sh SEE ALSO
.Xr delphinusdns.conf 5 ,
+.Xr dddctl 8 ,
.Xr bind 2 ,
.Xr fork 2 ,
.Xr daemon 3 ,
blob - c2cf53712f7b4eda03a542bd256ffd957ed130b6
blob + 9b318b4491f5898d773294903c3c0d620deff8d7
--- delphinusdnsd.c
+++ delphinusdnsd.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: delphinusdnsd.c,v 1.35 2017/12/27 19:40:27 pjp Exp $
+ * $Id: delphinusdnsd.c,v 1.36 2018/07/11 15:46:33 pjp Exp $
*/
#include "ddd-include.h"
@@ -261,6 +261,18 @@ main(int argc, char *argv[], char *environ[])
if (! debug)
daemon(0,0);
+ else {
+ /*
+ * even if in debug mode we want to have our own parent group
+ * for reasons in that regress needs it when killing debug
+ * mode delphinusdnsd
+ */
+
+ if (setpgrp(0, 0) < 0) {
+ perror("setpgrp");
+ exit(1);
+ }
+ }
openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
blob - 2c6b110c3cbc8ae73c2a1866edb17e0bda2e28d4
blob + a9204ebde4e5811fd19db87dd4683a289aa10cd1
--- parse.y
+++ parse.y
@@ -21,7 +21,7 @@
*/
/*
- * $Id: parse.y,v 1.48 2018/01/01 19:47:40 pjp Exp $
+ * $Id: parse.y,v 1.49 2018/07/11 15:46:33 pjp Exp $
*/
%{
@@ -77,6 +77,9 @@ static struct file {
char *name;
int lineno;
int errors;
+ int descend;
+#define DESCEND_NO 0
+#define DESCEND_YES 1
} *file, *topfile;
#define STATE_IP 1
@@ -94,6 +97,7 @@ static struct file {
#define CONFIG_LOGGING 0x80
#define CONFIG_AXFRFOR 0x100
#define CONFIG_AXFRPORT 0x200
+#define CONFIG_ZINCLUDE 0x400
typedef struct {
union {
@@ -157,7 +161,7 @@ int lgetc(int);
struct tab * lookup(struct tab *, char *);
int lungetc(int);
int parse_file(ddDB *, char *);
-struct file *pushfile(const char *, int);
+struct file *pushfile(const char *, int, int);
int popfile(void);
struct rrtab *rrlookup(char *);
void set_record(struct domain *, int, char *, int);
@@ -201,7 +205,7 @@ struct rrtab {
%token VERSION OBRACE EBRACE REGION AXFRFOR
%token DOT COLON TEXT WOF INCLUDE ZONE COMMA CRLF
%token ERROR AXFRPORT LOGGING OPTIONS FILTER NOTIFY
-%token WHITELIST
+%token WHITELIST ZINCLUDE
%token <v.string> POUND
%token <v.string> SEMICOLON
@@ -226,6 +230,7 @@ cmd :
version
| axfrport
| include
+ | zinclude
| zone
| region CRLF
| axfr CRLF
@@ -270,8 +275,9 @@ axfrport:
dolog(LOG_INFO, "There must be a version at the top of the first configfile\n");
return (-1);
}
-
- axfrport = atoi($2);
+ if (file->descend == DESCEND_YES) {
+ axfrport = atoi($2);
+ }
free ($2);
}
;
@@ -297,15 +303,46 @@ includes:
return (-1);
}
- if ((nfile = pushfile($2, 0)) == NULL) {
- fprintf(stderr, "failed to include file %s\n", $2);
- free($2);
- return (-1);
+ if (file->descend == DESCEND_YES) {
+ if ((nfile = pushfile($2, 0, DESCEND_YES)) == NULL) {
+ fprintf(stderr, "failed to include file %s\n", $2);
+ free($2);
+ return (-1);
+ }
+
+ file = nfile;
+ lungetc('\n');
}
free($2);
+ }
+ ;
- file = nfile;
+zinclude:
+ zincludes CRLF
+ ;
+
+zincludes:
+ ZINCLUDE quotedfilename SEMICOLON {
+ struct file *nfile;
+
+ if ((confstatus & CONFIG_VERSION) != CONFIG_VERSION) {
+ dolog(LOG_INFO, "There must be a version at the top of the first configfile\n");
+ return (-1);
+ }
+
+ if (file->descend == DESCEND_YES) {
+ if ((nfile = pushfile($2, 0, DESCEND_NO)) == NULL) {
+ fprintf(stderr, "failed to include file %s\n", $2);
+ free($2);
+ return (-1);
+ }
+
+ file = nfile;
+ lungetc('\n');
+ }
+
+ free($2);
}
;
@@ -702,69 +739,76 @@ optionsstatement:
STRING SEMICOLON CRLF
{
- if (strcasecmp($1, "dnssec") == 0) {
- dolog(LOG_DEBUG, "DNSSEC enabled\n");
- dnssec = 1;
- } else if (strcasecmp($1, "log") == 0) {
- dolog(LOG_DEBUG, "logging on\n");
- lflag = 1;
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "dnssec") == 0) {
+ dolog(LOG_DEBUG, "DNSSEC enabled\n");
+ dnssec = 1;
+ } else if (strcasecmp($1, "log") == 0) {
+ dolog(LOG_DEBUG, "logging on\n");
+ lflag = 1;
+ }
}
}
|
STRING QUOTEDSTRING SEMICOLON CRLF
{
- if (strcasecmp($1, "interface") == 0) {
- iflag = 1;
- if (icount > 253) {
- dolog(LOG_ERR, "too many interface keywords in options\n");
- return (-1);
- }
-
- dolog(LOG_DEBUG, "interface \"%s\" added\n", $2);
- interface_list[icount++] = $2;
- } else if (strcasecmp($1, "versionstring") == 0) {
- if (strlen($2) > 255) {
- dolog(LOG_ERR, "versionstring too long\n");
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "interface") == 0) {
+ iflag = 1;
+ if (icount > 253) {
+ dolog(LOG_ERR, "too many interface keywords in options\n");
+ return (-1);
+ }
+
+ dolog(LOG_DEBUG, "interface \"%s\" added\n", $2);
+ interface_list[icount++] = $2;
+ } else if (strcasecmp($1, "versionstring") == 0) {
+ if (strlen($2) > 255) {
+ dolog(LOG_ERR, "versionstring too long\n");
+ return (-1);
+ }
- versionstring = strdup($2);
- vslen = strlen(versionstring);
+ versionstring = strdup($2);
+ vslen = strlen(versionstring);
+ }
}
}
|
STRING NUMBER SEMICOLON CRLF
{
- if (strcasecmp($1, "fork") == 0) {
- dolog(LOG_DEBUG, "forking %d times\n", $2);
- nflag = $2;
- } else if (strcasecmp($1, "port") == 0) {
- port = $2 & 0xffff;
- dolog(LOG_DEBUG, "listening on port %d\n", port);
- } else if (strcasecmp($1, "ratelimit-pps") == 0) {
- if ($2 > 127 || $2 < 1) {
- dolog(LOG_ERR, "ratelimit packets per second must be between 1 and 127, or leave it off!\n");
- return -1;
- }
- ratelimit = 1;
- ratelimit_packets_per_second = $2;
- dolog(LOG_DEBUG, "ratelimiting to %d packets per second", ratelimit_packets_per_second);
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "fork") == 0) {
+ dolog(LOG_DEBUG, "forking %d times\n", $2);
+ nflag = $2;
+ } else if (strcasecmp($1, "port") == 0) {
+ port = $2 & 0xffff;
+ dolog(LOG_DEBUG, "listening on port %d\n", port);
+ } else if (strcasecmp($1, "ratelimit-pps") == 0) {
+ if ($2 > 127 || $2 < 1) {
+ dolog(LOG_ERR, "ratelimit packets per second must be between 1 and 127, or leave it off!\n");
+ return -1;
+ }
+ ratelimit = 1;
+ ratelimit_packets_per_second = $2;
+ dolog(LOG_DEBUG, "ratelimiting to %d packets per second", ratelimit_packets_per_second);
+ }
+
}
-
}
|
STRING ipcidr SEMICOLON CRLF
{
- if (strcasecmp($1, "bind") == 0) {
- bflag = 1;
- if (bcount > 253) {
- dolog(LOG_ERR, "too many bind keywords in options\n");
- return (-1);
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "bind") == 0) {
+ bflag = 1;
+ if (bcount > 253) {
+ dolog(LOG_ERR, "too many bind keywords in options\n");
+ return (-1);
+ }
+ dolog(LOG_DEBUG, "binding to %s\n", $2);
+ bind_list[bcount++] = $2;
}
- dolog(LOG_DEBUG, "binding to %s\n", $2);
- bind_list[bcount++] = $2;
}
-
}
| comment CRLF
;
@@ -800,51 +844,54 @@ loggingstatement:
{
char buf[512];
- if (strcasecmp($1, "logbind") == 0) {
- logging.active = 1;
- logging.bind = 0;
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "logbind") == 0) {
+ logging.active = 1;
+ logging.bind = 0;
- gethostname(buf, sizeof(buf));
- logging.hostname = strdup(buf);
- if (logging.hostname == NULL) {
- dolog(LOG_ERR, "strdup failed\n");
- return (-1);
- }
-
- if (strcmp($2, "yes") == 0) {
- logging.bind = 1;
- }
- } else if (strcasecmp($1, "logpasswd") == 0) {
+ gethostname(buf, sizeof(buf));
+ logging.hostname = strdup(buf);
+ if (logging.hostname == NULL) {
+ dolog(LOG_ERR, "strdup failed\n");
+ return (-1);
+ }
- logging.logpasswd = strdup($2);
-
- if (logging.logpasswd == NULL) {
- dolog(LOG_ERR, "strdup failed\n");
+ if (strcmp($2, "yes") == 0) {
+ logging.bind = 1;
+ }
+ } else if (strcasecmp($1, "logpasswd") == 0) {
+
+ logging.logpasswd = strdup($2);
+
+ if (logging.logpasswd == NULL) {
+ dolog(LOG_ERR, "strdup failed\n");
+ return (-1);
+ }
+
+ } else {
+ if (debug)
+ printf("another logging statement I don't know?\n");
return (-1);
}
-
- } else {
- if (debug)
- printf("another logging statement I don't know?\n");
- return (-1);
}
-
}
|
STRING NUMBER SEMICOLON
{
char buf[16];
- if (strcasecmp($1, "logport") == 0) {
- snprintf(buf, sizeof(buf), "%lld", $2);
- logging.logport = strdup(buf);
- if (logging.logport == NULL) {
- dolog(LOG_ERR, "strdup failed\n");
- return (-1);
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "logport") == 0) {
+ snprintf(buf, sizeof(buf), "%lld", $2);
+ logging.logport = strdup(buf);
+ if (logging.logport == NULL) {
+ dolog(LOG_ERR, "strdup failed\n");
+ return (-1);
+ }
+ logging.logport2 = $2;
}
- logging.logport2 = $2;
- }
- }
+ }
+ }
|
STRING ipcidr SEMICOLON
{
@@ -853,73 +900,75 @@ loggingstatement:
struct sockaddr_in *psin;
int error;
- if (strcasecmp($1, "loghost") == 0) {
- logging.loghost = strdup($2);
- if (logging.loghost == NULL) {
- dolog(LOG_ERR, "strdup failed\n");
+ if (file->descend == DESCEND_YES) {
+ if (strcasecmp($1, "loghost") == 0) {
+ logging.loghost = strdup($2);
+ if (logging.loghost == NULL) {
+ dolog(LOG_ERR, "strdup failed\n");
- return (-1);
- }
-
- if (strchr($2, ':') != NULL) {
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_INET6;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_NUMERICHOST;
-
- error = getaddrinfo($2, "www", &hints, &res0);
- if (error) {
- dolog(LOG_ERR, "%s line %d: %s\n",
- file->name, file->lineno,
- gai_strerror(error));
-
return (-1);
}
- if (res0 == NULL) {
- dolog(LOG_ERR, "%s line %d: could not"
- " determine IPv6 address\n"
- , file->name, file->lineno);
- return (-1);
- }
-
- psin6 = (struct sockaddr_in6 *)&logging.loghost2;
- psin6->sin6_family = res0->ai_family;
- memcpy(psin6, res0->ai_addr, res0->ai_addrlen);
- freeaddrinfo(res0);
- } else {
- memset(&hints, 0, sizeof(hints));
+ if (strchr($2, ':') != NULL) {
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_NUMERICHOST;
- hints.ai_family = AF_INET;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_NUMERICHOST;
+ error = getaddrinfo($2, "www", &hints, &res0);
+ if (error) {
+ dolog(LOG_ERR, "%s line %d: %s\n",
+ file->name, file->lineno,
+ gai_strerror(error));
+
+ return (-1);
+ }
- error = getaddrinfo($2, "www", &hints, &res0);
- if (error) {
- dolog(LOG_ERR, "%s line %d: %s\n",
- file->name, file->lineno,
- gai_strerror(error));
-
- return (-1);
- }
+ if (res0 == NULL) {
+ dolog(LOG_ERR, "%s line %d: could not"
+ " determine IPv6 address\n"
+ , file->name, file->lineno);
+ return (-1);
+ }
+
+ psin6 = (struct sockaddr_in6 *)&logging.loghost2;
+ psin6->sin6_family = res0->ai_family;
+ memcpy(psin6, res0->ai_addr, res0->ai_addrlen);
+ freeaddrinfo(res0);
+ } else {
+ memset(&hints, 0, sizeof(hints));
- if (res0 == NULL) {
- dolog(LOG_ERR, "%s line %d: could not"
- " determine IPv6 address\n"
- , file->name, file->lineno);
- return (-1);
- }
-
- psin = (struct sockaddr_in *)&logging.loghost2;
- psin->sin_family = res0->ai_family;
- memcpy(psin, res0->ai_addr, res0->ai_addrlen);
+ hints.ai_family = AF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_NUMERICHOST;
- freeaddrinfo(res0);
+ error = getaddrinfo($2, "www", &hints, &res0);
+ if (error) {
+ dolog(LOG_ERR, "%s line %d: %s\n",
+ file->name, file->lineno,
+ gai_strerror(error));
+
+ return (-1);
+ }
+
+ if (res0 == NULL) {
+ dolog(LOG_ERR, "%s line %d: could not"
+ " determine IPv6 address\n"
+ , file->name, file->lineno);
+ return (-1);
+ }
+
+ psin = (struct sockaddr_in *)&logging.loghost2;
+ psin->sin_family = res0->ai_family;
+ memcpy(psin, res0->ai_addr, res0->ai_addrlen);
+
+ freeaddrinfo(res0);
+ }
+ } else {
+ if (debug)
+ printf("2 another logging statement I don't know?\n");
+ return (-1);
}
- } else {
- if (debug)
- printf("2 another logging statement I don't know?\n");
- return (-1);
}
}
| comment CRLF
@@ -957,21 +1006,24 @@ whiteliststatement : ipcidr SEMICOLON CRLF
char *dst;
- if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
+ return (-1);
+ }
- if (insert_whitelist(dst, prefixlength) < 0) {
- dolog(LOG_ERR, "insert_whitelist, line %d\n", file->lineno);
- return (-1);
+ if (insert_whitelist(dst, prefixlength) < 0) {
+ dolog(LOG_ERR, "insert_whitelist, line %d\n", file->lineno);
+ return (-1);
+ }
+
+ if (debug)
+ printf("whitelist inserted %s address\n", $1);
+
+ whitelist = 1;
+
+ free (dst);
}
-
- if (debug)
- printf("whitelist inserted %s address\n", $1);
-
- whitelist = 1;
- free (dst);
free ($1);
}
| comment CRLF
@@ -1009,19 +1061,22 @@ filterstatement : ipcidr SEMICOLON CRLF
char *dst;
- if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
+ return (-1);
+ }
- if (insert_filter(dst, prefixlength) < 0) {
- dolog(LOG_ERR, "insert_filter, line %d\n", file->lineno);
- return (-1);
+ if (insert_filter(dst, prefixlength) < 0) {
+ dolog(LOG_ERR, "insert_filter, line %d\n", file->lineno);
+ return (-1);
+ }
+
+ if (debug)
+ printf("filter inserted %s address\n", $1);
+
+ free (dst);
}
-
- if (debug)
- printf("filter inserted %s address\n", $1);
- free (dst);
free ($1);
}
| comment CRLF
@@ -1060,18 +1115,21 @@ notifystatement : ipcidr SEMICOLON CRLF
char *dst;
- if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
+ return (-1);
+ }
- if (insert_notifyslave(dst, prefixlength) < 0) {
- dolog(LOG_ERR, "insert_notifyslave, line %d\n", file->lineno);
- return (-1);
+ if (insert_notifyslave(dst, prefixlength) < 0) {
+ dolog(LOG_ERR, "insert_notifyslave, line %d\n", file->lineno);
+ return (-1);
+ }
+
+ notify++;
+
+ free (dst);
}
-
- notify++;
-
- free (dst);
+
free ($1);
}
| comment CRLF
@@ -1109,19 +1167,23 @@ axfrstatement : ipcidr SEMICOLON CRLF
char *dst;
- if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
+ return (-1);
+ }
- if (insert_axfr(dst, prefixlength) < 0) {
- dolog(LOG_ERR, "insert_axfr, line %d\n", file->lineno);
- return (-1);
+ if (insert_axfr(dst, prefixlength) < 0) {
+ dolog(LOG_ERR, "insert_axfr, line %d\n", file->lineno);
+ return (-1);
+ }
+
+ if (debug)
+ printf("axfr inserted %s address\n", $1);
+
+ free (dst);
+
}
-
- if (debug)
- printf("axfr inserted %s address\n", $1);
- free (dst);
free ($1);
}
| comment CRLF
@@ -1160,19 +1222,23 @@ regionstatement : ipcidr SEMICOLON CRLF
char prefixlength[INET_ADDRSTRLEN];
char *dst;
- if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
- return (-1);
- }
+ if (file->descend == DESCEND_YES) {
+ if ((dst = get_prefixlen($1, (char *)&prefixlength, sizeof(prefixlength))) == NULL) {
+ return (-1);
+ }
- if (insert_region(dst, prefixlength, region) < 0) {
- dolog(LOG_ERR, "insert_region, line %d\n", file->lineno);
- return (-1);
+ if (insert_region(dst, prefixlength, region) < 0) {
+ dolog(LOG_ERR, "insert_region, line %d\n", file->lineno);
+ return (-1);
+ }
+
+ if (debug)
+ printf("%s ipv4 address\n", dst);
+
+ free (dst);
+
}
-
- if (debug)
- printf("%s ipv4 address\n", dst);
- free (dst);
free ($1);
}
| comment CRLF
@@ -1204,6 +1270,7 @@ struct tab cmdtab[] = {
{ "region", REGION, STATE_IP },
{ "wildcard-only-for", WOF, STATE_IP },
{ "version", VERSION, 0 },
+ { "zinclude", ZINCLUDE, 0 },
{ "zone", ZONE, 0 },
{ "notify", NOTIFY, STATE_IP },
{ NULL, 0, 0}};
@@ -1235,7 +1302,7 @@ parse_file(ddDB *db, char *filename)
logging.active = 0;
- if ((file = pushfile(filename, 0)) == NULL) {
+ if ((file = pushfile(filename, 0, DESCEND_YES)) == NULL) {
return (-1);
}
@@ -3597,7 +3664,7 @@ set_record(struct domain *sdomain, int rs, char *conve
struct file *
-pushfile(const char *name, int secret)
+pushfile(const char *name, int secret, int descend)
{
struct stat sb;
struct file *nfile;
@@ -3629,6 +3696,7 @@ pushfile(const char *name, int secret)
time_changed = (time_t)sb.st_ctime; /* ufs1 is only 32 bits */
nfile->lineno = 1;
+ nfile->descend = descend;
TAILQ_INSERT_TAIL(&files, nfile, file_entry);
return (nfile);
}
blob - 401889452de7723ba1252ace339b065129f1fc24
blob + 7a873c4d03ded58e5f6daee3a57c0dddc7d57543
--- regress/Makefile
+++ regress/Makefile
@@ -1,3 +1,3 @@
-SUBDIR=dddctl
+SUBDIR=dddctl delphinusdnsd
.include <bsd.subdir.mk>
repomaster@centroid.eu