Age | Commit message (Collapse) | Author |
|
Previously, these were magical things that we detected by checking
whether a variable's name was prefixed with two or three underscores.
|
|
"unsettable" is a property of types. LINELIST_V and OBSOLETE are
unsettable, meaning that they cannot be set by name.
"contained" is a property of types. I'm hoping to find a better
name here. LINELIST_S is "contained" because it always appears
within a LINELIST_V, and as such doesn't need to be dumped ore
copied independently.
"cumulative" is a property of types. Cumulative types can appear
more than once in a torrc without causing a warning, because they
add to each other rather than replacing each other.
"obsolete" is a property of variables.
"marking fragile" is now a command that struct members can accept.
With these changes, confparse and config no longer ever need to
mention CONFIG_TYPE_XYZ values by name.
|
|
|
|
Additionally, adjust the macros so that we can add new members like
this more easily.
|
|
The testing-only parts now live in a conftesting.h; the shared parts
of the macros live in confmacros.h
|
|
|
|
|
|
|
|
These functions exist one level higher than typed_var_t. They
describe a type, a name, and an offset within a structure.
|
|
|
|
|
|
Right now, this has been done at a high level by confparse.c, but it
makes more sense to lower it.
This API is radically un-typesafe as it stands; we'll be wrapping it
in a safer API as we do #30914 and lower the struct manipulation
code as well.
Closes ticket 30864.
|
|
We had an existing function to do this, but it took a pair of
strings rather than a line.
|
|
lib/confmgt is at a higher level than lib/conf, since it needs to
call down to logging and similar modules.
|
|
This will be a lower-level module than anything that actually
sets or handles configuration variables.
Part of 30864.
|
|
|
|
Note that the event base object is _not_ created from the initialize
function, since it is configuration-dependent. This will wait until
configuration is integrated into subsystems.
Closes ticket 30806.
|
|
|
|
|
|
|
|
Part of ticket 30686.
|
|
Part of ticket 30686.
|
|
|
|
Closes #30687.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This happened when I went to fix long lines after running "make
autostyle".
|
|
|
|
|
|
|
|
|
|
Fixes assertion failure in tests on NetBSD:
slow/prob_distr/stochastic_log_logistic: [forking] May 25 03:56:58.091 [err] tor_assertion_failed_(): Bug: src/lib/crypt_ops/crypto_rand_fast.c:184: crypto_fast_rng_new_from_seed: Assertion inherit != INHERIT_RES_KEEP failed; aborting. (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61)
May 25 03:56:58.091 [err] Bug: Assertion inherit != INHERIT_RES_KEEP failed in crypto_fast_rng_new_from_seed at src/lib/crypt_ops/crypto_rand_fast.c:184: . (Stack trace not available) (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61)
[Lost connection!]
|
|
Fix on 4e3d144fb0940d8ee5a89427d471ea3656e8e122; bug not in any
released Tor.
|
|
The ordinary definitions of timeradd() and timersub() contain a
branch. However, in coverage builds, this means that we get spurious
complaints about partially covered basic blocks, in a way that makes
our coverage determinism harder to check.
|
|
Ordinarily we skip calling log_fn(LOG_DEBUG,...) if debug logging is
completely disabled. However, in coverage builds, this means that
we get spurious complaints about partially covered basic blocks, in
a way that makes our coverage determinism harder to check.
|
|
Allow a subsystem to register to publish or subscribe a given message
from multiple places.
Part of ticket 29976.
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
This mechanism isn't perfect, and sometimes it will guess wrong,
but it will help our automation.
|
|
|
|
I don't believe any of these represent a real timing vulnerability
(remote timing against memcmp() on a modern CPU is not easy), but
these are the ones where I believe we should be more careful.
|
|
For memeq and friends, "tor_" indicates constant-time and "fast_"
indicates optimized. I'm fine with leaving the constant-time
"safe_mem_is_zero" with its current name, but the "tor_" prefix on
the current optimized version is misleading.
Also, make the tor_digest*_is_zero() uniformly constant-time, and
add a fast_digest*_is_zero() version to use as needed.
A later commit in this branch will fix all the users of
tor_mem_is_zero().
Closes ticket 30309.
|
|
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
This function decodes something different from the usual c-escaped
format.
It is only used in controller authorization.
|
|
|
|
The two options are mutually exclusive, since otherwise an entry
like "Foo" would be ambiguous. We want to have the ability to treat
entries like this as keys, though, since some controller commands
interpret them as flags.
|
|
|