Opened 5 years ago

Closed 5 years ago

#12731 closed defect (fixed)

systemd unit file should explicitly pass --RunAsDaemon 0

Reported by: intrigeri Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relays, systemd
Cc: intrigeri Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The 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.

The only solution I can see to this problem is to explicitly pass "--RunAsDaemon 0" when starting tor from the systemd unit file.

Child Tickets

Change History (6)

comment:1 Changed 5 years ago by intrigeri

Status: newneeds_review

Implemented in the bug12731-systemd-no-run-as-daemon branch on ​https://git-tails.immerda.ch/tor. Could this be a candidate for 0.2.5?

comment:2 Changed 5 years ago by intrigeri

Cc: intrigeri added

comment:3 Changed 5 years ago by nickm

Milestone: Tor: 0.2.5.x-final

comment:4 Changed 5 years ago by nickm

Looks okay to me. But can we have a comment about why the RunAsDaemon is there, so that the next person to edit this file understands how it interacts with the rest of our ecosystem?

(Also, a changes file would rock.)

comment:5 in reply to:  4 Changed 5 years ago by intrigeri

Both done. Forced-push my branch.

comment:6 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged into maint-0.2.5. Thanks!

Note: See TracTickets for help on using tickets.