Use fstat connection resolution
When running arm 18.104.22.168 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!