Age | Commit message (Collapse) | Author |
|
|
|
|
|
Note that procmon does *not* go here, since procmon needs to
integrate with the event loop.
|
|
Note that the workqueue code does *not* go here: it is logically at
a higher level, since it needs to use libevent and the networking
stack.
|
|
|
|
|
|
|
|
Also move our ntohll/htonll functions.
|
|
|
|
|
|
There are some additional changes to come: those points are marked
by XXXX.
|
|
|
|
This patch:
- introduces an fdio module for low-level fd functions that don't
need to log.
- moves the responsibility for opening files outside of torlog.c,
so it won't need to call tor_open_cloexec.
|
|
|
|
|
|
You have no idea how glad I am that this is automated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This patch makes get_total_system_memory mockable, which allows us to
alter the return value of the function in tests.
See: https://bugs.torproject.org/24782
|
|
|
|
We use this pattern all over, and this should simplify matters a
bit. Part of 18105.
|
|
|
|
Patch written by "Vort" on trac. Addresses ticket 22798.
|
|
Our socket accounting functions assumed that we'd never be asked to
close a socket that we didn't open ourselves. But now we want to
support taking control sockets that we inherit -- so we need a way
of taking ownership of them, so we don't freak out later on when we
close them.
|
|
|
|
|
|
closes ticket 22322
|
|
|
|
This patch removes the `tor_fgets()` wrapper around `fgets(3)` since it
is no longer needed. The function was created due to inconsistency
between the returned values of `fgets(3)` on different versions of Unix
when using `fgets(3)` on non-blocking file descriptors, but with the
recent changes in bug #21654 we switch from unbuffered to direct I/O on
non-blocking file descriptors in our utility module.
We continue to use `fgets(3)` directly in the geoip and dirserv module
since this usage is considered safe.
This patch also removes the test-case that was created to detect
differences in the implementation of `fgets(3)` as well as the changes
file since these changes was not included in any releases yet.
See: https://bugs.torproject.org/21654
|
|
This patch adds the `tor_fgets()` function to our compatibility layer.
`tor_fgets()` adds an additional check for whether the error-bit have
been enabled for the given file stream, if that is the case and `errno`
is set to `EAGAIN` we make sure that we always return NULL.
Unfortunately `fgets(3)` behaves differently on different versions of
the C library.
See: https://bugs.torproject.org/21416
See: https://bugs.torproject.org/20988
|
|
These seem to have caused warnings on windows. Hmmm.
|
|
|
|
Fixes bug 19901; bugfix on 0.2.9.1-alpha.
|
|
I'm not moving our "format and parse the time" functions, since
those have been pretty volatile over the last couple of years.
|
|
There are a few places where we want to disable a warning: for
example, when it's impossible to call a legacy API without
triggering it, or when it's impossible to include an external header
without triggering it.
This pile of macros uses GCC's c99 _Pragma support, plus the usual
macro trickery, to enable and disable warnings.
|
|
|
|
|
|
|
|
Short version: clang asan hates the glibc strcmp macro in
bits/string2.h if you are passing it a constant string argument of
length two or less. (I could be off by one here, but that's the
basic idea.)
Closes issue 14821.
|
|
|
|
|
|
|
|
* The option is now KeepBindCapabilities
* We now warn if the user specifically asked for KeepBindCapabilities
and we can't deliver.
* The unit tests are willing to start.
* Fewer unused-variable warnings.
* More documentation, fewer misspellings.
|
|
This feature allows us to bind low ports when starting as root and
switching UIDs.
Based on code by David Goulet.
Implement feature 8195
|
|
The INLINE keyword is not used anymore in favor of inline.
Windows only supports __inline so an inline preprocessor definition is
still needed.
|
|
This patch was generated using;
sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
|