aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-20 15:21:27 -0400
committerNick Mathewson <nickm@torproject.org>2014-05-20 15:21:48 -0400
commitc21377e7bcc70d2a456409225d8b2d91990a14cd (patch)
treed8d55aa4d85929f1631fc487e9ed2e7991d2dd3b /src/or/main.c
parent29f2f7ce9af19f22187098fad6d002a6e5a46479 (diff)
downloadtor-c21377e7bcc70d2a456409225d8b2d91990a14cd.tar.gz
tor-c21377e7bcc70d2a456409225d8b2d91990a14cd.zip
sandbox: support logfile rotation
Fixes bug 12032; bugfix on 0.2.5.1-alpha
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 3d109ec78c..7d114d9f68 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2822,6 +2822,15 @@ sandbox_init_filter(void)
NULL, 0
);
+ {
+ smartlist_t *logfiles = smartlist_new();
+ tor_log_get_logfile_names(logfiles);
+ SMARTLIST_FOREACH(logfiles, char *, logfile_name, {
+ sandbox_cfg_allow_open_filename(&cfg, logfile_name); /* steals reference */
+ });
+ smartlist_free(logfiles);
+ }
+
// orport
if (server_mode(get_options())) {
sandbox_cfg_allow_open_filename_array(&cfg,