tor/src/or
Jérémy Bobbio 54d7d31cba Make ControlSocketsGroupWritable work with User.
Original message from bug3393:

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.

(Code by lunar; changelog by nickm)
2011-06-14 12:18:32 -04:00
..
buffers.c Use a 64-bit type to hold sockets on win64. 2011-05-23 00:17:48 -04:00
buffers.h Use a 64-bit type to hold sockets on win64. 2011-05-23 00:17:48 -04:00
circuitbuild.c Detect insanely large circuit build state; don't give its length to rand_int 2011-06-06 16:18:06 -04:00
circuitbuild.h Preserve bridge download status across SETCONF, HUP 2011-05-15 20:13:44 -04:00
circuitlist.c Comment out some obviously dead code. 2011-06-08 21:30:41 +02:00
circuitlist.h Add a circuit_purpose_to_string() function, and use it 2011-04-27 00:01:35 -04:00
circuituse.c Merge branch 'bug3045' into maint-0.2.2 2011-05-30 15:18:59 -04:00
circuituse.h Raise the TrackHostExits membership code into its own function 2011-05-13 16:22:10 -04:00
command.c Merge branch 'bug3045' into maint-0.2.2 2011-05-30 15:18:59 -04:00
command.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
config_codedigest.c fix codestyle issues 2009-05-24 02:42:37 +02:00
config.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
config.h stop putting wacky values into state->lastwritten 2011-04-28 20:40:15 -04:00
connection_edge.c Log descriptions of nodes, not just nicknames. 2011-05-15 21:58:46 -04:00
connection_edge.h Handle transitions in Automap*, VirtualAddrNetwork correctly 2011-05-13 16:59:31 -04:00
connection_or.c Re-apply the automated conversion to 0.2.2 to make handle any memcmps that snuck in 2011-05-11 16:27:27 -04:00
connection_or.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
connection.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
connection.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
control.c Merge remote-tracking branch 'public/bug3270' into maint-0.2.2 2011-05-30 14:49:49 -04:00
control.h Merge branch 'feature3049-v2' into maint-0.2.2 2011-05-23 01:19:04 -04:00
cpuworker.c Use a 64-bit type to hold sockets on win64. 2011-05-23 00:17:48 -04:00
cpuworker.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
directory.c Merge branch 'bug3045' into maint-0.2.2 2011-05-30 15:18:59 -04:00
directory.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
dirserv.c Fix unit test failure in dir/formats 2011-06-02 13:44:33 +02:00
dirserv.h make make check-spaces happier. 2011-04-27 15:18:34 -04:00
dirvote.c Fix GCC 4.6's new -Wunused-but-set-variable warnings. 2011-05-23 17:04:38 -04:00
dirvote.h Sanity-check consensus param values 2011-01-15 19:42:17 +01:00
dns.c log the reason for publishing a new relay descriptor 2011-05-19 23:59:52 -04:00
dns.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
dnsserv.c Use a 64-bit type to hold sockets on win64. 2011-05-23 00:17:48 -04:00
dnsserv.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
eventdns_tor.h Bump copyright statements to 2011 2011-01-03 11:50:39 -05:00
eventdns.c Merge remote-tracking branch 'public/bug3270' into maint-0.2.2 2011-05-30 14:49:49 -04:00
eventdns.h Use a 64-bit type to hold sockets on win64. 2011-05-23 00:17:48 -04:00
geoip.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
geoip.h Allow controllers a more up-to-date view of bridge usage. 2011-04-07 11:53:37 -04:00
hibernate.c Correctly check elapsed time in last hibernation period 2011-04-29 01:18:32 +02:00
hibernate.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
main.c Refactor HS client state-clearing code into a separate function 2011-06-02 02:57:29 -07:00
main.h Expose a new process_signal(uintptr_t), not signal_callback() 2011-04-26 15:20:08 -04:00
Makefile.am Ouch: correctly tabify the micro-revision.i target in Makefile.am (0.2.1 only) 2011-04-19 12:29:20 -04:00
microdesc.c Merge remote-tracking branch 'public/bug3122_memcmp_022' into maint-0.2.2 2011-05-12 19:25:14 -04:00
microdesc.h Rebuild the microdesc cache when a sufficient number of bytes are dropped 2011-05-03 17:03:49 -04:00
networkstatus.c Fixup whitespace issues from 3122 commit 2011-05-15 20:06:36 -04:00
networkstatus.h Sanity-check consensus param values 2011-01-15 19:42:17 +01:00
ntmain.c Doxygen documentation for about 100 things that didn't have any 2011-03-16 17:05:37 -04:00
ntmain.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
onion.c Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcmp_022 2011-05-11 16:24:29 -04:00
onion.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
or.h Add an "auto" option to UseBridges 2011-06-02 15:11:21 -04:00
policies.c Don't use signed 1-bit bitfields 2011-06-08 21:30:41 +02:00
policies.h Don't let bad DNS make exit policy and declared exit policy get out of sync 2011-02-22 14:06:28 -05:00
reasons.c Send END_STREAM_REASON_NOROUTE: clients that didn't grok it are now obsolete 2011-03-28 13:42:59 -04:00
reasons.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
relay.c Log descriptions of nodes, not just nicknames. 2011-05-15 21:58:46 -04:00
relay.h Move the decl for tor_gettimofday_cache_clear to the right header 2011-03-16 17:54:48 -04:00
rendclient.c Add info-level log messages during HS-client-state purge 2011-06-02 03:07:09 -07:00
rendclient.h Refactor HS client state-clearing code into a separate function 2011-06-02 02:57:29 -07:00
rendcommon.c Merge remote-tracking branch 'rransom/bug2748-v2' into maint-0.2.2 2011-06-03 11:16:48 -04:00
rendcommon.h Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2 2011-05-16 14:49:55 -04:00
rendmid.c Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcmp_022 2011-05-11 16:24:29 -04:00
rendmid.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
rendservice.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
rendservice.h Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
rephist.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
rephist.h Use observed instead of declared uptime for HSDir 2011-03-11 18:44:35 +01:00
router.c Make ControlSocketsGroupWritable work with User. 2011-06-14 12:18:32 -04:00
router.h Fix unit test failure in dir/formats 2011-06-02 13:44:33 +02:00
routerlist.c Log descriptions of nodes, not just nicknames. 2011-05-15 21:58:46 -04:00
routerlist.h When there is a transition in permitted nodes, apply it to trackexithosts map 2011-04-26 23:54:17 -04:00
routerparse.c Remove a few dead assignments during router parsing 2011-06-08 21:30:40 +02:00
routerparse.h Move the decl for tor_gettimofday_cache_clear to the right header 2011-03-16 17:54:48 -04:00
tor_main.c Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2 2011-01-03 11:51:17 -05:00