Opened 2 years ago

Last modified 4 months ago

#25140 needs_revision task

Parse only .torrc files in torrc.d directory — at Initial Version

Reported by: iry Owned by:
Priority: High Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Major Keywords: 034-triage-20180328, 035-removed-20180711, 042-deferred-20190918, 043-deferred
Cc: iry, adrelanos, whonix-devel@…, danielpinto52@…, tseretni-rmd Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Currently, when using a torrc.d directory, for example:

%include /etc/torrc.d/

Every file in the directory will be treated and parsed as a valid Tor
configuration file. However, sometime, this may not be what users and
developers want.

For example, users may use /etc/torrc.d/50_user.torrc as the place to
put their own torrc configurations. But sometimes, when they use a
text editor to edit it, the text editor will leave a
/etc/torrc.d/50_user.torrc~ file which will also be treated as a valid
torrc file.

Another example that also happens very frequently is, when dpkg does
an update on /etc/torrc.d/30_distribution.torrc, users' previous
configuration can be saved as
/etc/torrc.d/30_distribution.torrc.dpkg-old which will also be parsed
by Tor.

In best case users will just be frustrated because Tor does not work
as expected and in worst case this could be dangerous. This could be a
severe problem especially because of the following reasons:

  1. filename.torrc~ filename.torrc.dpkg-old has higher priority than

filename.torrc when Tor does the parsing.

  1. In most cases, this will happen without being noticed by the normal


Therefore, we should let Tor parse only the files whose names
end with .torrc which "is standard behaviour among many tools".

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.