summaryrefslogtreecommitdiff
path: root/src/app/config
AgeCommit message (Collapse)Author
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30Merge branch 'tor-github/pr/1346'George Kadianakis
2019-09-26Run "make autostyle" with new "annotate_ifdef_directives"Nick Mathewson
2019-09-26lock: Avoid some undefined behaviour when freeing mutexes.teor
Fixes bug 31736; bugfix on 0.0.7.
2019-09-11Update #includes to point to confparse.h in its new location.Nick Mathewson
This commit was automatically generated by running scripts/maint/rectify_include_paths.py .
2019-09-11Move confparse.[ch] into src/lib/confmgt/Nick Mathewson
This commit only does code movement, and does not clean up after itself. As such, it will break compilation. I'm separating it for ease of review.
2019-09-11Merge branch 'tor-github/pr/1296'David Goulet
2019-09-11Document inconsistent usage of config_var_is_listable()Nick Mathewson
See also ticket 31654.
2019-09-11Clarify documentation on config_var_is_listable()Nick Mathewson
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-11Remove all CVFLAG_* usage.Nick Mathewson
2019-09-11confparse, conftypes: Replace flags with their new names.Nick Mathewson
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-11Replace low-level {var_type,struct_var}_is_*() with flag inspectionNick Mathewson
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-11config: make config_var_is_dumpable static.Nick Mathewson
2019-09-11config: rename "contained" to "derived", and explain it better.Nick Mathewson
Don't use "derived" directly, but check its implications for listing and copying.
2019-09-11config: Introduce the concept of an "ungettable" variable.Nick Mathewson
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-11Document config_var_is_dumpable and config_var_is_settable.Nick Mathewson
2019-09-09Merge branch 'ticket30924_042_04_squashed' into ↵Nick Mathewson
ticket30924_042_04_squashed_merged
2019-09-05config: Invert sense of _is_invisible, and rename to is_listable()Nick Mathewson
2019-09-05config: replace config_var_is_cumulative with is_replaced_on_set()Nick Mathewson
This change replaces the higher-level property check to match our intended flag factoring.
2019-09-05Merge branch 'tor-github/pr/1294'George Kadianakis
2019-09-05Merge branch 'tor-github/pr/1291'George Kadianakis
2019-09-05config: note that some arguments are required.Nick Mathewson
2019-09-04Document warn_deprecated_option().Nick Mathewson
2019-09-04Document return value of config_mgr_add_format().Nick Mathewson
2019-09-04Document validate_fn_t as it stands.Nick Mathewson
Also document that it will be changed in a later branch.
2019-09-04config_assign: Document CAL_* options.Nick Mathewson
These were sort of described in config_assign() documentation, but not so well.
2019-09-04Document configuration and abbreviation types.Nick Mathewson
2019-09-04config: Make CLEAR with a nonempty value into a nonfatal assertion.Nick Mathewson
When we parse a CLEAR line (e.g., "/OrPort" or /OrPort blah blah"), we always suppress the value, even if one exists. That means that the block of code was meant to handle CLEAR lines didn't actually do anything, since we previously handled them the same way as with other empty values. Closes ticket 31529.
2019-09-04config: use ptrdiff_t for all field-offset members.Nick Mathewson
Previously we used int here, but it is more correct to use ptrdiff_t. (This never actually matters for our code in practice, since the structure we are managing here never exceed INT_MAX in size.)
2019-08-30Merge remote-tracking branch 'tor-github/pr/1114' into maint-0.3.5teor
2019-08-29Describe clear_cfg_fn_t better.Nick Mathewson
2019-08-28Merge branch 'ticket31240v2' into ticket31240v2_merged_2Nick Mathewson
2019-08-28Fix typo in a comment on config_mgr_get_obj_mutable()Nick Mathewson
2019-08-28Simple tests for nested configuration formatsNick Mathewson
One test makes sure that the toplevel magic numbers are distinct. One test makes sure that we can parse a configuration object with two sub-objects.
2019-08-28Tests for config_find_option_name()Nick Mathewson
Fix a bug in config_find_option_name() where it did not consider the abbreviations table.
2019-08-28Add tests for variable-listing functions.Nick Mathewson
This discovered a bug related to an extra & in config_mgr_list_deprecated_vars(): fix that.
2019-08-28Better explain config_clear_fn_tNick Mathewson
2019-08-28Document or_state_t.substates_Nick Mathewson
2019-08-28Document or_options_t.subconfigs_Nick Mathewson
2019-08-28document return lifespans for config_mgr_list_vars()Nick Mathewson
2019-08-28Fix typo in comment about FallbackDir handlingNick Mathewson
2019-08-28Document types for config_get_changes()Nick Mathewson
2019-08-28finish a comment explaining all_abbrevsNick Mathewson
2019-08-28Partial support for multiplicity in configuration objectsNick Mathewson
A configuration manager, in addition to a top-level format object, may now also know about a suite of sub-formats. Top-level configuration objects, in turn, may now have a suite of sub-objects.
2019-08-28Make a config_suite_t type to hold multiple config sub-objectsNick Mathewson
Right now, it doesn't do anything; this patch is meant to make sure that we're doing memory management correctly.
2019-08-28Refactor config free logic to use a single path.Nick Mathewson
The right way to free a config object is now to wrap config_free(), always. Instead of creating an alternative free function, objects should provide an alternative clear callback to free any fields that the configuration manager doesn't manage. This lets us simplify our code a little, and lets us extend the confparse.c code to manage additional fields in config_free.
2019-08-28Use special magic to enforce manager/object connection.Nick Mathewson
Every time we finalize a config manager, we now generate a new magic number for it, so that we'll get an assertion failure if we ever try to use an object with a different configuration manager than the one that generated it.
2019-08-26hs-v3: Implement torrc DoS defenses optionsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-08-24Make a function for NODUMP.Nick Mathewson
2019-08-24Make config_var_is_invisible a function.Nick Mathewson