Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#2971 closed defect (fixed)

Tor doesn't expand ~ in Log config options

Reported by: Sebastian Owned by: Sebastian
Priority: Low Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

We do expand paths like ~/bla for -f and for --DataDirectory, but not for Log lines. Some other configuration options are affected too. I wonder if this is a bugfix or a feature, but I'm going with bugfix for now since it doesn't really make sense to support path expansion for some options and not for others.

Child Tickets

Change History (6)

comment:1 Changed 7 years ago by Sebastian

Status: newneeds_review

Attempted fix for both in bug2971 in my repository.

comment:2 Changed 7 years ago by nickm

Wow, that's a pretty broad approach. I wonder if it's safe. Have we audited all the callers of read_file_to_str for potential issues? What about places where we open files with some other means; will we break stuff there? What about write_str_to_file; will we read stuff from one place but write it to another?

For 0.2.2, I'm much more inclined to simply take the Log part of the patch, and postpone more tweaks here to 0.2.3, possibly trying to address this at a higher level (config.c rather than util.c).

comment:3 Changed 7 years ago by nickm

On IRC, sebastian concurred with merging the Log part only.

comment:4 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged the log part; left the other part unmerged. Closing this ticket; we can open another for other options.

comment:5 Changed 5 years ago by nickm

Keywords: tor-client added

comment:6 Changed 5 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.