aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-03-28 03:51:50 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-16 22:03:08 -0400
commitcbfb8e703ed9c7e31848ebf959ac7a4cf27b4a64 (patch)
tree63c352b5287e9f57ed91b2950d4fec9d5cf1c864 /src/common/compat.h
parent3802e32c7d94c599546069d8246636b0d3a4ad10 (diff)
downloadtor-cbfb8e703ed9c7e31848ebf959ac7a4cf27b4a64.tar.gz
tor-cbfb8e703ed9c7e31848ebf959ac7a4cf27b4a64.zip
Add 'rename' to the sandboxed syscalls
(If we don't restrict rename, there's not much point in restricting open, since an attacker could always use rename to make us open whatever they want.)
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index bb88818d82..9a381fb97f 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -410,6 +410,7 @@ struct tm *tor_gmtime_r(const time_t *timep, struct tm *result);
/* ===== File compatibility */
int tor_open_cloexec(const char *path, int flags, unsigned mode);
FILE *tor_fopen_cloexec(const char *path, const char *mode);
+int tor_rename(const char *path_old, const char *path_new);
int replace_file(const char *from, const char *to);
int touch_file(const char *fname);