Opened 5 years ago

Closed 5 years ago

#13397 closed defect (fixed)

tor process cannot process SIGHUP when a relative path to a config file is given

Reported by: tom Owned by:
Priority: Low Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay, nickm-patch, asn-review
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Run tor with a relative path to a config file, e.g.

./tor -f ../etc/tor/torrc

Issue a SIGHUP to it. It fails with:

Oct 12 21:37:35.000 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Oct 12 21:37:35.000 [warn] Unable to open configuration file "/[obfuscated]/tor-network/dirauth1/var/lib/tor/../etc/tor/torrc.dirauth".
Oct 12 21:37:35.000 [err] Reading config failed--see warnings above. For usage, try -h.
Oct 12 21:37:35.000 [warn] Restart failed (config error?). Exiting.

Child Tickets

Change History (8)

comment:1 Changed 5 years ago by nickm

Milestone: Tor: 0.2.6.x-final

comment:2 Changed 5 years ago by nickm

Priority: normalminor

comment:3 Changed 5 years ago by rl1987

Well, it fails with above error if your torrc does not exist at the path you have specified and you didn't use --allow-missing-torrc. It works fine otherwise.

comment:4 Changed 5 years ago by nickm

Keywords: tor-relay nickm-patch added
Status: newneeds_review

How about branch bug13397 in my public repository? (Needs review)

comment:5 Changed 5 years ago by tom

ACK - I'm currently traveling this week and next, but I've added this to my list of things to do when I get back if you can wait.

comment:6 Changed 5 years ago by nickm

Keywords: asn-review added

comment:7 Changed 5 years ago by asn

Patch looks good to me. Also worked fine with a small test.

Maybe an unneeded tor_free(*fname_var); was added? That pointer is NULL anyway, right?

comment:8 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged; thanks!

Note: See TracTickets for help on using tickets.