Commit Graph

24734 Commits

Author SHA1 Message Date
Nick Mathewson 264c5312eb Merge branch 'maint-0.4.2' 2019-10-18 12:32:49 -04:00
Nick Mathewson 0994050c4a Merge remote-tracking branch 'tor-github/pr/1426' into maint-0.4.2 2019-10-18 12:32:29 -04:00
Nick Mathewson 7c5716d162 Merge branch 'maint-0.4.2' 2019-10-18 12:27:49 -04:00
Nick Mathewson 57c4af16f0 Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.2 2019-10-18 12:27:39 -04:00
Nick Mathewson fbd2fef220 Merge branch 'maint-0.4.2' of git-rw.torproject.org:/tor into maint-0.4.2 2019-10-18 12:25:55 -04:00
teor 1697019d5f core: tabify a line in include.am 2019-10-18 16:56:50 +10:00
teor d616214e47 Merge branch 'maint-0.4.2' 2019-10-18 12:05:20 +10:00
Alexander Færøy 389b37246e Remove overly strict assertions in transports.c.
This patch removes an overly strict tor_assert() and an ignorable BUG()
expression. Both of these would trigger if a PT was unable to configure
itself during startup. The easy way to trigger this is to configure an
obfs4 bridge where you make the obfs4 process try to bind on a port
number under 1024.

See: https://bugs.torproject.org/31091
2019-10-17 21:33:54 +02:00
Alexander Færøy 4ed06acb2a Add test to check if the exit callback is called in process_t upon process_exec() failures.
This patch adds a test to check for whether the exit callback is always
called when process_exec() fails, both on Windows and Unix.

See: https://bugs.torproject.org/31810
2019-10-17 20:52:32 +02:00
Alexander Færøy 7a64f6ea04 Ensure that the exit callback is called if CreateProcessA() fails on Windows.
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-17 20:52:27 +02:00
Alexander Færøy 85b4a5c276 Handle errors from execve() in the Unix process backend more gracefully.
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-17 20:52:22 +02:00
Nick Mathewson 800b823c29 Merge branch 'cmdline_refactor' 2019-10-17 12:01:45 -04:00
Nick Mathewson d97d7f0e48 Use an enum for quiet_level. 2019-10-17 12:01:40 -04:00
Nick Mathewson b9f002dec6 Rename CMD_OTHER to CMD_IMMEDIATE 2019-10-17 12:01:40 -04:00
Nick Mathewson d15223a385 fixup! Print the error message for --dump-config even if no arguments are given.
Fix a spelling error.
2019-10-17 12:01:40 -04:00
Nick Mathewson 763d955a17 Add a test for a command-line option without a value. 2019-10-17 12:01:40 -04:00
Nick Mathewson bfdfaae040 Move responsibility for setting the "quiet level" into a table.
Previously this was done with a big list of options in main.c which
implied "hush" or "quiet".  One of these options ("--digests") no
longer existed, but we still checked for it.

