summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
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.
2019-10-16Check tor_vasprintf for error return values.Tobias Stoeckmann
In case of error, a negative value will be returned or NULL written into first supplied argument. This patch uses both cases to comply with style in the specific files. A tor_vasprintf error in process_vprintf would lead to a NULL dereference later on in buf_add, because the return value -1 casted to size_t would pass an assertion check inside of buf_add. On the other hand, common systems will fail on such an operation, so it is not a huge difference to a simple assertion. Yet it is better to properly fail instead of relying on such behaviour on all systems. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-10-16Doxygen: Fix things that looked like links.Nick Mathewson
Doxygen thinks that saying #foo is linking to a "foo" anchor someplace.
2019-10-16Doxygen: fix unrecognized commands.Nick Mathewson
Doxygen seems to interpret anything starting with \ as a command, even when we don't mean it that way.
2019-10-16Doxygen: fix warnings about mismatched HTML tags.Nick Mathewson
2019-10-16Doxygen: Fix mismatched filenames.Nick Mathewson
In 8 places, our \file declarations didn't match the actual files they were in.
2019-10-14Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2Nick Mathewson
2019-10-09Merge remote-tracking branch 'tor-github/pr/1394'Nick Mathewson
2019-10-07Merge remote-tracking branch 'tor-github/pr/1379'Nick Mathewson
2019-10-04Make tor_addr_lookup_host_impl mockable.Nick Mathewson
2019-10-04tls: Log TLS read buffer length bugs onceteor
Rather than filling the logs with similar warnings. Fixes bug 31939; bugfix on 0.3.0.4-rc.
2019-10-03Merge branch 'tor-github/pr/1377'George Kadianakis
2019-10-03Unify backend implementations for blocking hostname lookupNick Mathewson
We have a getaddrinfo() implementation that we prefer, and a gethostbyname*() implementation that we fall back on. Give them both the same interface, and let them be called by the same name. This is a preparatory step for making them both mockable.
2019-10-02Merge branch 'tor-github/pr/1385'David Goulet
2019-10-02log: fix a typo in the function comment for log_fn_()teor
Closes 31923.
2019-10-01Fix a crash bug in max_u16_in_sl()Nick Mathewson
The documentation for this function says that the smartlist can contain NULLs, but the code only handled NULLs if they were at the start of the list. We didn't notice this for a long time, because when Tor is run normally, the sequence of msg_id_t is densely packed, and so this list (mapping msg_id_t to channel_id_t) contains no NULL elements. We could only run into this bug: * when Tor was running in embedded mode, and starting more than once. * when Tor ran first with more pubsub messages enabled, and then later with fewer. * When the second run (the one with fewer enabled pubsub messages) had at least some messages enabled, and those messages were not the ones with numerically highest msg_id_t values. Fixes bug 31898; bugfix on 47de9c7b0a828de7fb8129413db70bc4e4ecac6d in 0.4.1.1-alpha.