From 0e858455d8f152bf4cbab6965ae535a1da9249d2 Mon Sep 17 00:00:00 2001 From: James Brister Date: Tue, 7 Mar 2000 21:16:38 +0000 Subject: [PATCH] Make sure ssuauth table only goes in master zones. --- lib/dns/config/confzone.c | 32 ++++++++++++-------------------- lib/dns/include/dns/confzone.h | 2 -- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/lib/dns/config/confzone.c b/lib/dns/config/confzone.c index 07ee00bcea..ae9612d19d 100644 --- a/lib/dns/config/confzone.c +++ b/lib/dns/config/confzone.c @@ -743,11 +743,15 @@ dns_c_zone_setssuauth(dns_c_zone_t *zone, dns_ssutable_t *ssu) break; case dns_c_zone_slave: - p = &zone->u.szone.ssuauth; + isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG, + DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL, + "Slave zones do not have an ssuauth field"); break; case dns_c_zone_stub: - p = &zone->u.tzone.ssuauth; + isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG, + DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL, + "Stub zones do not have an ssuauth field"); break; case dns_c_zone_hint: @@ -1970,11 +1974,15 @@ dns_c_zone_getssuauth(dns_c_zone_t *zone, dns_ssutable_t **retval) break; case dns_c_zone_slave: - p = zone->u.szone.ssuauth; + isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG, + DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL, + "Slave zones do not have an ssuauth field"); break; case dns_c_zone_stub: - p = zone->u.tzone.ssuauth; + isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG, + DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL, + "Stub zones do not have an ssuauth field"); break; case dns_c_zone_hint: @@ -3339,10 +3347,6 @@ slave_zone_print(FILE *fp, int indent, fprintf(fp, ";\n"); } - if (szone->ssuauth != NULL) { - dns_c_ssutable_print(fp, indent, szone->ssuauth); - } - if (szone->allow_update_forwarding != NULL && !ISC_LIST_EMPTY(szone->allow_update_forwarding->elements)) { dns_c_printtabs(fp, indent); @@ -3493,10 +3497,6 @@ stub_zone_print(FILE *fp, int indent, dns_c_stubzone_t *tzone) fprintf(fp, ";\n"); } - if (tzone->ssuauth != NULL) { - dns_c_ssutable_print(fp, indent, tzone->ssuauth); - } - if (tzone->allow_update_forwarding != NULL && !ISC_LIST_EMPTY(tzone->allow_update_forwarding->elements)) { dns_c_printtabs(fp, indent); @@ -3649,7 +3649,6 @@ slave_zone_init(dns_c_slavezone_t *szone) szone->ixfr_tmp = NULL; szone->master_ips = NULL; szone->allow_update = NULL; - szone->ssuauth = NULL; szone->allow_update_forwarding = NULL; szone->allow_query = NULL; szone->allow_transfer = NULL; @@ -3671,7 +3670,6 @@ stub_zone_init(dns_c_stubzone_t *tzone) tzone->file = NULL; tzone->master_ips = NULL; tzone->allow_update = NULL; - tzone->ssuauth = NULL; tzone->allow_update_forwarding = NULL; tzone->allow_query = NULL; tzone->allow_transfer = NULL; @@ -3829,9 +3827,6 @@ slave_zone_clear(isc_mem_t *mem, dns_c_slavezone_t *szone) if (szone->allow_update != NULL) dns_c_ipmatchlist_detach(&szone->allow_update); - if (szone->ssuauth != NULL) - dns_ssutable_detach(&szone->ssuauth); - if (szone->allow_update_forwarding != NULL) dns_c_ipmatchlist_detach(&szone->allow_update_forwarding); @@ -3874,9 +3869,6 @@ stub_zone_clear(isc_mem_t *mem, dns_c_stubzone_t *tzone) if (tzone->allow_update != NULL) dns_c_ipmatchlist_detach(&tzone->allow_update); - if (tzone->ssuauth != NULL) - dns_ssutable_detach(&tzone->ssuauth); - if (tzone->allow_update_forwarding != NULL) dns_c_ipmatchlist_detach(&tzone->allow_update_forwarding); diff --git a/lib/dns/include/dns/confzone.h b/lib/dns/include/dns/confzone.h index 8bc76122a9..bbf8650849 100644 --- a/lib/dns/include/dns/confzone.h +++ b/lib/dns/include/dns/confzone.h @@ -145,7 +145,6 @@ struct dns_c_slave_zone dns_severity_t check_names; dns_c_ipmatchlist_t *allow_update; dns_c_ipmatchlist_t *allow_update_forwarding; - dns_ssutable_t *ssuauth; dns_c_ipmatchlist_t *allow_query; dns_c_ipmatchlist_t *allow_transfer; dns_c_iplist_t *also_notify; @@ -178,7 +177,6 @@ struct dns_c_stub_zone dns_severity_t check_names; dns_c_ipmatchlist_t *allow_update; /* should be here??? */ dns_c_ipmatchlist_t *allow_update_forwarding; - dns_ssutable_t *ssuauth; dns_c_ipmatchlist_t *allow_query; dns_c_ipmatchlist_t *allow_transfer; /* should be here??? */ isc_boolean_t dialup;