mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
756. [bug] dns_zone_load() could "return" success when no master
file was configured. 755. [bug] Fix format bugs in zone.c (non-exploitable).
This commit is contained in:
parent
378eb78ae0
commit
a93cf7e83b
4
CHANGES
4
CHANGES
@ -1,3 +1,7 @@
|
|||||||
|
756. [bug] dns_zone_load() could "return" success when no master
|
||||||
|
file was configured.
|
||||||
|
|
||||||
|
755. [bug] Fix format bugs in zone.c (non-exploitable).
|
||||||
|
|
||||||
754. [bug] Certain failure returns from sendto() could
|
754. [bug] Certain failure returns from sendto() could
|
||||||
cause the server to retry the transmission
|
cause the server to retry the transmission
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: result.h,v 1.77 2001/01/09 21:53:24 bwelling Exp $ */
|
/* $Id: result.h,v 1.78 2001/02/26 01:45:56 marka Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_RESULT_H
|
#ifndef DNS_RESULT_H
|
||||||
#define DNS_RESULT_H 1
|
#define DNS_RESULT_H 1
|
||||||
@ -110,8 +110,9 @@
|
|||||||
#define DNS_R_CNAMEANDOTHER (ISC_RESULTCLASS_DNS + 71)
|
#define DNS_R_CNAMEANDOTHER (ISC_RESULTCLASS_DNS + 71)
|
||||||
#define DNS_R_SINGLETON (ISC_RESULTCLASS_DNS + 72)
|
#define DNS_R_SINGLETON (ISC_RESULTCLASS_DNS + 72)
|
||||||
#define DNS_R_HINTNXRRSET (ISC_RESULTCLASS_DNS + 73)
|
#define DNS_R_HINTNXRRSET (ISC_RESULTCLASS_DNS + 73)
|
||||||
|
#define DNS_R_NOMASTERFILE (ISC_RESULTCLASS_DNS + 74)
|
||||||
|
|
||||||
#define DNS_R_NRESULTS 74 /* Number of results */
|
#define DNS_R_NRESULTS 75 /* Number of results */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DNS wire format rcodes.
|
* DNS wire format rcodes.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.h,v 1.99 2001/02/14 03:50:14 gson Exp $ */
|
/* $Id: zone.h,v 1.100 2001/02/26 01:45:57 marka Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_ZONE_H
|
#ifndef DNS_ZONE_H
|
||||||
#define DNS_ZONE_H 1
|
#define DNS_ZONE_H 1
|
||||||
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <isc/formatcheck.h>
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
#include <isc/rwlock.h>
|
#include <isc/rwlock.h>
|
||||||
|
|
||||||
@ -1287,7 +1288,8 @@ dns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
dns_zone_log(dns_zone_t *zone, int level, const char *msg, ...);
|
dns_zone_log(dns_zone_t *zone, int level, const char *msg, ...)
|
||||||
|
ISC_FORMAT_PRINTF(3, 4);
|
||||||
/*
|
/*
|
||||||
* Log the message 'msg...' at 'level', including text that identifies
|
* Log the message 'msg...' at 'level', including text that identifies
|
||||||
* the message as applying to 'zone'.
|
* the message as applying to 'zone'.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: result.c,v 1.85 2001/01/09 21:51:29 bwelling Exp $ */
|
/* $Id: result.c,v 1.86 2001/02/26 01:45:53 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -113,7 +113,8 @@ static const char *text[DNS_R_NRESULTS] = {
|
|||||||
|
|
||||||
"CNAME and other data", /* 71 DNS_R_CNAMEANDOTHER */
|
"CNAME and other data", /* 71 DNS_R_CNAMEANDOTHER */
|
||||||
"multiple RRs of singleton type", /* 72 DNS_R_SINGLETON */
|
"multiple RRs of singleton type", /* 72 DNS_R_SINGLETON */
|
||||||
"hint nxrrset" /* 73 DNS_R_HINTNXRRSET */
|
"hint nxrrset", /* 73 DNS_R_HINTNXRRSET */
|
||||||
|
"no master file configured" /* 74 DNS_R_NOMASTERFILE */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *rcode_text[DNS_R_NRCODERESULTS] = {
|
static const char *rcode_text[DNS_R_NRCODERESULTS] = {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.c,v 1.309 2001/02/24 00:58:53 bwelling Exp $ */
|
/* $Id: zone.c,v 1.310 2001/02/26 01:45:54 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -967,11 +967,15 @@ dns_zone_load(dns_zone_t *zone) {
|
|||||||
if (zone->masterfile != NULL) {
|
if (zone->masterfile != NULL) {
|
||||||
result = zone_startload(db, zone, loadtime);
|
result = zone_startload(db, zone, loadtime);
|
||||||
} else {
|
} else {
|
||||||
|
result = DNS_R_NOMASTERFILE;
|
||||||
if (zone->type == dns_zone_master) {
|
if (zone->type == dns_zone_master) {
|
||||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||||
"loading zone: ",
|
"loading zone: "
|
||||||
"no master file configured");
|
"no master file configured");
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
dns_zone_log(zone, ISC_LOG_INFO, "loading zone: "
|
||||||
|
"no master file configured: continuing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,7 +1112,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
|
|||||||
if (result == ISC_R_FILENOTFOUND)
|
if (result == ISC_R_FILENOTFOUND)
|
||||||
dns_zone_log(zone, ISC_LOG_DEBUG(1),
|
dns_zone_log(zone, ISC_LOG_DEBUG(1),
|
||||||
"no master file");
|
"no master file");
|
||||||
else
|
else if (result != DNS_R_NOMASTERFILE)
|
||||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||||
"loading master file %s: %s",
|
"loading master file %s: %s",
|
||||||
zone->masterfile,
|
zone->masterfile,
|
||||||
@ -2828,7 +2832,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
|
|||||||
dns_zone_log(zone, ISC_LOG_INFO,
|
dns_zone_log(zone, ISC_LOG_INFO,
|
||||||
"refreshing stub: "
|
"refreshing stub: "
|
||||||
"unexpected rcode (%.*s) from %s",
|
"unexpected rcode (%.*s) from %s",
|
||||||
rb.used, rcode, master);
|
(int)rb.used, rcode, master);
|
||||||
goto next_master;
|
goto next_master;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2853,8 +2857,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
|
|||||||
* If non-auth log and next master.
|
* If non-auth log and next master.
|
||||||
*/
|
*/
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_AA) == 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_AA) == 0) {
|
||||||
dns_zone_log(zone, ISC_LOG_INFO,
|
dns_zone_log(zone, ISC_LOG_INFO, "refreshing stub: "
|
||||||
"refreshing stub: ",
|
|
||||||
"non-authorative answer from master %s", master);
|
"non-authorative answer from master %s", master);
|
||||||
goto next_master;
|
goto next_master;
|
||||||
}
|
}
|
||||||
@ -3037,7 +3040,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
|
|||||||
|
|
||||||
dns_zone_log(zone, ISC_LOG_INFO,
|
dns_zone_log(zone, ISC_LOG_INFO,
|
||||||
"refresh: unexpected rcode (%.*s) from master %s",
|
"refresh: unexpected rcode (%.*s) from master %s",
|
||||||
rb.used, rcode, master);
|
(int)rb.used, rcode, master);
|
||||||
goto next_master;
|
goto next_master;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4863,7 +4866,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
|
|||||||
}
|
}
|
||||||
if (use_ixfr == ISC_FALSE) {
|
if (use_ixfr == ISC_FALSE) {
|
||||||
dns_zone_log(zone, ISC_LOG_DEBUG(3),
|
dns_zone_log(zone, ISC_LOG_DEBUG(3),
|
||||||
"IXFR disabled, ",
|
"IXFR disabled, "
|
||||||
"requesting AXFR from %s",
|
"requesting AXFR from %s",
|
||||||
mastertext);
|
mastertext);
|
||||||
xfrtype = dns_rdatatype_axfr;
|
xfrtype = dns_rdatatype_axfr;
|
||||||
@ -5041,7 +5044,7 @@ forward_callback(isc_task_t *task, isc_event_t *event) {
|
|||||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||||
"forwarding dynamic update: "
|
"forwarding dynamic update: "
|
||||||
"unexpected response: master %s returned: %.*s",
|
"unexpected response: master %s returned: %.*s",
|
||||||
master, rb.used, rcode);
|
master, (int)rb.used, rcode);
|
||||||
goto next_master;
|
goto next_master;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user