2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Changes to dns_c_zone_* function signatures.

This commit is contained in:
James Brister
1999-10-02 21:15:20 +00:00
parent 249aa1914b
commit f9dcff45e2

View File

@@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: zone.c,v 1.14 1999/10/02 02:58:31 tale Exp $ */ /* $Id: zone.c,v 1.15 1999/10/02 21:15:20 brister Exp $ */
#include <config.h> #include <config.h>
@@ -2172,7 +2172,8 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
switch (czone->ztype) { switch (czone->ztype) {
case dns_c_zone_master: case dns_c_zone_master:
iresult = dns_c_zone_getfile(czone, &filename); iresult = dns_c_zone_getfile(NULL /* isc_log_t */,
czone, &filename);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
return (iresult); return (iresult);
@@ -2180,46 +2181,53 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
return (iresult); return (iresult);
iresult = dns_c_zone_getchecknames(czone, &severity); iresult = dns_c_zone_getchecknames(NULL /* isc_log_t */,
czone, &severity);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity); dns_zone_setchecknames(zone, severity);
else else
dns_zone_setchecknames(zone, dns_c_severity_fail); dns_zone_setchecknames(zone, dns_c_severity_fail);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowupd(czone, &acl); iresult = dns_c_zone_getallowupd(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setupdateacl(zone, acl); dns_zone_setupdateacl(zone, acl);
else else
dns_zone_clearupdateacl(zone); dns_zone_clearupdateacl(zone);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowquery(czone, &acl); iresult = dns_c_zone_getallowquery(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl); dns_zone_setqueryacl(zone, acl);
else else
dns_zone_clearqueryacl(zone); dns_zone_clearqueryacl(zone);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowtransfer(czone, &acl); iresult = dns_c_zone_getallowtransfer(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setxfracl(zone, acl); dns_zone_setxfracl(zone, acl);
else else
dns_zone_clearxfracl(zone); dns_zone_clearxfracl(zone);
iresult = dns_c_zone_getdialup(czone, &boolean); iresult = dns_c_zone_getdialup(NULL /* isc_log_t */,
czone, &boolean);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean); dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean);
else else
dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP); dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP);
iresult = dns_c_zone_getnotify(czone, &boolean); iresult = dns_c_zone_getnotify(NULL /* isc_log_t */,
czone, &boolean);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean); dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean);
else else
dns_zone_clearoption(zone, DNS_ZONE_O_NOTIFY); dns_zone_clearoption(zone, DNS_ZONE_O_NOTIFY);
iresult = dns_c_zone_getalsonotify(czone, &iplist); iresult = dns_c_zone_getalsonotify(NULL /* isc_log_t */,
czone, &iplist);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) { for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s; isc_sockaddr_t s;
@@ -2232,7 +2240,8 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else } else
dns_zone_clearnotify(zone); dns_zone_clearnotify(zone);
iresult = dns_c_zone_getixfrbase(czone, &ixfr); iresult = dns_c_zone_getixfrbase(NULL /* isc_log_t */,
czone, &ixfr);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
result = dns_zone_setixfrlog(zone, ixfr); result = dns_zone_setixfrlog(zone, ixfr);
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
@@ -2240,12 +2249,14 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} }
czone->u.mzone.ixfr_tmp; /*XXX*/ czone->u.mzone.ixfr_tmp; /*XXX*/
iresult = dns_c_zone_getmaxixfrlog(czone, &size); iresult = dns_c_zone_getmaxixfrlog(NULL /* isc_log_t */,
czone, &size);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setixfrlogsize(zone, size); dns_zone_setixfrlogsize(zone, size);
czone->u.mzone.maint_ixfr_base; /*XXX*/ czone->u.mzone.maint_ixfr_base; /*XXX*/
iresult = dns_c_zone_getpubkey(czone, &pubkey); iresult = dns_c_zone_getpubkey(NULL /* isc_log_t */,
czone, &pubkey);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey); dns_zone_setpubkey(zone, pubkey);
else else
@@ -2253,54 +2264,62 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break; break;
case dns_c_zone_slave: case dns_c_zone_slave:
iresult = dns_c_zone_getfile(czone, &filename); iresult = dns_c_zone_getfile(NULL /* isc_log_t */,
czone, &filename);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
return (iresult); return (iresult);
result = dns_zone_setdatabase(zone, filename); result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
return (iresult); return (iresult);
iresult = dns_c_zone_getchecknames(czone, &severity); iresult = dns_c_zone_getchecknames(NULL /* isc_log_t */,
czone, &severity);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity); dns_zone_setchecknames(zone, severity);
else else
dns_zone_setchecknames(zone, dns_c_severity_warn); dns_zone_setchecknames(zone, dns_c_severity_warn);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowupd(czone, &acl); iresult = dns_c_zone_getallowupd(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setupdateacl(zone, acl); dns_zone_setupdateacl(zone, acl);
else else
dns_zone_clearupdateacl(zone); dns_zone_clearupdateacl(zone);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowquery(czone, &acl); iresult = dns_c_zone_getallowquery(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl); dns_zone_setqueryacl(zone, acl);
else else
dns_zone_clearqueryacl(zone); dns_zone_clearqueryacl(zone);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowtransfer(czone, &acl); iresult = dns_c_zone_getallowtransfer(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setxfracl(zone, acl); dns_zone_setxfracl(zone, acl);
else else
dns_zone_clearxfracl(zone); dns_zone_clearxfracl(zone);
iresult = dns_c_zone_getdialup(czone, &boolean); iresult = dns_c_zone_getdialup(NULL /* isc_log_t */,
czone, &boolean);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean); dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean);
else else
dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP); dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP);
/* notify is off by default for slave zones */ /* notify is off by default for slave zones */
iresult = dns_c_zone_getnotify(czone, &boolean); iresult = dns_c_zone_getnotify(NULL /* isc_log_t */,
czone, &boolean);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean); dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean);
else else
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, ISC_FALSE); dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, ISC_FALSE);
iresult = dns_c_zone_getalsonotify(czone, &iplist); iresult = dns_c_zone_getalsonotify(NULL /* isc_log_t */,
czone, &iplist);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) { for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s; isc_sockaddr_t s;
@@ -2313,34 +2332,40 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else } else
dns_zone_clearnotify(zone); dns_zone_clearnotify(zone);
iresult = dns_c_zone_getixfrbase(czone, &ixfr); iresult = dns_c_zone_getixfrbase(NULL /* isc_log_t */,
czone, &ixfr);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
result = dns_zone_setixfrlog(zone, ixfr); result = dns_zone_setixfrlog(zone, ixfr);
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
return (result); return (result);
} }
/* czone->u.szone.ixfr_tmp; XXX*/ /* czone->u.szone.ixfr_tmp; XXX*/
iresult = dns_c_zone_getmaxixfrlog(czone, &size); iresult = dns_c_zone_getmaxixfrlog(NULL /* isc_log_t */,
czone, &size);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setixfrlogsize(zone, size); dns_zone_setixfrlogsize(zone, size);
czone->u.szone.maint_ixfr_base; /*XXX*/ czone->u.szone.maint_ixfr_base; /*XXX*/
iresult = dns_c_zone_getpubkey(czone, &pubkey); iresult = dns_c_zone_getpubkey(NULL /* isc_log_t */,
czone, &pubkey);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey); dns_zone_setpubkey(zone, pubkey);
else else
dns_c_zone_getpubkey(czone, NULL); dns_c_zone_getpubkey(NULL /* isc_log_t */,
czone, NULL);
/* /*
* should master port be seperate or just applied to * should master port be seperate or just applied to
* isc_sockaddr_t's * isc_sockaddr_t's
*/ */
iresult = dns_c_zone_getmasterport(czone, &port); iresult = dns_c_zone_getmasterport(NULL /* isc_log_t */,
czone, &port);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
port = 53; port = 53;
dns_zone_setmasterport(zone, port); dns_zone_setmasterport(zone, port);
iresult = dns_c_zone_getmasterips(czone, &iplist); iresult = dns_c_zone_getmasterips(NULL /* isc_log_t */,
czone, &iplist);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) { for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s; isc_sockaddr_t s;
@@ -2353,7 +2378,8 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else } else
dns_zone_clearmasters(zone); dns_zone_clearmasters(zone);
iresult = dns_c_zone_gettransfersource(czone, &addr); iresult = dns_c_zone_gettransfersource(NULL /* isc_log_t */,
czone, &addr);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
isc_sockaddr_t s; isc_sockaddr_t s;
@@ -2363,7 +2389,8 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
return (result); return (result);
} }
iresult = dns_c_zone_getmaxtranstimein(czone, &xfrtime); iresult = dns_c_zone_getmaxtranstimein(NULL /* isc_log_t */,
czone, &xfrtime);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setxfrtime(zone, xfrtime); dns_zone_setxfrtime(zone, xfrtime);
else else
@@ -2382,38 +2409,44 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break; break;
case dns_c_zone_stub: case dns_c_zone_stub:
iresult = dns_c_zone_getfile(czone, &filename); iresult = dns_c_zone_getfile(NULL /* isc_log_t */,
czone, &filename);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
return (iresult); return (iresult);
result = dns_zone_setdatabase(zone, filename); result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
return (iresult); return (iresult);
iresult = dns_c_zone_getchecknames(czone, &severity); iresult = dns_c_zone_getchecknames(NULL /* isc_log_t */,
czone, &severity);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity); dns_zone_setchecknames(zone, severity);
else else
dns_zone_setchecknames(zone, dns_c_severity_warn); dns_zone_setchecknames(zone, dns_c_severity_warn);
acl = NULL; acl = NULL;
iresult = dns_c_zone_getallowquery(czone, &acl); iresult = dns_c_zone_getallowquery(NULL /* isc_log_t */,
czone, &acl);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl); dns_zone_setqueryacl(zone, acl);
else else
dns_zone_clearqueryacl(zone); dns_zone_clearqueryacl(zone);
iresult = dns_c_zone_getpubkey(czone, &pubkey); iresult = dns_c_zone_getpubkey(NULL /* isc_log_t */,
czone, &pubkey);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey); dns_zone_setpubkey(zone, pubkey);
else else
dns_zone_setpubkey(zone, NULL); dns_zone_setpubkey(zone, NULL);
iresult = dns_c_zone_getmasterport(czone, &port); iresult = dns_c_zone_getmasterport(NULL /* isc_log_t */,
czone, &port);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
port = 53; port = 53;
dns_zone_setmasterport(zone, port); dns_zone_setmasterport(zone, port);
iresult = dns_c_zone_getmasterips(czone, &iplist); iresult = dns_c_zone_getmasterips(NULL /* isc_log_t */,
czone, &iplist);
if (iresult == ISC_R_SUCCESS) { if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) { for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s; isc_sockaddr_t s;
@@ -2429,20 +2462,23 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break; break;
case dns_c_zone_hint: case dns_c_zone_hint:
iresult = dns_c_zone_getfile(czone, &filename); iresult = dns_c_zone_getfile(NULL /* isc_log_t */,
czone, &filename);
if (iresult != ISC_R_SUCCESS) if (iresult != ISC_R_SUCCESS)
return (iresult); return (iresult);
result = dns_zone_setdatabase(zone, filename); result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS) if (result != DNS_R_SUCCESS)
return (result); return (result);
iresult = dns_c_zone_getchecknames(czone, &severity); iresult = dns_c_zone_getchecknames(NULL /* isc_log_t */,
czone, &severity);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity); dns_zone_setchecknames(zone, severity);
else else
dns_zone_setchecknames(zone, dns_c_severity_fail); dns_zone_setchecknames(zone, dns_c_severity_fail);
iresult = dns_c_zone_getpubkey(czone, &pubkey); iresult = dns_c_zone_getpubkey(NULL /* isc_log_t */,
czone, &pubkey);
if (iresult == ISC_R_SUCCESS) if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey); dns_zone_setpubkey(zone, pubkey);
else else
@@ -2460,8 +2496,10 @@ dns_zone_setqueryacl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->query_acl != NULL) if (zone->query_acl != NULL)
dns_c_ipmatchlist_delete(&zone->query_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
zone->query_acl = dns_c_ipmatchlist_attach(acl); &zone->query_acl);
zone->query_acl = dns_c_ipmatchlist_attach(NULL /* isc_log_t */,
acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }
@@ -2472,8 +2510,10 @@ dns_zone_setupdateacl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->update_acl != NULL) if (zone->update_acl != NULL)
dns_c_ipmatchlist_delete(&zone->update_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
zone->update_acl = dns_c_ipmatchlist_attach(acl); &zone->update_acl);
zone->update_acl = dns_c_ipmatchlist_attach(NULL /* isc_log_t */,
acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }
@@ -2484,8 +2524,10 @@ dns_zone_setxfracl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->xfr_acl != NULL) if (zone->xfr_acl != NULL)
dns_c_ipmatchlist_delete(&zone->xfr_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
zone->xfr_acl = dns_c_ipmatchlist_attach(acl); &zone->xfr_acl);
zone->xfr_acl = dns_c_ipmatchlist_attach(NULL /* isc_log_t */,
acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }
@@ -2520,7 +2562,8 @@ dns_zone_clearupdateacl(dns_zone_t *zone) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->update_acl != NULL) if (zone->update_acl != NULL)
dns_c_ipmatchlist_delete(&zone->update_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
&zone->update_acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }
@@ -2531,7 +2574,8 @@ dns_zone_clearqueryacl(dns_zone_t *zone) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->query_acl != NULL) if (zone->query_acl != NULL)
dns_c_ipmatchlist_delete(&zone->query_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
&zone->query_acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }
@@ -2542,7 +2586,8 @@ dns_zone_clearxfracl(dns_zone_t *zone) {
LOCK(&zone->lock); LOCK(&zone->lock);
if (zone->xfr_acl != NULL) if (zone->xfr_acl != NULL)
dns_c_ipmatchlist_delete(&zone->xfr_acl); dns_c_ipmatchlist_delete(NULL /* isc_log_t */,
&zone->xfr_acl);
UNLOCK(&zone->lock); UNLOCK(&zone->lock);
} }