[tor-bugs] #14186 [Core Tor/Tor]: Try to use fchmod() first when changing permissions on an AF_UNIX socket

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jun 12 04:41:31 UTC 2017


#14186: Try to use fchmod() first when changing permissions on an AF_UNIX socket
-------------------------------------------------+-------------------------
 Reporter:  andrea                               |          Owner:
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.2.6.2-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-client tor-relay posix           |  Actual Points:
  permissions                                    |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by f55jwk4f):

 nickm, it seems like you are the one who added the comment saying fchmod
 doesn't work on all platforms. So exactly on which platforms do fchmod
 doesn't work but chmod does? On these platforms, does chmod actually
 prevent processes without proper permissions to access the socket? I found
 that some operating systems don't honor permissions on unix sockets.
 (https://groups.google.com/d/topic/nodejs/6wXjU1n9U3w) And Posix says
 "may" for this case. Linux has commit
 5822b7faca709c03a59c2929005bfe9caffe6592 which says we can fchmod before
 bind.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14186#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list