summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2019-11-05confmgt: Stop adding a space, when there is no option valueteor
Fixes bug 32352; bugfix on 0.0.9pre6.
2019-10-31config: Give warn_about_relative_paths() const argsteor
Also gives make_path_absolute() const args. Obviously correct fixes to already reviewed code.
2019-10-30fs: Clarify an ambiguous comment about string/pointer equalityteor
2019-10-28Merge branch 'tor-github/pr/1476'David Goulet
2019-10-28add missing docs in crypto_digest*Nick Mathewson
2019-10-26Documentation cleanup in confmacros.hNick Mathewson
2019-10-26doxygen: add @file declarations for src/libNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it. These declarations also turned up a doxygen warning for crypto_ope.c; I fixed that too.
2019-10-26Rename confparse.[ch] identifiers to confmgt.[ch] identifiers.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ confparse.h confmgt.h \ confparse.c confmgt.c \ CONFPARSE_PRIVATE CONFMGT_PRIVATE \ TOR_CONFPARSE_H TOR_CONFMGT_H
2019-10-26Rename confparse.[ch] to confmgt.[ch]Nick Mathewson
This will break compilation until includes etc are fixed.
2019-10-26Move config_format_t and allied definitions into conftypes.hNick Mathewson
Since these are needed by every module that is _configurable_, they belong in lib/conf, not lib/confmgt.
2019-10-25confparse: Add a function to check the magic of a toplevel object.Nick Mathewson
2019-10-24Write a new set of config validation callbacks.Nick Mathewson
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.
2019-10-24Make foo_validate() functions call config_validate().Nick Mathewson
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.
2019-10-24Add a config_validate() function to invoke verify callbacks.Nick Mathewson
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.
2019-10-24Rename validate_fn{,_t} to start with "legacy_".Nick Mathewson
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
2019-10-24Merge remote-tracking branch 'tor-github/pr/1447'teor
2019-10-22config validation: make the "old_options" argument const.Nick Mathewson
We can't do this with the "options" argument yet, since several places in the code change those right now.
2019-10-22validate_fn(): remove now-unused defaults and from_setconf.Nick Mathewson
These arguments were only used by options_validate, and are now ignored even there.
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22threads.h: coccinelle cannot understand a macro.Nick Mathewson
2019-10-22ctassert.h: fix CTASSERT_DECL so coccinelle can parse it.Nick Mathewson
2019-10-22ratelim.h: use COCCI to hide an initializer.Nick Mathewson
2019-10-22util_bug.h: Coccinelle does not understand IF_BUG_ONCE or #nodef.Nick Mathewson
2019-10-22weakrng.h: use COCCI to hide a macro coccinelle cannot parse.Nick Mathewson
2019-10-22Use STMT_BEGIN/END in parse_int.c so coccinelle can handle it.Nick Mathewson
2019-10-22smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from CoccinelleNick Mathewson
2019-10-22namemap_st.h: Use COCCI to hide an initializer.Nick Mathewson
2019-10-22timeval.h: Coccinelle cannot understand timercmp.Nick Mathewson
2019-10-22Fix a macro in address.c so coccinelle can understand itNick Mathewson
2019-10-22timers.c: define TIMEOUT_PUBLIC to no tokens when using COCCI.Nick Mathewson
2019-10-22dispatch_naming.c: when COCCI is defined, disable unparseable macros.Nick Mathewson
2019-10-22conftesting.h: when COCCI is defined, disable unhandled macrosNick Mathewson
2019-10-22confmacros.h: fix coccinelle parsing.Nick Mathewson
2019-10-22Apparently coccinelle can't handle multiline #errors.Nick Mathewson
2019-10-22COCCI: Disable some buffers.c macros that coccinelle can't handle.Nick Mathewson
2019-10-22With coccinelle, avoid includes in the middle of an expression.Nick Mathewson
2019-10-22Use #warning instead of #warn: one is C and one isn't.Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1417'Nick Mathewson
2019-10-22Merge branch 'from_setconf_removal_squashed'Nick Mathewson
2019-10-22Make a pair of add_*_log() functions mockable.Nick Mathewson
2019-10-21Merge remote-tracking branch 'tor-github/pr/1434'teor
2019-10-21control: Add GETINFO support for dumping microdesc consensusAmreshVenugopal
- Allows control port to read microdesc consensus using: GETINFO dir/status-vote/microdesc/consensus add: Helper function `getinfo_helper_current_consensus` test: check if GETINFO commands return expected consensus data. Resolves 31684.
2019-10-21Merge branch 'maint-0.4.2'teor
2019-10-20err: Use the correct type for cb_bufteor
Fixes bug 32060; bug not in any released version of tor. Resolves CID 1454761.
2019-10-18Merge branch 'maint-0.4.2'Nick Mathewson
2019-10-18Merge remote-tracking branch 'tor-github/pr/1426' into maint-0.4.2Nick Mathewson
2019-10-17Ensure that the exit callback is called if CreateProcessA() fails on Windows.Alexander Færøy
This patch fixes an issue where the exit handler is not called for the given process_t in case CreateProcessA() fails. This could, for example, happen if the user tries to execute a binary that does not exist. See: https://bugs.torproject.org/31810
2019-10-17Handle errors from execve() in the Unix process backend more gracefully.Alexander Færøy
This patch removes a call to tor_assert_unreached() after execve() failed. This assertion leads to the child process emitting a stack trace on its standard output, which makes the error harder for the user to demystify, since they think it is an internal error in Tor instead of "just" being a "no such file or directory" error. The process will now instead output "Error from child process: X" where X is the stringified version of the errno value. See: https://bugs.torproject.org/31810
2019-10-17Replace add_temp_log() with add_default_log().Nick Mathewson
We used to have this function so that we could mark our initial log-to-stdout as specifically temporary so that we would delete it once regular logs were configured. But it's no longer necessary to mark these logs as temporary, since we now use a mark-and-sweep process to ensure that _all_ not-configured logs are closed when we change our configuration. Instead, this function will be the basis of a refactoring in how we handle default logs.