645. [bug] named could trigger a REQUIRE failure if multiple

masters with keys are specified.
This commit is contained in:
Mark Andrews 2004-05-29 00:01:17 +00:00
parent 4c7910ecc0
commit a5c92ceae0
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,6 @@
1645. [bug] named could trigger a REQUIRE failure if multiple
masters with keys are specified.
1643. [bug] dns_db_closeversion() could leak memory / node
references. [RT #11163]

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zone.c,v 1.333.2.23.2.45 2004/04/29 01:45:23 marka Exp $ */
/* $Id: zone.c,v 1.333.2.23.2.46 2004/05/29 00:01:17 marka Exp $ */
#include <config.h>
@ -3618,7 +3618,12 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
dns_message_destroy(&msg);
} else if (isc_serial_eq(soa.serial, zone->serial)) {
if (zone->masterfile != NULL) {
result = isc_file_settime(zone->masterfile, &now);
result = ISC_R_FAILURE;
if (zone->journal != NULL)
result = isc_file_settime(zone->journal, &now);
if (result != ISC_R_SUCCESS)
result = isc_file_settime(zone->masterfile,
&now);
/* Someone removed the file from underneath us! */
if (result == ISC_R_FILENOTFOUND) {
LOCK_ZONE(zone);
@ -3986,6 +3991,8 @@ soa_query(isc_task_t *task, isc_event_t *event) {
return;
skip_master:
if (key != NULL)
dns_tsigkey_detach(&key);
zone->curmaster++;
if (zone->curmaster < zone->masterscnt)
goto again;