2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

1530. [bug] It was possible to trigger a INSIST() failure if a

slave master file was removed a just the correct
                        moment. [RT #9462]
This commit is contained in:
Mark Andrews 2003-11-04 05:23:31 +00:00
parent 2eb9c41504
commit 6f80859318
2 changed files with 30 additions and 25 deletions

View File

@ -1,3 +1,7 @@
1530. [bug] It was possible to trigger a INSIST() failure if a
slave master file was removed a just the correct
moment. [RT #9462]
1529. [bug] "notify explict;" failed to log that NOTIFY messages
were being sent for the zone.

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zone.c,v 1.401 2003/11/03 23:40:24 marka Exp $ */
/* $Id: zone.c,v 1.402 2003/11/04 05:23:31 marka Exp $ */
#include <config.h>
@ -5275,30 +5275,6 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
*/
if (zone->db == NULL)
goto same_master;
/*
* This is not neccessary if we just performed a AXFR
* however it is necessary for an IXFR / UPTODATE and
* won't hurt with an AXFR.
*/
if (zone->masterfile != NULL || zone->journal != NULL) {
result = ISC_R_FAILURE;
if (zone->journal != NULL)
result = isc_file_settime(zone->journal, &now);
if (result != ISC_R_SUCCESS &&
zone->masterfile != NULL)
result = isc_file_settime(zone->masterfile,
&now);
/* Someone removed the file from underneath us! */
if (result == ISC_R_FILENOTFOUND &&
zone->masterfile != NULL)
zone_needdump(zone, DNS_DUMP_DELAY);
else if (result != ISC_R_SUCCESS)
dns_zone_log(zone, ISC_LOG_ERROR,
"transfer: could not set file "
"modification time of '%s': %s",
zone->masterfile,
dns_result_totext(result));
}
/*
* Update the zone structure's data from the actual
@ -5361,6 +5337,31 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
zone->serial, buf);
}
/*
* This is not neccessary if we just performed a AXFR
* however it is necessary for an IXFR / UPTODATE and
* won't hurt with an AXFR.
*/
if (zone->masterfile != NULL || zone->journal != NULL) {
result = ISC_R_FAILURE;
if (zone->journal != NULL)
result = isc_file_settime(zone->journal, &now);
if (result != ISC_R_SUCCESS &&
zone->masterfile != NULL)
result = isc_file_settime(zone->masterfile,
&now);
/* Someone removed the file from underneath us! */
if (result == ISC_R_FILENOTFOUND &&
zone->masterfile != NULL)
zone_needdump(zone, DNS_DUMP_DELAY);
else if (result != ISC_R_SUCCESS)
dns_zone_log(zone, ISC_LOG_ERROR,
"transfer: could not set file "
"modification time of '%s': %s",
zone->masterfile,
dns_result_totext(result));
}
break;
case DNS_R_BADIXFR: