diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-07-30 14:18:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-07-30 14:18:11 -0400 |
commit | 0edb9b0492abbdd6c3ec397ad1f80c901568a713 (patch) | |
tree | 8ac03d1ac22fa3708b3d4b73bffc25635a1817e0 | |
parent | f8cbba7a33f0015f15f9246877df570c4cbff6d4 (diff) | |
parent | 74a8555d2be2ce9d33e9814212e5de49ba089274 (diff) | |
download | tor-0edb9b0492abbdd6c3ec397ad1f80c901568a713.tar.gz tor-0edb9b0492abbdd6c3ec397ad1f80c901568a713.zip |
Merge remote-tracking branch 'origin/maint-0.2.5'
-rw-r--r-- | changes/bug12730-systemd-verify-config | 3 | ||||
-rw-r--r-- | changes/bug12731-systemd-no-run-as-daemon | 9 | ||||
-rw-r--r-- | contrib/dist/tor.service.in | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/changes/bug12730-systemd-verify-config b/changes/bug12730-systemd-verify-config new file mode 100644 index 0000000000..221633c78e --- /dev/null +++ b/changes/bug12730-systemd-verify-config @@ -0,0 +1,3 @@ + o Distribution: + - Verify configuration file via ExecStartPre in the systemd unit file. + Patch from intrigeri; resolves ticket 12730. diff --git a/changes/bug12731-systemd-no-run-as-daemon b/changes/bug12731-systemd-no-run-as-daemon new file mode 100644 index 0000000000..f92e5aff00 --- /dev/null +++ b/changes/bug12731-systemd-no-run-as-daemon @@ -0,0 +1,9 @@ + o Distribution: + - Explicitly disable RunAsDaemon in the systemd unit file. + Our current systemd unit uses "Type = simple", so systemd does + not expect tor to fork. If the user has "RunAsDaemon 1" in their + torrc, then things won't work as expected. This is e.g. the case + on Debian (and derivatives), since there we pass + "--defaults-torrc /usr/share/tor/tor-service-defaults-torrc" + (that contains "RunAsDaemon 1") by default. + Patch by intrigeri; resolves ticket 12731. diff --git a/contrib/dist/tor.service.in b/contrib/dist/tor.service.in index 5d7670281b..2fe51c75d9 100644 --- a/contrib/dist/tor.service.in +++ b/contrib/dist/tor.service.in @@ -4,7 +4,10 @@ After = syslog.target network.target nss-lookup.target [Service] Type = simple -ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc +ExecStartPre = @BINDIR@/tor -f @CONFDIR@/torrc --verify-config +# A torrc that has "RunAsDaemon 1" won't work with the "simple" service type; +# let's explicitly override it. +ExecStart = @BINDIR@/tor -f @CONFDIR@/torrc --RunAsDaemon 0 ExecReload = /bin/kill -HUP ${MAINPID} KillSignal = SIGINT TimeoutSec = 30 |