Opened 8 years ago

Closed 8 years ago

Last modified 7 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: 0.2.2.26-beta
Severity: Keywords: tor-client
Cc: lunar Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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 8 years ago.
Patch against today HEAD

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by lunar

Patch against today HEAD

comment:1 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-final

comment:2 Changed 8 years ago by nickm

Priority: normalmajor

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

comment:3 Changed 8 years ago by nickm

Status: newneeds_review

comment:4 Changed 8 years ago by lunar

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

comment:5 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merging; thanks!

comment:6 Changed 7 years ago by nickm

Keywords: tor-client added

comment:7 Changed 7 years ago by nickm

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