Removed listen-on from views.
Changed syntax of grant/deny statements so they now must be inside an 'update-policy' block. quote rr types when printing grant/deny statements as they can clash with config file keywords. Added rcs Id inside comment.
This commit is contained in:
+43
-24
@@ -25,7 +25,10 @@ options {
|
||||
transfer-source-v6 4:3:2:1:5:6:7:8;
|
||||
|
||||
directory "."; // use current directory
|
||||
named-xfer "/usr/libexec/named-xfer"; // _PATH_XFER
|
||||
|
||||
# Obsolete
|
||||
# named-xfer "/usr/libexec/named-xfer"; // _PATH_XFER
|
||||
|
||||
dump-file "named_dump.db"; // _PATH_DUMPFILE
|
||||
pid-file "/var/run/named.pid"; // _PATH_PIDFILE
|
||||
statistics-file "named.stats"; // _PATH_STATS
|
||||
@@ -40,12 +43,15 @@ options {
|
||||
check-names slave warn;
|
||||
check-names response ignore;
|
||||
host-statistics no;
|
||||
deallocate-on-exit no; // Painstakingly deallocate all
|
||||
// objects when exiting instead of
|
||||
// letting the OS clean up for us.
|
||||
// Useful a memory leak is suspected.
|
||||
// Final statistics are written to the
|
||||
// memstatistics-file.
|
||||
|
||||
# Obsolete
|
||||
# deallocate-on-exit no; // Painstakingly deallocate all
|
||||
# // objects when exiting instead of
|
||||
# // letting the OS clean up for us.
|
||||
# // Useful a memory leak is suspected.
|
||||
# // Final statistics are written to the
|
||||
# // memstatistics-file.
|
||||
|
||||
datasize default;
|
||||
stacksize default;
|
||||
coresize default;
|
||||
@@ -53,7 +59,10 @@ options {
|
||||
recursion yes;
|
||||
expert-mode true; // don't issue warnings for some things
|
||||
fetch-glue yes;
|
||||
fake-iquery no;
|
||||
|
||||
# Obsolete
|
||||
# fake-iquery no;
|
||||
|
||||
notify yes; // send NOTIFY messages. You can set
|
||||
// notify on a zone-by-zone
|
||||
// basis in the "zone" statement
|
||||
@@ -62,13 +71,16 @@ options {
|
||||
// don't set this to 'no' unless
|
||||
// you know what you're doing -- older
|
||||
// servers won't like it.
|
||||
multiple-cnames no; // if yes, then a name my have more
|
||||
// than one CNAME RR. This use
|
||||
// is non-standard and is not
|
||||
// recommended, but it is available
|
||||
// because previous releases supported
|
||||
// it and it was used by large sites
|
||||
// for load balancing.
|
||||
|
||||
# Obsolete
|
||||
# multiple-cnames no; // if yes, then a name my have more
|
||||
# // than one CNAME RR. This use
|
||||
# // is non-standard and is not
|
||||
# // recommended, but it is available
|
||||
# // because previous releases supported
|
||||
# // it and it was used by large sites
|
||||
# // for load balancing.
|
||||
|
||||
allow-query { any; };
|
||||
allow-transfer { any; };
|
||||
transfers-in 10; // DEFAULT_XFERS_RUNNING, cannot be
|
||||
@@ -176,7 +188,10 @@ options {
|
||||
/*
|
||||
* IXFR options
|
||||
*/
|
||||
maintain-ixfr-base no; // If yes, keep transaction log file for IXFR
|
||||
|
||||
# Now called 'provide-ixfr'
|
||||
# maintain-ixfr-base no; // If yes, keep transaction log file for IXFR
|
||||
|
||||
max-ixfr-log-size 20; // Not implemented, maximum size the
|
||||
// IXFR transaction log file to grow
|
||||
};
|
||||
@@ -294,13 +309,16 @@ zone "non-default-acl.demo.zone" {
|
||||
// - certain rdatatype values (such as "key") are config file keywords and
|
||||
// must be quoted or a syntax error will occur.
|
||||
//
|
||||
grant root.domain. subdomain host.domain. A MX CNAME;
|
||||
grant sub.root.domain. wildcard *.host.domain. A;
|
||||
grant root.domain. name host.domain. a ns md mf cname soa mb mg
|
||||
mr "null" wks ptr hinfo minfo mx txt rp afsdb x25
|
||||
isdn rt nsap sig "key" px gpos aaaa loc nxt srv naptr kx
|
||||
cert a6 dname opt unspec tkey tsig ;
|
||||
grant foo.bar.com. self foo.bar.com. a;
|
||||
|
||||
update-policy {
|
||||
grant root.domain. subdomain host.domain. A MX CNAME;
|
||||
grant sub.root.domain. wildcard *.host.domain. A;
|
||||
grant root.domain. name host.domain. a ns md mf cname soa mb mg
|
||||
mr "null" wks ptr hinfo minfo mx txt rp afsdb x25
|
||||
isdn rt nsap sig "key" px gpos aaaa loc nxt srv naptr kx
|
||||
cert a6 dname opt unspec tkey tsig ;
|
||||
grant foo.bar.com. self foo.bar.com. a;
|
||||
};
|
||||
};
|
||||
|
||||
key sample_key { // for TSIG; supported by parser
|
||||
@@ -329,7 +347,8 @@ server 1.2.3.4 {
|
||||
keys { "sample_key" }; // for TSIG; supported by the parser
|
||||
// but not yet implemented in the
|
||||
// rest of the server
|
||||
support-ixfr yes; // for IXFR supported by server
|
||||
# Now called 'request-ixfr'
|
||||
# support-ixfr yes; // for IXFR supported by server
|
||||
// if yes, the listed server talks IXFR
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confacl.c,v 1.14 2000/03/28 22:58:13 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confcache.c,v 1.5 2000/03/28 22:58:14 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <dns/confcache.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confcommon.c,v 1.20 2000/03/28 22:58:14 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h> /* XXXRTH */
|
||||
@@ -680,7 +682,7 @@ dns_c_peer_print(FILE *fp, int indent, dns_peer_t *peer)
|
||||
if (res == ISC_R_SUCCESS) {
|
||||
REQUIRE(name != NULL);
|
||||
dns_c_printtabs(fp, indent + 1);
|
||||
fprintf(fp, "key { \"");
|
||||
fprintf(fp, "keys { \"");
|
||||
dns_name_print(peer->key, fp);
|
||||
fprintf(fp, "\"; };\n");
|
||||
}
|
||||
@@ -749,8 +751,11 @@ dns_c_ssutable_print(FILE *fp, int indent, dns_ssutable_t *ssutable)
|
||||
}
|
||||
|
||||
fputc('\n', fp);
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "update-policy {\n");
|
||||
|
||||
do {
|
||||
dns_c_printtabs(fp, indent);
|
||||
dns_c_printtabs(fp, indent + 1);
|
||||
|
||||
fputs ((dns_ssurule_isgrant(rule) ? "grant" : "deny"), fp);
|
||||
fputc(' ', fp);
|
||||
@@ -786,7 +791,9 @@ dns_c_ssutable_print(FILE *fp, int indent, dns_ssutable_t *ssutable)
|
||||
|
||||
tcount = dns_ssurule_types(rule, &types);
|
||||
for(i = 0 ; i < tcount ; i++) {
|
||||
fputc('\"', fp);
|
||||
dns_c_datatype_tostream(fp, types[i]);
|
||||
fputc('\"', fp);
|
||||
fputc(' ', fp);
|
||||
}
|
||||
|
||||
@@ -795,6 +802,8 @@ dns_c_ssutable_print(FILE *fp, int indent, dns_ssutable_t *ssutable)
|
||||
rule = NULL;
|
||||
} while (dns_ssutable_nextrule(tmprule, &rule) == ISC_R_SUCCESS);
|
||||
fputc('\n', fp);
|
||||
dns_c_printtabs(fp, indent);
|
||||
fprintf(fp, "};\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confctl.c,v 1.17 2000/03/28 22:58:14 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confctx.c,v 1.38 2000/03/28 22:58:14 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <syslog.h> /* XXXRTH */
|
||||
@@ -30,8 +32,6 @@
|
||||
|
||||
#include "confpvt.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Bit positions in the flags fields of the dns_c_options_t structure.
|
||||
*/
|
||||
@@ -252,7 +252,7 @@ dns_c_checkconfig(dns_c_ctx_t *ctx)
|
||||
dns_c_ipmatchlist_detach(&ipml);
|
||||
isc_log_write(dns_lctx,DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG, ISC_LOG_WARNING,
|
||||
"topology is not yet implemented.");
|
||||
"topology is deprecated.");
|
||||
}
|
||||
|
||||
if (dns_c_ctx_getsortlist(ctx, &ipml) != ISC_R_NOTFOUND) {
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confip.c,v 1.20 2000/03/28 22:58:17 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confkeys.c,v 1.16 2000/03/28 22:58:17 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: conflog.c,v 1.12 2000/03/28 22:58:18 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: conflsn.c,v 1.11 2000/03/28 22:58:19 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confndc.c,v 1.6 2000/03/28 22:58:19 brister Exp $ */
|
||||
|
||||
/*
|
||||
** options {
|
||||
|
||||
+11
-27
@@ -16,7 +16,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confparser.y,v 1.54 2000/03/23 19:35:14 halley Exp $ */
|
||||
/* $Id: confparser.y,v 1.55 2000/03/28 22:58:20 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -161,7 +161,6 @@ static isc_boolean_t int_too_big(isc_uint32_t base, isc_uint32_t mult);
|
||||
%token L_EOS
|
||||
%token L_SLASH
|
||||
%token L_BANG
|
||||
%token L_QUOTE
|
||||
|
||||
%token L_MASTER
|
||||
%token L_SLAVE
|
||||
@@ -296,10 +295,10 @@ static isc_boolean_t int_too_big(isc_uint32_t base, isc_uint32_t mult);
|
||||
%token L_PROVIDE_IXFR
|
||||
%token L_REQUEST_IXFR
|
||||
|
||||
%token L_UPDATE_POLICY
|
||||
%token L_GRANT
|
||||
%token L_DENY
|
||||
%token L_SUBDOMAIN
|
||||
%token L_DOMAIN
|
||||
%token L_SELF
|
||||
%token L_WILDCARD
|
||||
|
||||
@@ -2872,27 +2871,6 @@ view_option: L_ALLOW_QUERY L_LBRACE address_match_list L_RBRACE
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| L_LISTEN_ON maybe_port L_LBRACE address_match_list L_RBRACE
|
||||
{
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
|
||||
INSIST(view != NULL);
|
||||
|
||||
if ($4 == NULL) {
|
||||
parser_warning(ISC_FALSE,
|
||||
"address-match-list empty. "
|
||||
"listen statement ignored.");
|
||||
} else {
|
||||
tmpres = dns_c_view_addlisten_on(view, $2, $4,
|
||||
ISC_FALSE);
|
||||
|
||||
if (tmpres != ISC_R_SUCCESS) {
|
||||
parser_error(ISC_FALSE,
|
||||
"failed to add listen statement");
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* XXX not implemented yet
|
||||
| L_RRSET_ORDER L_LBRACE rrset_ordering_list L_RBRACE
|
||||
| L_CHECK_NAMES
|
||||
@@ -2902,6 +2880,12 @@ view_option: L_ALLOW_QUERY L_LBRACE address_match_list L_RBRACE
|
||||
;
|
||||
|
||||
|
||||
zone_update_policy: L_UPDATE_POLICY L_LBRACE {
|
||||
|
||||
} zone_grant_stmt_list L_RBRACE;
|
||||
|
||||
zone_grant_stmt_list: /* nothing */ | zone_grant_stmt_list zone_ssu_stmt L_EOS;
|
||||
|
||||
zone_ssu_stmt: grant_stmt {
|
||||
dns_ssutable_t *ssutable = NULL;
|
||||
isc_boolean_t ok = ISC_TRUE;
|
||||
@@ -3315,7 +3299,7 @@ zone_non_type_keywords: L_FILE | L_FILE_IXFR | L_IXFR_TMP | L_MASTERS |
|
||||
L_TRANSFER_SOURCE | L_CHECK_NAMES | L_ALLOW_UPDATE |
|
||||
L_ALLOW_UPDATE_FORWARDING | L_ALLOW_QUERY |
|
||||
L_ALLOW_TRANSFER | L_FORWARD | L_FORWARDERS | L_MAX_TRANSFER_TIME_IN |
|
||||
L_TCP_CLIENTS | L_RECURSIVE_CLIENTS | L_GRANT | L_DENY |
|
||||
L_TCP_CLIENTS | L_RECURSIVE_CLIENTS | L_UPDATE_POLICY | L_DENY |
|
||||
L_MAX_TRANSFER_TIME_OUT | L_MAX_TRANSFER_IDLE_IN |
|
||||
L_MAX_TRANSFER_IDLE_OUT | L_MAX_LOG_SIZE_IXFR | L_NOTIFY |
|
||||
L_MAINTAIN_IXFR_BASE | L_PUBKEY | L_ALSO_NOTIFY | L_DIALUP
|
||||
@@ -3769,7 +3753,7 @@ zone_option: L_FILE L_QSTRING
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
| zone_ssu_stmt
|
||||
| zone_update_policy
|
||||
;
|
||||
|
||||
|
||||
@@ -4038,7 +4022,6 @@ static struct token keyword_tokens [] = {
|
||||
{ "grant", L_GRANT },
|
||||
{ "deny", L_DENY },
|
||||
{ "subdomain", L_SUBDOMAIN },
|
||||
{ "domain", L_DOMAIN },
|
||||
{ "self", L_SELF },
|
||||
{ "wildcard", L_WILDCARD },
|
||||
{ "group", L_GROUP },
|
||||
@@ -4124,6 +4107,7 @@ static struct token keyword_tokens [] = {
|
||||
{ "type", L_TYPE },
|
||||
{ "unix", L_UNIX },
|
||||
{ "unlimited", L_UNLIMITED },
|
||||
{ "update-policy", L_UPDATE_POLICY },
|
||||
{ "use-id-pool", L_USE_ID_POOL },
|
||||
{ "use-ixfr", L_USE_IXFR },
|
||||
{ "version", L_VERSION },
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confresolv.c,v 1.5 2000/03/28 22:58:23 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <dns/confresolv.h>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confrrset.c,v 1.10 2000/03/28 22:58:24 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confserv.c,v 1.15 2000/03/28 22:58:24 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h> /* XXXRTH */
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confview.c,v 1.16 2000/03/28 22:58:24 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -242,7 +244,6 @@ dns_c_view_new(isc_mem_t *mem, const char *name, dns_c_view_t **newview)
|
||||
view->sortlist = NULL;
|
||||
view->topology = NULL;
|
||||
view->forwarders = NULL;
|
||||
view->listens = NULL;
|
||||
view->ordering = NULL;
|
||||
|
||||
for (i = 0 ; i < DNS_C_TRANSCOUNT ; i++) {
|
||||
@@ -386,10 +387,6 @@ dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view)
|
||||
fprintf(fp, ";\n");
|
||||
}
|
||||
|
||||
if (view->listens != NULL) {
|
||||
dns_c_lstnlist_print(fp, indent + 1, view->listens);
|
||||
}
|
||||
|
||||
if (view->ordering != NULL) {
|
||||
dns_c_rrsolist_print(fp, indent + 1, view->ordering);
|
||||
}
|
||||
@@ -821,10 +818,6 @@ dns_c_view_delete(dns_c_view_t **viewptr)
|
||||
if (view->topology != NULL)
|
||||
dns_c_ipmatchlist_detach(&view->topology);
|
||||
|
||||
if (view->listens != NULL) {
|
||||
dns_c_lstnlist_delete(&view->listens);
|
||||
}
|
||||
|
||||
if (view->ordering != NULL) {
|
||||
dns_c_rrsolist_delete(&view->ordering);
|
||||
}
|
||||
@@ -875,53 +868,6 @@ dns_c_view_addzone(dns_c_view_t *view, dns_c_zone_t *zone)
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_addlisten_on(dns_c_view_t *view, in_port_t port,
|
||||
dns_c_ipmatchlist_t *ml,
|
||||
isc_boolean_t copy)
|
||||
{
|
||||
dns_c_lstnon_t *lo;
|
||||
isc_result_t res;
|
||||
|
||||
REQUIRE(DNS_C_VIEW_VALID(view));
|
||||
|
||||
if (view->listens == NULL) {
|
||||
res = dns_c_lstnlist_new(view->mem, &view->listens);
|
||||
if (res != ISC_R_SUCCESS) {
|
||||
return (res);
|
||||
}
|
||||
}
|
||||
|
||||
res = dns_c_lstnon_new(view->mem, &lo);
|
||||
if (res != ISC_R_SUCCESS) {
|
||||
return (res);
|
||||
}
|
||||
|
||||
lo->port = port;
|
||||
res = dns_c_lstnon_setiml(lo, ml, copy);
|
||||
|
||||
ISC_LIST_APPEND(view->listens->elements, lo, next);
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getlistenlist(dns_c_view_t *view, dns_c_lstnlist_t **ll)
|
||||
{
|
||||
REQUIRE(DNS_C_VIEW_VALID(view));
|
||||
REQUIRE(ll != NULL);
|
||||
|
||||
*ll = NULL;
|
||||
|
||||
if (view->listens != NULL) {
|
||||
*ll = view->listens;
|
||||
}
|
||||
|
||||
return (*ll == NULL ? ISC_R_NOTFOUND : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t dns_c_view_setrrsetorderlist(dns_c_view_t *view,
|
||||
isc_boolean_t copy,
|
||||
dns_c_rrsolist_t *olist)
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confzone.c,v 1.33 2000/03/28 22:58:25 brister Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
|
||||
@@ -123,8 +123,6 @@ struct dns_c_view
|
||||
|
||||
dns_c_iplist_t *forwarders;
|
||||
|
||||
dns_c_lstnlist_t *listens;
|
||||
|
||||
dns_c_rrsolist_t *ordering;
|
||||
|
||||
dns_severity_t check_names[DNS_C_TRANSCOUNT];
|
||||
@@ -364,9 +362,6 @@ isc_result_t dns_c_view_setsortlist(dns_c_view_t *view,
|
||||
isc_result_t dns_c_view_settopology(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_view_addlisten_on(dns_c_view_t *view, in_port_t port,
|
||||
dns_c_ipmatchlist_t *ml,
|
||||
isc_boolean_t copy);
|
||||
isc_result_t dns_c_view_setrrsetorderlist(dns_c_view_t *view,
|
||||
isc_boolean_t copy,
|
||||
dns_c_rrsolist_t *olist);
|
||||
@@ -393,8 +388,6 @@ isc_result_t dns_c_view_getsortlist(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **ipml);
|
||||
isc_result_t dns_c_view_gettopology(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **ipml);
|
||||
isc_result_t dns_c_view_getlistenlist(dns_c_view_t *cfg,
|
||||
dns_c_lstnlist_t **ll);
|
||||
isc_result_t dns_c_view_getrrsetorderlist(dns_c_view_t *view,
|
||||
dns_c_rrsolist_t **olist);
|
||||
isc_result_t dns_c_view_getchecknames(dns_c_view_t *view,
|
||||
|
||||
Reference in New Issue
Block a user