[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #13807 [arm]: Arm fails to list connections on OpenBSD due to lsof permissions error



#13807: Arm fails to list connections on OpenBSD due to lsof permissions error
-------------------------------------------------+-------------------------
 Reporter:  mmcc                                 |          Owner:  atagar
     Type:  defect                               |         Status:  new
 Priority:  normal                               |      Milestone:
Component:  arm                                  |        Version:
 Keywords:  OpenBSD, lsof, fstat, files,         |  Actual Points:
  permissions                                    |         Points:
Parent ID:                                       |
-------------------------------------------------+-------------------------
 When running arm 1.4.5.0 and Tor 2.5.10 on OpenBSD 5.5, connection listing
 with `lsof` fails. The console error is `lsof:
 kvm_openfiles(execfile=/bsd, corefile=/dev/mem): Permission denied`. arm
 is being run by the daemon user that owns the Tor process (`_tor`). It is
 unsurprising that the permission is denied, as the unprivileged daemon
 user is attempting to access the memory device. Additionally, `lsof` has
 to be listed as a dependency and installed separately to begin with, which
 is less-than-ideal.

 It would probably be better to use `fstat` if it offers the needed
 functionality. It is included in the default install, runs *far* faster,
 and allows an unprivileged user to list their own open file descriptors
 (e.g. `sudo -u _tor fstat -u _tor`).

 I saw the mention of the arm rewrite on the mailing list and thought that
 this would be a good time to mention this.

 Thanks for reading!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13807>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs