mirror of
https://github.com/monero-project/monero.git
synced 2025-08-19 08:07:58 -04:00
update libunbound
This commit is contained in:
parent
ce974949e2
commit
6a1190792b
59 changed files with 4449 additions and 2465 deletions
8
external/unbound/validator/autotrust.c
vendored
8
external/unbound/validator/autotrust.c
vendored
|
@ -1184,7 +1184,7 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
|||
verbose(VERB_ALGO, "autotrust: write to disk: %s", tempf);
|
||||
out = fopen(tempf, "w");
|
||||
if(!out) {
|
||||
log_err("could not open autotrust file for writing, %s: %s",
|
||||
fatal_exit("could not open autotrust file for writing, %s: %s",
|
||||
tempf, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
@ -1192,11 +1192,11 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
|||
/* failed to write contents (completely) */
|
||||
fclose(out);
|
||||
unlink(tempf);
|
||||
log_err("could not completely write: %s", fname);
|
||||
fatal_exit("could not completely write: %s", fname);
|
||||
return;
|
||||
}
|
||||
if(fclose(out) != 0) {
|
||||
log_err("could not complete write: %s: %s",
|
||||
fatal_exit("could not complete write: %s: %s",
|
||||
fname, strerror(errno));
|
||||
unlink(tempf);
|
||||
return;
|
||||
|
@ -1207,7 +1207,7 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
|||
(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));
|
||||
fatal_exit("rename(%s to %s): %s", tempf, fname, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue