diff --git a/doc/Changelog b/doc/Changelog index 78f7df246..abe454bf3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +3 February 2012: Wouter + - fix for windows, rename() is not posix compliant on windows. + 2 February 2012: Wouter - 1.4.16 release tag. - svn trunk is 1.4.17 in development. diff --git a/validator/autotrust.c b/validator/autotrust.c index 8c3a7c672..989694324 100644 --- a/validator/autotrust.c +++ b/validator/autotrust.c @@ -996,6 +996,9 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp) /* success; overwrite actual file */ fclose(out); verbose(VERB_ALGO, "autotrust: replaced %s", fname); +#ifdef UB_ON_WINDOWS + (void)unlink(fname); /* windows does not replace file with rename() */ +#endif if(rename(tempf, fname) < 0) { log_err("rename(%s to %s): %s", tempf, fname, strerror(errno)); }