Age | Commit message (Collapse) | Author |
|
Since these are needed by every module that is _configurable_, they
belong in lib/conf, not lib/confmgt.
|
|
|
|
|
|
|
|
In the unit tests.
Fixes a regression to bug 31334; bug not in any released version of tor.
|
|
|
|
Obviously correct fix to rename_c_identifier.py.
Bugfix on 32237; not in any released version of tor.
|
|
|
|
Based on 8-space tabs, the git/less default.
Cleanup after 31919.
|
|
|
|
And print the spatch version and build details
Part of 31919.
|
|
And add it to check-local.
Part of 31919.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This function is used by controllers to set options. I refactored
it a bit when refactoring options validation, so it needs to get
tested.
|
|
options_validate_cb() derives DataDirectory (which we use) from
DataDirectory_option (which the user sets). I want to add a test
that will call options_validate_cb(), but it will fail unless it
derives the same value.
|
|
I'll need this for testing options_trial_assign().
|
|
|
|
|
|
|
|
This eliminates duplicated code. The options_validate() function
itself is now tests-only.
|
|
Unlike legacy_validate_fn_t, these callbacks have separation of
duties, into:
* early normalization and computation.
* validation
* transition checking
* late normalization and computation
Only the first and last steps get mutable objects. Only the
transition-checking step gets to see the previous values of this
object.
|
|
The former foo_validate() functions are now toplevel
legacy_validate_fn callbacks. The new foo_validate() functions now
call them.
This change lets us remove the old shared_random disk state
validation callback entirely.
|
|
As we turn our monolithic configuration objects into suites of
smaller module-specific configuration objects, we will want each one
to be able to provide its own verification callbacks. That means
that instead of invoking these verification callbacks directly, we will
want to call them via the configuration manager object.
|
|
The current API of this callback mixes responsibilities, including:
* validation
* transition checking
* processing (modifying) the configuration object.
These will have to be disentangled piece by piece, so for now, we'll
have "legacy" validate functions as well.
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
validate_fn_t legacy_validate_fn_t \
validate_fn legacy_validate_fn
|
|
Now that we no longer use it anywhere, we can remove this variable
from the test data structure.
|
|
This input was inessential, and none of the tests actually depended
on it or tested anything about it (as can be seen from the fact that
tests all still pass when it's removed).
I tried to generate this commit with a coccinelle script, but it had
trouble parsing a lot of options_validate as it stands. Instead, I
did a search-and-replace to replace "tdata->old_opt," with "NULL,".
|
|
I'm about to mess with their lists of callbacks, and I don't want to
proliferate lists where we say "NULL, NULL, NULL, ..."
|
|
|
|
|
|
|
|
Bionic has a recent coccinelle version, which passes our CI tests.
But Bionic (and Xenial) cause permissions errors for chutney.
We'll fix those in 32240.
Part of 31919.
|
|
|
|
|
|
"ours" to avoid version bump.
|
|
|
|
|
|
This prevents a warning when building for 32-bit targets.
Fixes bug 32269; bug not in any released Tor.
|
|
|
|
|
|
Single hop rejection (POST and GET) for HS v3 descriptor now return a 503 code
which is more accurate code from dir-spec.txt and from other rejection case in
the code.
For instance if you are not a relay and you get a POST request, a 503 code is
sent back with a rejection message.
Part of #31958
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
First, remove the HSDir mention which should not be in that generic function.
Second, move them to debug() level since they are possible error case.
Part of #31958
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Before inspecting the p_chan, we must check if the circuit is marked for close
because if it is the case, the channels are nullified from the circuit.
Several valid cases can mark the circuit for close of the directory
connection.
Fixes #31958
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Closes #32266
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor
from the client cache with a NEWNYM or simply when the descriptor expires.
Which means that for an INTRO circuit being established during that time, once
it opens, we lookup the descriptor to get the IP object but hey surprised, no
more descriptor.
The approach here is minimalist that is accept the race and close the circuit
since we can not continue. Before that, the circuit would stay opened and the
client wait the SockTimeout.
Fixers #28970.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|