Now we use the table of command-line-only arguments to set this
value.
2019-10-17 12:01:40 -04:00
Nick Mathewson c529b3f8f1 Make the command-line parser understand "commands".
Previously these were implemented with a search in
options_init_from_torrc(), but that led to each option being
declared more than needed: once to say that it was a valid option,
and once to say what it meant.
2019-10-17 12:01:40 -04:00
Nick Mathewson 9826fb1981 Add a return type for the parsed commandline.
Previously it was stored in two outvars, but this is more
elegant. I'm going to be expanding this struct in later commits.
2019-10-17 12:01:40 -04:00
Nick Mathewson 5c09230b45 hs_cache.c: fix HTML tags in doxygen comments. 2019-10-17 08:27:17 -04:00
Nick Mathewson 39cf575ed4 Merge remote-tracking branch 'tor-github/pr/1416' 2019-10-17 08:25:11 -04:00
Nick Mathewson 3430b487d6 hs_cell.[ch]: repair doxygen. 2019-10-16 12:08:38 -04:00
Nick Mathewson 6a2057a9f2 or_options_st.h: repair some doxygen comments. 2019-10-16 12:05:17 -04:00
Nick Mathewson 18ea8855f2 shared_random.[ch]: repair doxygen comments 2019-10-16 12:04:53 -04:00
Nick Mathewson 17b88241db hs_cache.[ch]: repair doxygen comments. 2019-10-16 11:57:44 -04:00
Nick Mathewson 1b66668e26 hs_client.[ch]: fix doxygen comments by using /**. 2019-10-16 11:51:47 -04:00
Nick Mathewson 06367299c2 shared_random_state.[ch]: Repair a bunch of doxygen comments
These need to start with /**, not /*.
2019-10-16 11:44:30 -04:00
Nick Mathewson 123fe6bdc5 hs_common.[ch]: repair doxygen comments by replacing /* with /** 2019-10-16 11:39:10 -04:00
Nick Mathewson 2127d797e9 hs_descriptor.[ch]: repair doxygen comments.
These are yet more that were not made with "/**"
2019-10-16 11:33:03 -04:00
Nick Mathewson ca26ea03fc hs_service.c: repair doxygen comments 2019-10-16 11:26:20 -04:00
Nick Mathewson 0e9e5c37b7 hs_service.h: repair doxygen comments. 2019-10-16 11:18:43 -04:00
Nick Mathewson ba44423cfc address_set.c: doxygen comment repair. 2019-10-16 11:15:25 -04:00
Nick Mathewson a54c98007a channel.h: fix various doxygen warnings
There were a bunch of items where the doxygen comments were
formatted incorrectly (with /* instead of /**)
2019-10-16 11:11:43 -04:00
Nick Mathewson ce0739314b voting_schedule: fix doxygen comments to use /**
Previously some of the comments here used /*.
2019-10-16 11:08:34 -04:00
Nick Mathewson 87afe5c260 Rename authcert_members.i to .h, and have it define a macro.
Including a file in the middle of a declaration seems to confuse
Doxygen, and Coccinelle doesn't much like it either.l
2019-10-16 10:53:01 -04:00
Nick Mathewson f9fac733b9 Doxygen: Fix things that looked like links.
Doxygen thinks that saying #foo is linking to a "foo" anchor
someplace.
2019-10-16 08:44:35 -04:00
Nick Mathewson 591420df20 Doxygen: fix unrecognized commands.
Doxygen seems to interpret anything starting with \ as a command,
even when we don't mean it that way.
2019-10-16 08:39:41 -04:00
Nick Mathewson 98735c40b6 Doxygen: fix warnings about mismatched HTML tags. 2019-10-16 08:27:03 -04:00
Nick Mathewson 5e5e655e32 Doxygen: Fix mismatched filenames.
In 8 places, our \file declarations didn't match the actual files
they were in.
2019-10-16 08:18:26 -04:00
David Goulet 09e6c0f7c7 hs-v3: Fix possible memory leak in error code path
Found by coverity CID 1454769.

There were a second possible leak that is also fixed in this commit.

Fixes #32063

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-15 08:54:11 -04:00
Nick Mathewson 6bbeb08f92 Merge branch 'maint-0.4.2' 2019-10-14 15:55:27 -04:00
Nick Mathewson eebd2d44a1 Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2 2019-10-14 15:55:13 -04:00
Nick Mathewson 9201bbd96c Replace a unicode character which doxygen cannot handle.
Merging without review, as this is an editorial fix in a comment.
2019-10-14 14:05:50 -04:00
Nick Mathewson 61fe3f448c Bump master to 0.4.3.0-alpha-dev. 2019-10-11 17:15:04 -04:00
Nick Mathewson 2e5724d153 Merge branch 'ticket31682_042_01_squashed' 2019-10-11 10:21:58 -04:00
Nick Mathewson 46efc0ff35 Correct comment on build_establish_intro_dos_extension 2019-10-11 10:21:45 -04:00
David Goulet b356b3907a hs-v3: Fix implicit ssize_t to size_t conversion
Found by Coverity.

Fixes #31682

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-11 10:20:36 -04:00
Nick Mathewson 0d82a8be77 Merge remote-tracking branch 'tor-github/pr/1394' 2019-10-09 16:44:12 -04:00
Nick Mathewson ab064cf762 Merge remote-tracking branch 'tor-github/pr/1399' 2019-10-09 16:37:47 -04:00
Nick Mathewson 755f001600 Merge remote-tracking branch 'tor-github/pr/1401' 2019-10-09 16:29:46 -04:00