diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-16 16:26:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-16 22:03:18 -0400 |
commit | c80a6bd9d5cc341f822255050a24760d11cbd94a (patch) | |
tree | 0ccc85b7a70bdbc431f108ad92564fbd99634433 /src | |
parent | 619497076585c54dc80656cdd4e6181f1109ff53 (diff) | |
download | tor-c80a6bd9d5cc341f822255050a24760d11cbd94a.tar tor-c80a6bd9d5cc341f822255050a24760d11cbd94a.tar.gz |
Don't reload logs or rewrite pidfile while sandbox is active
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c index 881da3785..77dcd1660 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1137,11 +1137,13 @@ options_act_reversible(const or_options_t *old_options, char **msg) if (!running_tor) goto commit; - mark_logs_temp(); /* Close current logs once new logs are open. */ - logs_marked = 1; - if (options_init_logs(options, 0)<0) { /* Configure the tor_log(s) */ - *msg = tor_strdup("Failed to init Log options. See logs for details."); - goto rollback; + if (!sandbox_is_active()) { + mark_logs_temp(); /* Close current logs once new logs are open. */ + logs_marked = 1; + if (options_init_logs(options, 0)<0) { /* Configure the tor_log(s) */ + *msg = tor_strdup("Failed to init Log options. See logs for details."); + goto rollback; + } } commit: @@ -1488,8 +1490,9 @@ options_act(const or_options_t *old_options) /* Write our PID to the PID file. If we do not have write permissions we * will log a warning */ - if (options->PidFile) + if (options->PidFile && !sandbox_is_active()) { write_pidfile(options->PidFile); + } /* Register addressmap directives */ config_register_addressmaps(options); |