[Opendnssec-develop] zonefetcher
sion at nominet.org.uk
sion at nominet.org.uk
Tue Dec 8 14:36:46 UTC 2009
I _think_ that I have a fix for the zonefetcher...
As I do not like changing other peoples code could someone assure me that
what I have done is sane? It seems too simple. All I do is close the output
file before it is moved (I think that this is especially important on ext4
filesystems).
sion at virtual-sion-9:~/temp/opendnssec/trunk/OpenDNSSEC/signer$ svn diff
tools/zone_fetcher.c
Index: tools/zone_fetcher.c
===================================================================
--- tools/zone_fetcher.c (revision 2579)
+++ tools/zone_fetcher.c (working copy)
@@ -911,6 +911,7 @@
axfr_rr = ldns_axfr_next(config->xfrd);
if (!axfr_rr) {
log_msg(LOG_ERR, "zone fetcher AXFR for %s failed",
zone->name);
+ fclose(fd);
unlink(axfr_file);
return -1;
}
@@ -930,6 +931,9 @@
log_msg(LOG_INFO, "zone fetcher transferred zone %s serial %u
"
"successfully", zone->name, new_serial);
+ /* Close file before moving it - Sion */
+ fclose(fd);
+
/* moving and kicking */
strlength = strlen("mv ") + strlen(axfr_file) + 1 +
strlen(zone->input_file) + strlen(".axfr");
@@ -981,7 +985,6 @@
}
}
free((void*)axfr_file);
- fclose(fd);
}
else {
log_msg(LOG_INFO, "zone fetcher zone %s is already up to date, "
Also, are fixes going into trunk, or a branch at the moment?
Cheers,
Sion
More information about the Opendnssec-develop
mailing list