Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3393 closed defect (fixed)

ControlSocketsGroupWritable option is not compatible with User

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


check_private_dir() to ensure that ControlSocketsGroupWritable is safe to use. Unfortunately, check_private_dir() only checks against the currently running user… which can be root until privileges are dropped to the user and group configured by the User config option.

The attached patch fixes the issue by adding a new effective_user argument to check_private_dir() and updating the callers. It might not be the best way to fix the issue, but it did in my tests.

Child Tickets

Attachments (1)

tor_ecc9a364c2_check_private_dir_with_effective_user.diff (8.5 KB) - added by lunar 9 years ago.
Patch against today HEAD

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by lunar

Patch against today HEAD

comment:1 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-final

comment:2 Changed 9 years ago by nickm

Priority: normalmajor

Hm. Looks good to me. Do prefer the git credit as "lunar", or something else?

comment:3 Changed 9 years ago by nickm

Status: newneeds_review

comment:4 Changed 9 years ago by lunar

I already got credited in with my real name, so let's continue using that one, I'd say.

comment:5 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merging; thanks!

comment:6 Changed 8 years ago by nickm

Keywords: tor-client added

comment:7 Changed 8 years ago by nickm

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