]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
5 years agohs-v2: Turn logs into protocol warning
David Goulet [Thu, 30 Jan 2020 16:14:50 +0000 (11:14 -0500)] 
hs-v2: Turn logs into protocol warning

All of those can be triggered remotely so change them to protocol warnings.

Fixes #32706

Signed-off-by: David Goulet <dgoulet@torproject.org>
5 years agocopy 0.4.1.8 and 0.4.2.6 entries to master ChangeLog, ReleaseNotes.
Nick Mathewson [Thu, 30 Jan 2020 15:05:42 +0000 (10:05 -0500)] 
copy 0.4.1.8 and 0.4.2.6 entries to master ChangeLog, ReleaseNotes.

5 years agoMerge branch 'bug32673_035'
Nick Mathewson [Thu, 30 Jan 2020 14:58:23 +0000 (09:58 -0500)] 
Merge branch 'bug32673_035'

5 years agoMerge branch 'bug33093_logging_035'
Nick Mathewson [Thu, 30 Jan 2020 14:55:40 +0000 (09:55 -0500)] 
Merge branch 'bug33093_logging_035'

5 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Thu, 30 Jan 2020 00:44:34 +0000 (19:44 -0500)] 
Merge branch 'maint-0.4.2'

Use "-s ours" to avoid version bump.

5 years agoBump version to 0.4.2.6
Nick Mathewson [Thu, 30 Jan 2020 00:44:29 +0000 (19:44 -0500)] 
Bump version to 0.4.2.6

5 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Thu, 30 Jan 2020 00:42:43 +0000 (19:42 -0500)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

"Ours" merge to avoid version bump.

5 years agobump to 0.4.1.8
Nick Mathewson [Thu, 30 Jan 2020 00:42:24 +0000 (19:42 -0500)] 
bump to 0.4.1.8

5 years agoMerge branch 'maint-0.4.2'
teor [Wed, 29 Jan 2020 21:55:20 +0000 (07:55 +1000)] 
Merge branch 'maint-0.4.2'

