mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix #547: no trustanchor written if filesystem full, fclose checked.
git-svn-id: file:///svn/unbound/trunk@3044 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
ef06e9062e
commit
2bb8f893cc
2 changed files with 9 additions and 1 deletions
|
|
@ -1,3 +1,6 @@
|
|||
21 January 2014: Wouter
|
||||
- Fix #547: no trustanchor written if filesystem full, fclose checked.
|
||||
|
||||
17 January 2014: Wouter
|
||||
- Fix isprint() portability in sldns, uses unsigned int.
|
||||
- iana portlist updated.
|
||||
|
|
|
|||
|
|
@ -1195,8 +1195,13 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
|
|||
log_err("could not completely write: %s", fname);
|
||||
return;
|
||||
}
|
||||
if(fclose(out) != 0) {
|
||||
log_err("could not complete write: %s: %s",
|
||||
fname, strerror(errno));
|
||||
unlink(tempf);
|
||||
return;
|
||||
}
|
||||
/* 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() */
|
||||
|
|
|
|||
Loading…
Reference in a new issue