summaryrefslogtreecommitdiff
path: root/src/or/statefile.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-16 23:45:55 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-16 23:45:55 -0400
commit4367cbd71b7a7b53e191b54a67ee6cbc00651024 (patch)
tree7d65b680da934b3128e102d6a61b690e1bea0b5b /src/or/statefile.c
parent250b84b8a8b3bc9d50859459054aecfe8473e7cc (diff)
parent506c8904402907f84f8c5ddcd6ecf15bb66d4030 (diff)
downloadtor-4367cbd71b7a7b53e191b54a67ee6cbc00651024.tar.gz
tor-4367cbd71b7a7b53e191b54a67ee6cbc00651024.zip
Merge remote-tracking branch 'public/sandbox_fixes_rebased_2'
Diffstat (limited to 'src/or/statefile.c')
-rw-r--r--src/or/statefile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/statefile.c b/src/or/statefile.c
index 2251f25e94..da31341712 100644
--- a/src/or/statefile.c
+++ b/src/or/statefile.c
@@ -13,6 +13,7 @@
#include "hibernate.h"
#include "rephist.h"
#include "router.h"
+#include "sandbox.h"
#include "statefile.h"
/** A list of state-file "abbreviations," for compatibility. */
@@ -285,7 +286,7 @@ or_state_save_broken(char *fname)
log_warn(LD_BUG, "Unable to parse state in \"%s\". Moving it aside "
"to \"%s\". This could be a bug in Tor; please tell "
"the developers.", fname, fname2);
- if (rename(fname, fname2) < 0) {
+ if (tor_rename(fname, fname2) < 0) {//XXXX sandbox prohibits
log_warn(LD_BUG, "Weirdly, I couldn't even move the state aside. The "
"OS gave an error of %s", strerror(errno));
}