5 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
teor [Wed, 29 Jan 2020 21:55:12 +0000 (07:55 +1000)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

5 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
teor [Wed, 29 Jan 2020 21:55:05 +0000 (07:55 +1000)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

5 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Wed, 29 Jan 2020 21:54:58 +0000 (07:54 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

5 years agoMerge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1
teor [Wed, 29 Jan 2020 21:54:39 +0000 (07:54 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

5 years agoMerge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5
teor [Wed, 29 Jan 2020 21:53:53 +0000 (07:53 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

5 years agobuf_read_from_tls: Return ERROR_MISC, not WANTWRITE, on BUG().
Nick Mathewson [Wed, 29 Jan 2020 13:49:01 +0000 (08:49 -0500)] 
buf_read_from_tls: Return ERROR_MISC, not WANTWRITE, on BUG().

Fixes bug 32673; bugfix on 0.3.0.4-alpha.  We introduced these
checks in ee5471f9aab5526 to help diagnose 21369, but we used "-1"
when "TOR_TLS_ERROR_MISC" would have been correct.  Found by opara.

I don't think that this is actually getting triggered in the wild,
but if it were, it could cause nasty behavior: spurious
WANTREAD/WANTWRITE returns have a way of turning into CPU-eating
busy-loops.

5 years agoChange BUG() messages in buf_flush_to_tls() to IF_BUG_ONCE()
Nick Mathewson [Wed, 29 Jan 2020 13:31:22 +0000 (08:31 -0500)] 
Change BUG() messages in buf_flush_to_tls() to IF_BUG_ONCE()

We introduced these BUG() checks in b0ddaac07428a06 to prevent a
recurrence of bug 23690.  But there's a report of the BUG() message
getting triggered and filling up the disk.  Let's change it to
IF_BUG_ONCE().

Fixes bug 33093; bugfix on 0.3.2.2-alpha.

5 years agoMerge remote-tracking branch 'tor-github/pr/1680'
Nick Mathewson [Tue, 28 Jan 2020 13:15:21 +0000 (08:15 -0500)] 
Merge remote-tracking branch 'tor-github/pr/1680'

5 years agoMerge remote-tracking branch 'tor-github/pr/1689'
Nick Mathewson [Tue, 28 Jan 2020 12:55:34 +0000 (07:55 -0500)] 
Merge remote-tracking branch 'tor-github/pr/1689'

5 years agoTravis: Stop allowing stem test failures
teor [Tue, 28 Jan 2020 09:55:35 +0000 (19:55 +1000)] 
Travis: Stop allowing stem test failures

Stop allowing failures on the Travis CI stem tests job. It looks like
all the stem hangs we were seeing are now fixed, but let's make sure we
see them if they happen again.

Closes ticket 33075.

5 years agoMerge branch 'tor-github/pr/1683'
David Goulet [Mon, 27 Jan 2020 17:04:25 +0000 (12:04 -0500)] 
Merge branch 'tor-github/pr/1683'

5 years agochanges file for ticket 33039
Taylor Yu [Fri, 24 Jan 2020 17:57:45 +0000 (11:57 -0600)] 
changes file for ticket 33039

5 years agotests for ticket 33039
Taylor Yu [Fri, 24 Jan 2020 16:33:01 +0000 (10:33 -0600)] 
tests for ticket 33039

5 years agofix leak in GETCONF
Taylor Yu [Fri, 24 Jan 2020 15:06:30 +0000 (09:06 -0600)] 
fix leak in GETCONF

Fix a memory leak introduced by refactoring of control reply
formatting code.  Fixes bug 33039; bugfix on 0.4.3.1-alpha.

5 years agoGit hooks: remove support for 0.2.9 directory layout.
Nick Mathewson [Thu, 23 Jan 2020 15:26:09 +0000 (10:26 -0500)] 
Git hooks: remove support for 0.2.9 directory layout.

We no longer will be pushing or committing things in branches that
use src/common or src/or.

Resolves ticket 32957.

5 years agoupdate doc/HACKING/ReleasingTor.md
Nick Mathewson [Thu, 23 Jan 2020 13:55:55 +0000 (08:55 -0500)] 
update doc/HACKING/ReleasingTor.md

5 years agoBump to 0.4.3.1-alpha-dev
Nick Mathewson [Thu, 23 Jan 2020 01:30:46 +0000 (20:30 -0500)] 
Bump to 0.4.3.1-alpha-dev

5 years agoMerge branch 'tor-github/pr/1677'
David Goulet [Wed, 22 Jan 2020 19:32:30 +0000 (14:32 -0500)] 
Merge branch 'tor-github/pr/1677'

5 years agoLower log level of standard error messages from PT's.
Alexander Færøy [Mon, 20 Jan 2020 18:29:30 +0000 (18:29 +0000)] 
Lower log level of standard error messages from PT's.

This patch lowers the log level of error messages from PT processes from
warning to debug.

See: https://bugs.torproject.org/33005

5 years agopick a release date tor-0.4.3.1-alpha
Nick Mathewson [Wed, 22 Jan 2020 18:10:54 +0000 (13:10 -0500)] 
pick a release date

5 years agoAdd some changelog edits from seborn
Nick Mathewson [Wed, 22 Jan 2020 18:10:09 +0000 (13:10 -0500)] 
Add some changelog edits from seborn

5 years agodraft a changelog blurb for 0.4.3.1-alpha
Nick Mathewson [Wed, 22 Jan 2020 16:56:44 +0000 (11:56 -0500)] 
draft a changelog blurb for 0.4.3.1-alpha

5 years agoAdd changes file
rl1987 [Wed, 22 Jan 2020 12:25:30 +0000 (20:25 +0800)] 
Add changes file

5 years agoRun doxygen makefile target on Travis
rl1987 [Wed, 22 Jan 2020 11:42:47 +0000 (19:42 +0800)] 
Run doxygen makefile target on Travis

5 years agodir_connection_t: Explain dirconn_direct better
teor [Tue, 21 Jan 2020 23:27:40 +0000 (09:27 +1000)] 
dir_connection_t: Explain dirconn_direct better

Direct connections can use a DirPort or ORPort.
Indirect connections must use a multi-hop Tor circuit.

Comment-only changes.

5 years agoBump to 0.4.3.1-alpha
Nick Mathewson [Tue, 21 Jan 2020 17:33:05 +0000 (12:33 -0500)] 
Bump to 0.4.3.1-alpha

5 years agochangelog: small edits
Nick Mathewson [Tue, 21 Jan 2020 17:32:33 +0000 (12:32 -0500)] 
changelog: small edits

5 years agoRun format_changelog.py
Nick Mathewson [Tue, 21 Jan 2020 16:37:10 +0000 (11:37 -0500)] 
Run format_changelog.py

5 years agoInitial incorporation of 0.4.3.x changelogs.
Nick Mathewson [Tue, 21 Jan 2020 16:35:59 +0000 (11:35 -0500)] 
Initial incorporation of 0.4.3.x changelogs.

5 years agoRemove changes files that already appeared in 0.4.2.5
Nick Mathewson [Tue, 21 Jan 2020 16:33:26 +0000 (11:33 -0500)] 
Remove changes files that already appeared in 0.4.2.5

5 years agoMerge branch 'tor-github/pr/1675'
David Goulet [Mon, 20 Jan 2020 15:47:49 +0000 (10:47 -0500)] 
Merge branch 'tor-github/pr/1675'

5 years agoMerge branch 'tor-github/pr/1668'
David Goulet [Mon, 20 Jan 2020 15:44:03 +0000 (10:44 -0500)] 
Merge branch 'tor-github/pr/1668'

5 years agodoc: Minor man page fixes
teor [Mon, 20 Jan 2020 06:40:02 +0000 (16:40 +1000)] 
doc: Minor man page fixes

Fix a client port list that's missing HTTPTunnelPort.

Wrap a long line.

5 years agodoc: Improve port flags in man page
teor [Mon, 20 Jan 2020 06:38:02 +0000 (16:38 +1000)] 
doc: Improve port flags in man page

Explain that:
* most flags default to off
* flags that default to on are specified

Document PreferIPv6Automap in its "No" form, because it's on by
default.

Cleanup after 32637.

5 years agoconfig: Make clients tell dual-stack exits they prefer IPv6
teor [Mon, 20 Jan 2020 06:17:38 +0000 (16:17 +1000)] 
config: Make clients tell dual-stack exits they prefer IPv6

Make Tor clients tell dual-stack exits that they prefer IPv6
connections.

This change is equivalent to setting the PreferIPv6 flag on
SOCKSPorts (and most other listener ports). Tor Browser has
been setting this flag for some time, and we want to remove a
client distinguisher at exits.

Also update the man page, putting all the IP flags in their
non-default forms.

Closes ticket 32637.

5 years agoMerge remote-tracking branch 'tor-github/pr/1673'
teor [Mon, 20 Jan 2020 05:52:40 +0000 (15:52 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1673'

5 years agotest/nodelist: Remove ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD
teor [Mon, 20 Jan 2020 03:42:13 +0000 (13:42 +1000)] 
test/nodelist: Remove ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD

When we removed obsolete consensus methods in 32695, we also
removed ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD, so we need to
remove it from the routerstatus format tests.

Part of 20218.

5 years agoMerge branch 'ticket20218_rebased_squashed' into ticket20218_merged
teor [Mon, 20 Jan 2020 05:50:54 +0000 (15:50 +1000)] 
Merge branch 'ticket20218_rebased_squashed' into ticket20218_merged

* ticket 32695 removed networkstatus_consensus_has_ipv6(),
  keep that change in master.
* ticket 20218 modifies the function name and comment for
  routerstatus_has_visibly_changed(), keep that change
  in ticket20218_rebased_squashed.

5 years agoRename test to match new identifier.
Nick Mathewson [Fri, 17 Jan 2020 14:27:58 +0000 (09:27 -0500)] 
Rename test to match new identifier.

5 years agosplit a wide line
Nick Mathewson [Fri, 17 Jan 2020 14:23:32 +0000 (09:23 -0500)] 
split a wide line

5 years agoRename routerstatus_has_changed to routerstatus_has_visibly_changed
Nick Mathewson [Fri, 17 Jan 2020 14:22:12 +0000 (09:22 -0500)] 
Rename routerstatus_has_changed to routerstatus_has_visibly_changed

This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        routerstatus_has_changed routerstatus_has_visibly_changed

It was generated with --no-verify, since it introduces a wide line.
I'll fix it in a subsequent commit.

5 years agoUpdate routerstatus_has_changed tests.
Nick Mathewson [Fri, 17 Jan 2020 14:20:00 +0000 (09:20 -0500)] 
Update routerstatus_has_changed tests.

Now they also check whether output of routerstatus_format_entry()
has changed.

5 years agoAdd unit test for routerstatus_has_changed()
Nick Mathewson [Thu, 16 Jan 2020 17:14:14 +0000 (12:14 -0500)] 
Add unit test for routerstatus_has_changed()

5 years agoMerge remote-tracking branch 'tor-github/pr/1671'
teor [Mon, 20 Jan 2020 05:40:42 +0000 (15:40 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1671'

5 years agoMerge remote-tracking branch 'tor-github/pr/1667'
teor [Mon, 20 Jan 2020 05:40:08 +0000 (15:40 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1667'

5 years agoadd_c_file: Fix "control line not preceded by a blank line"
teor [Wed, 15 Jan 2020 23:38:26 +0000 (09:38 +1000)] 
add_c_file: Fix "control line not preceded by a blank line"

Fix dirauth and relay module include.am add_c_file.py
"control line not preceded by a blank line" errors.

Also remove a duplicate ADD_C_FILE: SOURCES in the relay module.

Obviously correct fixes to already-reviewed code.

5 years agoadd_c_file: Replace asserts with exceptions
teor [Mon, 20 Jan 2020 03:20:42 +0000 (13:20 +1000)] 
add_c_file: Replace asserts with exceptions

Closes 32962.

5 years agoadd_c_file: Improve script documentation
teor [Mon, 20 Jan 2020 03:20:14 +0000 (13:20 +1000)] 
add_c_file: Improve script documentation

Part of 32962.

5 years agoadd_c_file: Improve tor source directory checks
teor [Mon, 20 Jan 2020 03:04:02 +0000 (13:04 +1000)] 
add_c_file: Improve tor source directory checks

Check that the script isn't in a tor build directory, by looking
for a src/include.am file.

Part of 32962.

5 years agoFix a small lint-changes warning.
Nick Mathewson [Fri, 17 Jan 2020 13:49:24 +0000 (08:49 -0500)] 
Fix a small lint-changes warning.

5 years agoMerge remote-tracking branch 'tor-github/pr/1529'
Nick Mathewson [Fri, 17 Jan 2020 13:49:56 +0000 (08:49 -0500)] 
Merge remote-tracking branch 'tor-github/pr/1529'

5 years agoInitialize publish/subscribe code when running as an NT service.
Nick Mathewson [Mon, 6 Jan 2020 13:45:29 +0000 (08:45 -0500)] 
Initialize publish/subscribe code when running as an NT service.

Fixes bug 32778; bugfix on 0.4.1.1-alpha.

5 years agoRevert "Use tor_api.h entry points in ntmain.c."
Nick Mathewson [Fri, 17 Jan 2020 13:39:56 +0000 (08:39 -0500)] 
Revert "Use tor_api.h entry points in ntmain.c."

This reverts commit dca2629480f143ed8deb71b73b15c7c5ff890571.

5 years agoRevert "Restore feature where nt-services detect non-"run_tor" modes."
Nick Mathewson [Fri, 17 Jan 2020 13:39:49 +0000 (08:39 -0500)] 
Revert "Restore feature where nt-services detect non-"run_tor" modes."

This reverts commit 5c240db0bf7751d74ba438a1ca4ef0d051a53df7.

5 years agoMerge branch 'ticket32806'
Nick Mathewson [Fri, 17 Jan 2020 13:37:33 +0000 (08:37 -0500)] 
Merge branch 'ticket32806'

5 years agoRemove some dead checks
Nick Mathewson [Fri, 17 Jan 2020 13:31:18 +0000 (08:31 -0500)] 
Remove some dead checks

The only code that could set these options to be negative was in the
unit tests.

5 years agofix a stray asterisk in a comment
Nick Mathewson [Fri, 17 Jan 2020 13:25:09 +0000 (08:25 -0500)] 
fix a stray asterisk in a comment

5 years agoMerge branch 'ticket32487_squashed_and_merged'
Nick Mathewson [Fri, 17 Jan 2020 12:50:50 +0000 (07:50 -0500)] 
Merge branch 'ticket32487_squashed_and_merged'

5 years agoMerge branch 'ticket32695_squashed'
Nick Mathewson [Thu, 16 Jan 2020 21:42:01 +0000 (16:42 -0500)] 
Merge branch 'ticket32695_squashed'

5 years agoRemove functions that checked for pre-ipv6 consensus.
Nick Mathewson [Wed, 15 Jan 2020 16:26:14 +0000 (11:26 -0500)] 
Remove functions that checked for pre-ipv6 consensus.

We no longer need or need to test:
  * node_awaiting_ipv6()
  * networkstatus_consensus_has_ipv6().

5 years agoRemove routerstatus_format_entry() consensus_method argument as unused
Nick Mathewson [Wed, 15 Jan 2020 16:20:30 +0000 (11:20 -0500)] 
Remove routerstatus_format_entry() consensus_method argument as unused

5 years agoRemove support for now-obsolete consensus methods before 28.
Nick Mathewson [Thu, 9 Jan 2020 17:41:56 +0000 (12:41 -0500)] 
Remove support for now-obsolete consensus methods before 28.

Closes ticket 32695.

5 years agoexpose routerstatus_has_changed to unit tests.
Nick Mathewson [Thu, 16 Jan 2020 17:14:12 +0000 (12:14 -0500)] 
expose routerstatus_has_changed to unit tests.

5 years agoRefactor routerstatus_has_changed function
Victor Nepveu [Tue, 12 Nov 2019 21:27:36 +0000 (22:27 +0100)] 
Refactor routerstatus_has_changed function

- Check all fields that might change in a routerstatus
- Document the refactoring

Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
5 years agoMerge remote-tracking branch 'tor-github/pr/1663'
Nick Mathewson [Thu, 16 Jan 2020 15:24:39 +0000 (10:24 -0500)] 
Merge remote-tracking branch 'tor-github/pr/1663'

5 years agoMerge branch 'ticket32487_squashed' into ticket32487_squashed_and_merged
Nick Mathewson [Thu, 16 Jan 2020 12:57:37 +0000 (07:57 -0500)] 
Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_merged

Resolved conflicts in src/core/include.am

5 years agoDocument why dircache is not included in --list-modules
Nick Mathewson [Wed, 15 Jan 2020 17:46:10 +0000 (12:46 -0500)] 
Document why dircache is not included in --list-modules

5 years agoAdd have_module_dircache().
Nick Mathewson [Wed, 15 Jan 2020 17:45:56 +0000 (12:45 -0500)] 
Add have_module_dircache().

5 years agoTurn several functions from stubs into macros
Nick Mathewson [Wed, 15 Jan 2020 17:30:43 +0000 (12:30 -0500)] 
Turn several functions from stubs into macros

This may help the compiler eliminate deadcode.

5 years agoRename dirclient_modes.h identifiers to start with dirclient_
Nick Mathewson [Wed, 15 Jan 2020 16:57:49 +0000 (11:57 -0500)] 
Rename dirclient_modes.h identifiers to start with dirclient_

This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        directory_must_use_begindir dirclient_must_use_begindir \
        directory_fetches_from_authorities dirclient_fetches_from_authorities \
        directory_fetches_dir_info_early dirclient_fetches_dir_info_early \
        directory_fetches_dir_info_later dirclient_fetches_dir_info_later \
        directory_too_idle_to_fetch_descriptors dirclient_too_idle_to_fetch_descriptors

5 years agoMove directory_must_use_begindir() to dirclient_modes.[ch]
Nick Mathewson [Wed, 15 Jan 2020 16:55:16 +0000 (11:55 -0500)] 
Move directory_must_use_begindir() to dirclient_modes.[ch]

5 years agoMove dirclient-related functions out of dirserv, and reenable them
Nick Mathewson [Wed, 15 Jan 2020 16:43:14 +0000 (11:43 -0500)] 
Move dirclient-related functions out of dirserv, and reenable them

I had incorrectly identified these functions as dircache-only, when
in fact they apply to everyone who acts a directory client.

5 years agoAdd a changes file for disabling the dircache code.
Nick Mathewson [Thu, 9 Jan 2020 02:55:41 +0000 (21:55 -0500)] 
Add a changes file for disabling the dircache code.

5 years agoDisable feature/dircache files when dircache module is disabled.
Nick Mathewson [Thu, 9 Jan 2020 02:13:29 +0000 (21:13 -0500)] 
Disable feature/dircache files when dircache module is disabled.

To make Tor still work, we define a minimal dircache_stub.c file
that defines the entry points to the module that can actually be
seen by the compiler when we're building with dircache and relay
disabled.

5 years agoUse dir_conn_clear_spool() in connection.c.
Nick Mathewson [Thu, 9 Jan 2020 02:43:02 +0000 (21:43 -0500)] 
Use dir_conn_clear_spool() in connection.c.

This is cleaner than iterating over the spool.

5 years agoMove dirserv_get_routerdescs() to control_getinfo.c
Nick Mathewson [Thu, 9 Jan 2020 02:32:16 +0000 (21:32 -0500)] 
Move dirserv_get_routerdescs() to control_getinfo.c

This function had some XXX comments indicating (correctly) that it
was not actually used by the dirserver code, and that only the
controller still used it.

5 years agoMove dir_split_resource_into_spoolable() to dircache module.
Nick Mathewson [Thu, 9 Jan 2020 02:24:26 +0000 (21:24 -0500)] 
Move dir_split_resource_into_spoolable() to dircache module.

Only directory caches actually need to spool things.

5 years agoDefine a "dircache" module.
Nick Mathewson [Thu, 9 Jan 2020 02:03:20 +0000 (21:03 -0500)] 
Define a "dircache" module.

For now, this module is enabled whenever the relay module is
enabled, and disabled whenever the relay module is disabled.  Though
they are logically separate, the use cases for running one without
the other are rare enough that we don't really want to support
compiling them independently.

5 years agoMerge branch 'maint-0.4.2'
teor [Thu, 16 Jan 2020 00:00:55 +0000 (10:00 +1000)] 
Merge branch 'maint-0.4.2'

5 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
teor [Thu, 16 Jan 2020 00:00:47 +0000 (10:00 +1000)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

5 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
teor [Thu, 16 Jan 2020 00:00:40 +0000 (10:00 +1000)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

5 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Thu, 16 Jan 2020 00:00:32 +0000 (10:00 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

5 years agoMerge remote-tracking branch 'tor-github/pr/1513' into maint-0.3.5
teor [Wed, 15 Jan 2020 23:57:27 +0000 (09:57 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1513' into maint-0.3.5

5 years agoDon't escape the bridge distribution value.
Alexander Færøy [Wed, 15 Jan 2020 23:24:18 +0000 (23:24 +0000)] 
Don't escape the bridge distribution value.

We already check if there are invalid values in
check_bridge_distribution_setting() and reject the value if that is the
case. We can therefore only have strings of [A-Z] | [a-z] | [0-9] | '-'
| '_' here which is according to the directory specification.

See: https://bugs.torproject.org/32753

5 years agoadd_c_file: Fix "control line not preceded by a blank line"
teor [Wed, 15 Jan 2020 23:38:26 +0000 (09:38 +1000)] 
add_c_file: Fix "control line not preceded by a blank line"

Fix dirauth and relay module include.am add_c_file.py
"control line not preceded by a blank line" errors.

Also remove a duplicate ADD_C_FILE: SOURCES in the relay module.

Obviously correct fixes to already-reviewed code.

5 years agoadd_c_file: Rename variables based on the type of path
teor [Wed, 15 Jan 2020 23:15:22 +0000 (09:15 +1000)] 
add_c_file: Rename variables based on the type of path

* fname for generic file paths
* tor_fname for paths relative to the top-level tor directory
* src_fname for paths relative to tor's src directory

With prefixes as required to disambiguate different paths of the same
type.

Part of 32962.

5 years agoadd_c_file: Simplify some usage of srcdir_file()
teor [Wed, 15 Jan 2020 22:55:20 +0000 (08:55 +1000)] 
add_c_file: Simplify some usage of srcdir_file()

Part of 32962.

5 years agoadd_c_file: Document the paths used by each part of the script
teor [Wed, 15 Jan 2020 22:48:44 +0000 (08:48 +1000)] 
add_c_file: Document the paths used by each part of the script

Most paths are relative to the top-level tor directory, but the
paths in the C and H files are relative to tor's src directory.

Part of 32962.

5 years agoadd_c_file: Improve path handling and canonicalisation
teor [Wed, 15 Jan 2020 22:36:45 +0000 (08:36 +1000)] 
add_c_file: Improve path handling and canonicalisation

* distinguish between paths relative to the top-level tor directory,
  and paths relative to tor's src directory
* canonicalise paths before using them
* check that the script is run from the top-level tor directory
* check that the file is being created in tor's src directory

Part of 32962.

5 years agoadd_c_file: tolerate ./ in filenames.
Nick Mathewson [Wed, 15 Jan 2020 17:58:52 +0000 (12:58 -0500)] 
add_c_file: tolerate ./ in filenames.

5 years agoadd_c_file: handle adding to the end of a list correctly.
Nick Mathewson [Wed, 15 Jan 2020 17:54:47 +0000 (12:54 -0500)] 
add_c_file: handle adding to the end of a list correctly.

Fixes bug 32962.