mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
077b9f19a4
Since 0.2.3.1-alpha, we've supported the Linux extensions to socket(), open(), socketpair(), and accept() that enable us to create an fd and make it close-on-exec with a single syscall. This not only saves us a syscall (big deal), but makes us less vulnerable to race conditions where we open a socket and then exec before we can make it close-on-exec. But these extensions are not supported on all Linuxes: They were added between 2.6.23 or so and 2.6.28 or so. If you were to build your Tor against a recent Linux's kernel headers, and then run it with a older kernel, you would find yourselve unable to open sockets. Ouch! The solution here is that, when one of these syscalls fails with EINVAL, we should try again in the portable way. This adds an extra syscall in the case where we built with new headers and are running with old ones, but it will at least allow Tor to work. Fixes bug 5112; bugfix on 0.2.3.1-alpha.
6 lines
225 B
Plaintext
6 lines
225 B
Plaintext
o Minor bugfixes:
|
|
- When Tor is built with kernel headers from a recent (last few
|
|
years) Linux kernel, do not fail to run on older (pre-2.6.28
|
|
Linux kernels). Fixes bug 5112; bugfix on 0.2.3.1-alpha.
|
|
|