aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2021-02-04 23:11:11 +0000
committerAlexander Færøy <ahf@torproject.org>2021-09-13 18:33:27 +0200
commitfcef8e3f75cf39ae7eb6195713d4855b4fc4d08c (patch)
tree60f0d06a3477bb4b4f875ded35f43afdc7fe2add /src/core/or/connection_edge.c
parent12b64845aebf08e45db94e5610d0ced95b5c1667 (diff)
downloadtor-fcef8e3f75cf39ae7eb6195713d4855b4fc4d08c.tar.gz
tor-fcef8e3f75cf39ae7eb6195713d4855b4fc4d08c.zip
Only check for bindable ports if we are unsure if it will fail.
We currently assume that the only way for Tor to listen on ports in the privileged port range (1 to 1023), on Linux, is if we are granted the NET_BIND_SERVICE capability. Today on Linux, it's possible to specify the beginning of the unprivileged port range using a sysctl configuration option. Docker (and thus the CI service Tor uses) recently changed this sysctl value to 0, which causes our tests to fail as they assume that we should NOT be able to bind to a privileged port *without* the NET_BIND_SERVICE capability. In this patch, we read the value of the sysctl value via the /proc/sys/ filesystem iff it's present, otherwise we assume the default unprivileged port range begins at port 1024. See: tor#40275
Diffstat (limited to 'src/core/or/connection_edge.c')
0 files changed, 0 insertions, 0 deletions