Nick Mathewson
04a74d4aa7
conftesting.h: when COCCI is defined, disable unhandled macros
2019-10-22 09:32:13 -04:00
Nick Mathewson
3e41459dff
confmacros.h: fix coccinelle parsing.
2019-10-22 09:32:13 -04:00
Nick Mathewson
54c5366aa1
feature/control: wrap some problem macros in COCCI
2019-10-22 09:32:13 -04:00
Nick Mathewson
ef5d1e6b65
consdiff disable a macro when running with COCCI
2019-10-22 09:32:13 -04:00
Nick Mathewson
d9bad0203b
Disable a couple of iterator macros when COCCI is defined.
2019-10-22 09:32:13 -04:00
Nick Mathewson
67247fa9ac
Use various COCCI tests to get mainloop.c to parse.
2019-10-22 09:32:13 -04:00
Nick Mathewson
4fad456148
test: Hide some test-declaration macro definitions to COCCI.
...
(These ones cause parsing failures.)
2019-10-22 09:32:13 -04:00
Nick Mathewson
c1e8e5bb32
Apparently coccinelle can't handle multiline #errors.
2019-10-22 09:32:13 -04:00
Nick Mathewson
b03c8c74ce
COCCI: Disable some buffers.c macros that coccinelle can't handle.
2019-10-22 09:32:13 -04:00
Nick Mathewson
b867e97ce6
With COCCI defined, avoid PERIODIC_EVENT.
...
Coccinelle doesn't understand the particular pattern of token
pasting we have going on here.
2019-10-22 09:32:05 -04:00
Nick Mathewson
48be922160
COCCI: disable DOWLOAD_SCHEDULE macro
2019-10-22 09:31:31 -04:00
Nick Mathewson
630d8c7a1a
With coccinelle, avoid includes in the middle of an expression.
2019-10-22 09:24:25 -04:00
Nick Mathewson
9871fcbcd9
Use #warning instead of #warn: one is C and one isn't.
2019-10-22 09:24:25 -04:00
Nick Mathewson
ded6d9fcb4
Run test_operator_cleanup on our unit tests
...
Coccinelle doesn't understand it when we use "==" and "!=" and so on as
arguments to macros. To solve this, we prefer OP_EQ, OP_NE, and so
on.
This commit is automatically generated by running
./scripts/coccinelle/test_operator_cleanup over all of the source
code in src.
2019-09-11 18:47:19 -04:00
David Goulet
41261c3b5c
Merge branch 'tor-github/pr/1296'
2019-09-11 09:42:31 -04:00
Nick Mathewson
478141e617
Document inconsistent usage of config_var_is_listable()
...
See also ticket 31654.
2019-09-11 09:42:19 -04:00
Nick Mathewson
e61bfd0bfd
Extract common list of flags to use for obsolete variables.
2019-09-11 09:42:19 -04:00
Nick Mathewson
fe5033d3b0
Clarify documentation on config_var_is_listable()
...
Here we make it clear we're only looking at listable variable names,
not at whether the variables themselves are gettable.
Also, remove an extraneous h.
(This commit is not a fixup, because of rebase conflicts.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
14f48cb083
Add test_cmdline.sh to distribution.
2019-09-11 09:42:19 -04:00
Nick Mathewson
7a8ea0d3c3
integration test for --list-torrc-options
...
(This option tests our existing behavior, not necessarily the most
sensible behavior.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
5ffe6ec0e3
Test: Make sure NOLIST options are not listed.
2019-09-11 09:42:19 -04:00
Nick Mathewson
bbd40e690e
Revise documentation on CFLG_* flags
2019-09-11 09:42:19 -04:00
Nick Mathewson
0d6d96396c
Remove all CVFLAG_* usage.
2019-09-11 09:42:19 -04:00
Nick Mathewson
5ca5d196ac
Remove all VTFLAG_* usage.
2019-09-11 09:42:19 -04:00
Nick Mathewson
9b571d4729
confparse, conftypes: Replace flags with their new names.
...
The old names remain as #defines that cause variables to get one or
more flags.
Now every flag-testing function in confparse.c tests exactly one flag.
2019-09-11 09:42:19 -04:00
Nick Mathewson
1b3b6d9f2d
Replace low-level {var_type,struct_var}_is_*() with flag inspection
...
Since the flags are now stored with compatible numbering, we can
just OR them together and see whether the flag we want is in the
result.
(Net code removal!)
2019-09-11 09:42:19 -04:00
Nick Mathewson
4b92f4c83a
Re-number VTFLAG_* values so they don't conflict with CVFLAG_*
2019-09-11 09:42:19 -04:00
Nick Mathewson
c650ab8061
Move VTFLAG_* declarations to conftypes.h
2019-09-11 09:42:19 -04:00
Nick Mathewson
03e4183043
typed_var: Make flags into an unsigned OR of bits.
...
Using a bitfield here will enable us to unify the var_type_def_t flags
with the config_var_t flags.
(This commit does not yet do that unification, and does not yet
rename or refactor any flags. It only changes booleans into bits.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
4f6b592691
struct_var: refactor struct_var_is*() functions to delegate
...
Previously they checked the individual flags inside var_type_def_t;
now they call the appropriate var_type_is_*() functions.
(These functions will be removed entirely by the end of this branch.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
7171ce2a2a
config: make config_var_is_dumpable static.
2019-09-11 09:42:19 -04:00
Nick Mathewson
8d685aee7c
config: rename "contained" to "derived", and explain it better.
...
Don't use "derived" directly, but check its implications for listing
and copying.
2019-09-11 09:42:19 -04:00
Nick Mathewson
668e3a7709
config: Introduce the concept of an "ungettable" variable.
...
We had though to make all obsolete and invisible variables
ungettable, so that GETCONF would reject them. But it turns out
that this isn't the current behavior of GETCONF with those
variables. So for now, I'm leaving the current behavior unchanged.
(See ticket 31647 for a proposal to change the behavior.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
3bf38ffff5
Document config_var_is_dumpable and config_var_is_settable.
2019-09-11 09:42:19 -04:00
David Goulet
049705fc1c
Merge branch 'tor-github/pr/1311'
2019-09-11 09:36:28 -04:00
George Kadianakis
3b32f2508c
Merge branch 'tor-github/pr/1307'
2019-09-11 16:19:21 +03:00
teor
39c7f46d36
main: add some newlines to the subsystem list, for readability
2019-09-10 09:06:36 +10:00
teor
5fa75a6cd4
main: remove level number comments from the subsystem list (master)
...
Part of 31615.
2019-09-10 09:04:38 +10:00
teor
987768b077
Merge branch 'bug31615_041' into bug31615_master
...
Merged modified lines from bug31615_041, and unmodified lines
from master.
2019-09-10 09:03:37 +10:00
teor
f1c57cd1e5
main: remove level number comments from the subsystem list (0.4.1)
...
Part of 31615.
2019-09-10 08:44:35 +10:00
teor
7e22d99346
Merge branch 'bug31615_040' into bug31615_041
...
Merged modified lines from bug31615_040, and unmodified lines
from maint-0.4.1.
2019-09-10 08:43:13 +10:00
teor
2e2a35b694
main: remove level number comments from the subsystem list (0.4.0)
...
These levels get out of date really easily: we'll implement a level
dump command in tor in 31614.
They also cause conflicts and inconsistencies when merging forward
level changes.
Part of 31615.
2019-09-10 08:35:56 +10:00
David Goulet
409df19b5a
build: The <sys/sysctl.h> is now deprecated on Linux
...
Closes #31673
2019-09-09 17:07:08 -04:00
Nick Mathewson
6846d14868
Merge branch 'ticket30924_042_04_squashed_merged'
2019-09-09 12:35:27 -04:00
Nick Mathewson
a642a4cbd7
Merge branch 'ticket30924_042_04_squashed' into ticket30924_042_04_squashed_merged
2019-09-09 11:10:53 -04:00
David Goulet
622c2c7884
hs-v3: Rename validation function in hs_intropoint.c
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-09 11:07:51 -04:00
David Goulet
385f6bcfcc
hs-v3: Move DoS parameter check against 0
...
Move it outside of the validation function since 0 is a valid value but
disables defenses.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-09 11:07:36 -04:00
David Goulet
f16fc262e5
Merge branch 'tor-github/pr/1298'
2019-09-09 11:05:51 -04:00
David Goulet
1e7c7870e8
Merge branch 'tor-github/pr/1287'
2019-09-09 10:51:19 -04:00
teor
612b0a4139
subsys: Make the subsystem init order match the module dependencies
...
Fix levels for subsystems that depend on log/err
* winprocess (security) doesn't use err:
* call windows process security APIs as early as possible
* init err after winprocess
* move wallclock so it's still after err
* network and time depend on log:
* make sure that network and time can use logging.
* init network and time after log
Add comments explaining the module init order.
Fixes bug 31615; bugfix on 0.4.0.1-alpha.
2019-09-06 16:58:53 +10:00