Commit Graph

34539 Commits

Author SHA1 Message Date
Nick Mathewson 8d1f31190e Move directory_must_use_begindir() to dirclient_modes.[ch] 2020-01-16 07:48:17 -05:00
Nick Mathewson 773bcf5629 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.
2020-01-16 07:48:17 -05:00
Nick Mathewson a1bc471dd4 Add a changes file for disabling the dircache code. 2020-01-16 07:48:17 -05:00
Nick Mathewson 8a0c739467 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.
2020-01-16 07:48:17 -05:00
Nick Mathewson 6e12a8f047 Use dir_conn_clear_spool() in connection.c.
This is cleaner than iterating over the spool.
2020-01-16 07:48:17 -05:00
Nick Mathewson fe8156dbc2 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.
2020-01-16 07:48:17 -05:00
Nick Mathewson 4cf15ee015 Move dir_split_resource_into_spoolable() to dircache module.
Only directory caches actually need to spool things.
2020-01-16 07:48:17 -05:00
Nick Mathewson 888a0be0b9 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.
2020-01-16 07:48:17 -05:00
Nick Mathewson a48cb9fa43 core/include.am: spelling fix 2020-01-08 20:50:02 -05:00
Nick Mathewson 4f02812242 It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
Nick Mathewson 2d27a3ecc0 Run "make autostyle"; add an endif comment 2020-01-08 18:38:24 -05:00
teor a58cffe195 router: Improve port search function comments 2020-01-08 17:47:08 +10:00
Roger Dingledine 81fd8aad24 speaking of utf-8, remove strange char from comment 2020-01-07 18:25:17 -05:00
Nick Mathewson e231cd5b61 Merge branch 'ticket32845_squashed' 2020-01-07 10:16:15 -05:00
teor 1fd27155d4 changes: file for 32845 2020-01-07 10:16:08 -05:00
teor 0e3fd4df99 string: Check UTF-8 string pointer and length
If they are inconsistent, output a raw bug log.

Part of 32845.
2020-01-07 10:16:08 -05:00
Nick Mathewson 17a1ae025a Merge remote-tracking branch 'tor-github/pr/1640' 2020-01-07 08:59:31 -05:00
Nick Mathewson c48068ece3 test_helpers: add a missing free for CID 1457527. 2020-01-07 08:22:02 -05:00
Nick Mathewson f2aeaaf71d Add new state to connection_proxy_state_to_string()
Also, add a CTASSERT() to make sure that we don't let this array get
out-of-sync again.

Found by coverity; this is CID 1457528.
2020-01-07 08:09:27 -05:00
teor d62dbb6762 string: Add extra UTF-8 test cases
These test cases are validated differently by some
programming languages, because those languages have
incorrect UTF-8 implementations.

We want to make sure that tor validates them correctly.

Closes ticket 32845.
2020-01-07 17:05:48 +10:00
Neel Chauhan ee015d36f8 Space the a-d unsigned ints in tor_inet_aton() 2020-01-06 20:20:38 -08:00
Nick Mathewson 1b63eea66c Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_merged 2020-01-06 13:41:20 -05:00
Suphanat Chunhapanya 14d781fff6 circuit: Add change file 2020-01-06 13:39:10 -05:00
Suphanat Chunhapanya 4264717ca3 test: HTTP CONNECT protocol 2020-01-06 13:39:10 -05:00
Suphanat Chunhapanya de58a49a2d test: HAPRoxy protocol 2020-01-06 13:39:10 -05:00
Suphanat Chunhapanya 41b9dca07b test: Implement haproxy 2020-01-06 13:39:10 -05:00
Suphanat Chunhapanya 119004e87d circuit: Implement haproxy 2020-01-06 13:39:10 -05:00
Nick Mathewson 9276c07a91 Merge remote-tracking branch 'tor-github/pr/1615' 2020-01-06 13:32:33 -05:00
Nick Mathewson e08d07692f Add documentation about building a TAGS file.
Patch from opara.  Closes ticket 32779.
2020-01-06 13:31:30 -05:00
Nick Mathewson 1f498220bd Merge remote-tracking branch 'tor-github/pr/1620' 2020-01-06 13:28:10 -05:00
Nick Mathewson 48f7341783 Merge branch 'maint-0.4.2' 2020-01-06 13:24:01 -05:00
Nick Mathewson 6da989cfe8 Merge remote-tracking branch 'tor-github/pr/1612' into maint-0.4.2 2020-01-06 13:20:57 -05:00
Nick Mathewson 13216f848a Merge branch 'maint-0.4.2' 2020-01-06 08:08:59 -05:00
Nick Mathewson 2d8d6d1ebf Merge branch 'maint-0.4.1' into maint-0.4.2 2020-01-06 08:08:59 -05:00
Nick Mathewson f5461a4bdf update changes file to pass "make check-changes" 2020-01-06 08:08:48 -05:00
Nick Mathewson 16e94dc7a7 Merge branch 'maint-0.4.1' into maint-0.4.2 2020-01-06 08:06:54 -05:00
Peter Gerber b9d81282e0 Fix sandbox crash during reload of logging configuration
Allow calls to dup() which was introduced in commit a22fbab986.

From a security perspective, I don't think this should impact the
security of the sandbox significantly. As far as I can tell, there
is nothing an adversary can do with a duplicated FD that can't be
done with the original.
2020-01-05 15:24:45 +00:00
Neel Chauhan b062e0f0a4 Fix spacing in tor_sscanf() call in tor_inet_aton() 2019-12-20 14:11:03 -05:00
Neel Chauhan 01c6fde326 Fix spacing in tor_inet_aton() function header 2019-12-20 14:10:43 -05:00
Nick Mathewson 33a0f15b21 Merge branch 'bug29819_035' 2019-12-20 07:37:47 -05:00
Nick Mathewson 34f92a6e73 Merge remote-tracking branch 'tor-github/pr/1623' 2019-12-20 07:18:38 -05:00
teor 8c23ac4ae7 Replace several C identifiers.
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \
        TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \
        CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \
        EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \
        SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
2019-12-20 13:27:58 +10:00
teor da1f76f126 Merge branch 'maint-0.4.2' 2019-12-20 10:12:59 +10:00
teor 5dbb607e94 Merge branch 'maint-0.4.1' into maint-0.4.2 2019-12-20 10:12:51 +10:00
teor 7237637871 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-12-20 10:12:43 +10:00
teor 7e17c24381 Merge remote-tracking branch 'tor-github/pr/1606' 2019-12-20 10:12:18 +10:00
teor cd160291a7 Code Style: Delete headers that are included twice
These changes were created using the "make autostyle" from
32522, and then split into commits.
2019-12-20 09:53:31 +10:00
teor d8b868e483 Code Style: Delete PRIVATE defines that are never used
Some ".c" files define *_PRIVATE macros, but those macros are
not used in any header file. Delete them.

These changes were created using the "make autostyle" from
32522, and then split into commits.
2019-12-20 09:50:50 +10:00
teor 57b6678d52 Run "make autostyle" 2019-12-20 09:45:53 +10:00
teor ac3a9aaf0d Makefile/git scripts: Add comments to keep owned file lists in sync 2019-12-20 09:35:18 +10:00