/var/lib/tox-bootstrapd on the host is owned by hosts's tox-bootstrapd
and chowned 700, but the container attempts to access it as its own
tox-bootstrapd user with possibly different uid:gid, which will fail if
host's tox-bootstrapd user has different uid:gid than the tox-bootstrapd
user inside the container.
This change makes the container use host's tox-bootstrapd uid:gid, which
fixes the issue.
This doesn't currently work, because we get a lot of errors during tests.
This should not happen. Either those errors are warnings, or something is
wrong with either the code or the test.
Currently only `crypto_core_mem.c` needs this. We should try not to
depend on configure'd values. Also note: config.h is only created and
used in the autotools build. In CMake, we pass `-D` flags directly.
We now either log errors or properly propagate them. In the case of
ping_send_request we make the function return void because it doesn't
seem to matter whether or not it succeeds.
The assert was removed, because it triggers as soon as the padding bytes
in the struct Saved_Friend are non zero. The Tox specification doesn't
say anything about the value of these bytes, so we should just ignore
them.
In the "no proxy" case, the `IP_Port` in the default "no proxy" default
proxy info is uninitialised. It is never used for any decisions in the
code, but it is copied in memory, making it a potential crash on systems
with trap representations of ints.
The android warnings are disabled now because they suggest using
linux-only extensions of libc. Useful for android indeed, but we're
targeting non-android and non-linux systems as well.
All for-loops must have an init-decl, a condition, and an increment
statement. Any loop that doesn't have one of these should be a while
loop (only 2 of these exist in toxav, none in toxcore).
This makes the code a little more flat and readable. We also change the
logic so that we can kill the necessary number of unused relays immediately
rather than having to collect them and remove them in a separate loop
In this case, there was no way it would not be, but a code change down
the stack could cause a variable to become uninitialised. This avoids a
gcc warning and is more locally-correct.
We used to have lots of these in the code, but now that all the endian
stuff is no longer dependent on host byte order, we can re-enable the
warning flag and catch any future violations.
CRYPTO_SIZE is used in a subtraction as second argument and instead of
subtracting then intended value only '1' is subtracted due to operator
precedence rules and missing braces.