aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_switch_id.c
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-05Fix Windows build.Alexander Færøy
While trying to resolve our CI issues, the Windows build broke with an unused function error: src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’ defined but not used [-Werror=unused-function] We solve this by moving the `#if !defined(_WIN32)` test above the `unprivileged_port_range_start()` function defintion such that it is included in its body. This is an unreviewed commit. See: tor#40275
2021-02-05Merge branch 'tor-gitlab/mr/292_squashed' into maint-0.4.4Alexander Færøy
2021-02-05Only check for bindable ports if we are unsure if it will fail.Alexander Færøy
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
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove system headers from or.hNick Mathewson
2018-06-28Extract process-management functionality into a new lib/processNick Mathewson
Note that procmon does *not* go here, since procmon needs to integrate with the event loop.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-05-19mingw fix: avoid "unused var" warning.Nick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2015-12-17Fix unused variable errorscypherpunks
2015-12-17Return 77 means "skipped"Nick Mathewson
2015-12-17Conform to the type signature of setsockopt(2)cypherpunks
According to the POSIX standard the option value is a pointer to void and the option length a socklen_t. The Windows implementation makes the option value be a pointer to character and the option length an int. Casting the option value to a pointer to void conforms to the POSIX standard while the implicit cast to a pointer to character conforms to the Windows implementation. The casts of the option length to the socklen_t data type conforms to the POSIX standard. The socklen_t data type is actually an alias of an int so it also conforms to the Windows implementation.
2015-12-17Use a Windows specific socket error codecypherpunks
2015-12-17Do not run switch_id test on Windowscypherpunks
2015-12-15Add unit tests for switch_id(), including tests for capabilitiesNick Mathewson