From: W.C.A. Wijngaards Date: Fri, 25 Jun 2021 13:31:33 +0000 (+0200) Subject: - Fix auth zone download on windows to unlink before rename. X-Git-Tag: release-1.13.2rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5c3f51a2880b8a93219f4a5d605bf9ecc56622;p=thirdparty%2Funbound.git - Fix auth zone download on windows to unlink before rename. --- diff --git a/doc/Changelog b/doc/Changelog index 5f14d9683..f4b1295b2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,8 @@ - Fix configure grep for reuseport default for failure. - Fix compat ctime_r return value - Fix configure does not require pkg-config if not needed. + - Fix unit test in the ctime_r calls for autotrust and in testbound. + - Fix auth zone download on windows to unlink before rename. 24 June 2021: Wouter - Add analyzer and port compile github workflow. diff --git a/services/authzone.c b/services/authzone.c index 0f9879ce7..c1567aecb 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -5152,6 +5152,9 @@ xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env) lock_rw_unlock(&z->lock); return; } +#ifdef UB_ON_WINDOWS + (void)unlink(zfilename); /* windows does not replace file with rename() */ +#endif if(rename(tmpfile, zfilename) < 0) { log_err("could not rename(%s, %s): %s", tmpfile, zfilename, strerror(errno));