]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix auth zone download on windows to unlink before rename.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 13:31:33 +0000 (15:31 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Jun 2021 13:31:33 +0000 (15:31 +0200)
doc/Changelog
services/authzone.c

index 5f14d9683d90ad00fd1d84a1a84de8ee1ba635b6..f4b1295b2c307f28e15ce1a7bdda40de44462029 100644 (file)
@@ -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.
index 0f9879ce79deecafd7f67149bb9c912096afb040..c1567aecb218934270efc26d196c43abd233e712 100644 (file)
@@ -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));