]>
git.ipfire.org Git - thirdparty/tor.git/log
Nick Mathewson [Thu, 9 Jan 2020 21:02:41 +0000 (16:02 -0500)]
Merge branch 'disable_ns_macro'
Nick Mathewson [Thu, 9 Jan 2020 20:27:32 +0000 (15:27 -0500)]
Merge branch 'ticket22029_attempt_squashed'
Neel Chauhan [Sat, 14 Dec 2019 18:27:26 +0000 (13:27 -0500)]
Add changes file for Bug #22029
Neel Chauhan [Sat, 14 Dec 2019 18:26:42 +0000 (13:26 -0500)]
Update tor.1 man page for Bug #22029
Neel Chauhan [Sat, 14 Dec 2019 18:22:15 +0000 (13:22 -0500)]
Add dirserv_load_fingerprint_file() test
Neel Chauhan [Sat, 14 Dec 2019 18:16:59 +0000 (13:16 -0500)]
Allow
ed25519 keys to be banned in approved-routers
Nick Mathewson [Thu, 9 Jan 2020 16:51:46 +0000 (11:51 -0500)]
Changes file for ticket 32887 (NS*() removal)
Nick Mathewson [Thu, 9 Jan 2020 16:43:49 +0000 (11:43 -0500)]
Fix wide lines from NS() removal fallout.
Nick Mathewson [Thu, 9 Jan 2020 15:29:56 +0000 (10:29 -0500)]
Remove NS*() macros from test.h.
We never used them very much, and although they had potential to
clarify some of our tests, they also made some of the logic harder
for people to follow. Clang-format can't make head or tail of them,
so the time has come to say goodbye to them.
Nick Mathewson [Thu, 9 Jan 2020 15:26:10 +0000 (10:26 -0500)]
Remove all usage of the NS*() macros in test*.c
This is an automatically generated commit, made with the following
kludgey perl script. It results in a number of wide lines, which
I'll clean up in a subsequent commit.
#/usr/bin/perl -w -i
$mod = "NS_MODULE";
$submod = "NS_SUBMODULE";
$last_was_empty = 0;
while (<>) {
s/\bASPECT\(\s*(\w+)\s*,\s*(\w+)\s*\)/$1_$2/;
if (/# *define +NS_MODULE +(\w+)/) {
$mod = $1;
next;
} elsif (/# *define +NS_SUBMODULE +(\w+)/) {
$submod = $1;
next;
}
next if (/#undef NS_(SUB)?MODULE/);
s/NS\(\s*test_main\s*\)/test_${mod}_${submod}/;
s/NS\(\s*(\w+)\s*\)/${mod}_${submod}_$1/g;
s/NS_FULL\(\\s*(\w+)\s*,\s*(\w+),\s*(\w+)\s*\)/$1_$2_$3/;
s/^(\s*)NS_MOCK\(\s*(\w+)\s*\)/$1MOCK($2,\n$1 ${mod}_${submod}_$2)/;
s/NS_UNMOCK\(\s*(\w+)\s*\)/UNMOCK($1)/;
s/TEST_CASE\(\s*(\w+)\s*\)/{ "$1", test_${mod}_$1, TT_FORK, NULL, NULL }/;
s/TEST_CASE_ASPECT\(\s*(\w+)\s*,\s*(\w+)\s*\)/{ "$1_$2", test_${mod}_$1_$2, TT_FORK, NULL, NULL }/;
s/NS_DECL\(\s*([^,]+)\s*,\s*([^,]+)\s*,\s*(\(.*)\);/static $1 ${mod}_${submod}_$2$3;\nATTR_UNUSED static int ${mod}_${submod}_$2_called = 0;/;
s/\bCALLED\(\s*(\w+)\s*\)/${mod}_${submod}_$1_called/;
if (/^$/) {
print if (! $last_was_empty);
$last_was_empty = 1;
} else {
$last_was_empty = 0;
print;
}
if (eof) {
$mod = "NS_MODULE";
$submod = "NS_SUBMODULE";
$last_was_empty = 0;
}
}
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date: Thu Jan 9 10:26:10 2020 -0500
#
# On branch disable_ns_macro
# Changes to be committed:
# modified: src/test/test_accounting.c
# modified: src/test/test_compat_libevent.c
# modified: src/test/test_dir.c
# modified: src/test/test_dir_handle_get.c
# modified: src/test/test_dns.c
# modified: src/test/test_options.c
# modified: src/test/test_procmon.c
# modified: src/test/test_rendcache.c
# modified: src/test/test_router.c
# modified: src/test/test_routerset.c
# modified: src/test/test_status.c
# modified: src/test/test_tortls.c
# modified: src/test/test_tortls_openssl.c
# modified: src/test/test_util_format.c
# modified: src/test/test_util_process.c
#
# Untracked files:
# experiments/
# locate_options.sh
# un_ns.pl
#
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date: Thu Jan 9 10:26:10 2020 -0500
#
# On branch disable_ns_macro
# Changes to be committed:
# modified: src/test/test_accounting.c
# modified: src/test/test_compat_libevent.c
# modified: src/test/test_dir.c
# modified: src/test/test_dir_handle_get.c
# modified: src/test/test_dns.c
# modified: src/test/test_options.c
# modified: src/test/test_procmon.c
# modified: src/test/test_rendcache.c
# modified: src/test/test_router.c
# modified: src/test/test_routerset.c
# modified: src/test/test_status.c
# modified: src/test/test_tortls.c
# modified: src/test/test_tortls_openssl.c
# modified: src/test/test_util_format.c
# modified: src/test/test_util_process.c
#
# Untracked files:
# experiments/
# locate_options.sh
# un_ns.pl
#
Nick Mathewson [Thu, 9 Jan 2020 16:01:45 +0000 (11:01 -0500)]
Replace various NS_MODULE/SUBMODULE vals with shorter names.
This will help avoid wide lines in our output.
Nick Mathewson [Thu, 9 Jan 2020 15:06:35 +0000 (10:06 -0500)]
Put all NS_DECL invocations on single lines.
This is going to make my script happier; these lines will soon
disappear.
Nick Mathewson [Thu, 9 Jan 2020 14:56:41 +0000 (09:56 -0500)]
Always define NS_MODULE and NS_SUBMODULE when NS is used.
When these macros aren't defined, the expansions of the NS macros
can get particularly ugly.
Nick Mathewson [Thu, 9 Jan 2020 12:32:39 +0000 (07:32 -0500)]
Merge branch 'pre_formatter_cleanups_squashed'
Nick Mathewson [Mon, 16 Dec 2019 19:45:40 +0000 (14:45 -0500)]
changes file for 32764.
Nick Mathewson [Mon, 16 Dec 2019 18:37:49 +0000 (13:37 -0500)]
process.h: include stdbool.h
We use bool, so we should include stdbool.
Nick Mathewson [Mon, 16 Dec 2019 18:24:21 +0000 (13:24 -0500)]
conscache.h: declare config_line_t structure.
This frees us from a dependency on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:20:31 +0000 (13:20 -0500)]
Turn authdir_mode_v3() into a non-inline function
This change means that authmode.h no longer needs to see
or_options_t, and frees us from an ordering dependency.
Nick Mathewson [Mon, 16 Dec 2019 18:17:11 +0000 (13:17 -0500)]
Include ht.h in all headers that use HT_ENTRY()
Without this change, compilation success depends on include order in
several tricky ways.
Nick Mathewson [Mon, 16 Dec 2019 18:16:35 +0000 (13:16 -0500)]
consdiffmgr.h: use struct declarations for several types
This prevents a dependency on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:14:20 +0000 (13:14 -0500)]
hs_circuitmap.h: use a struct declaration
This fixes a case where our compilation would depend on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:13:13 +0000 (13:13 -0500)]
routerparse.h: include parsecommon.h when exposing token table.
Without this include, our compilation depends more on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:12:22 +0000 (13:12 -0500)]
process.h: add a struct declaration for buf_t.
This lets us avoid a dependency on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:11:06 +0000 (13:11 -0500)]
timers.h: add declaration for timeval.
This frees us from some dependencies on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:10:20 +0000 (13:10 -0500)]
lib/conf: include torint.h in files that use it.
This frees us from some dependencies on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:08:08 +0000 (13:08 -0500)]
control_hs.h: use a couple of struct delcarations
Doing this frees us from some assumptions about include order.
Nick Mathewson [Mon, 16 Dec 2019 18:07:00 +0000 (13:07 -0500)]
connection.h: new includes and struct declarations
Using these frees us from several dependencies on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:06:00 +0000 (13:06 -0500)]
siphash.h: include stdint.
Doing this gives us a valid uint64_t type, freeing us from
dependencies on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:05:01 +0000 (13:05 -0500)]
hs_circuit: use struct declaration.
This frees us from a dependency on include order.
Nick Mathewson [Mon, 16 Dec 2019 18:04:07 +0000 (13:04 -0500)]
or_options_st.h: Add an include and a struct declaration.
This frees us from some dependencies on include order.
Nick Mathewson [Mon, 16 Dec 2019 17:58:58 +0000 (12:58 -0500)]
Include x509.h in tortls_internal.h.
This gives us the definition of tor_x509_cert_impl_t, and makes us
less dependent on include order.
Nick Mathewson [Mon, 16 Dec 2019 17:58:25 +0000 (12:58 -0500)]
Include sys/types.h in fdio.h, for "off_t".
Otherwise our compilation depends on include order.
Nick Mathewson [Mon, 16 Dec 2019 17:57:27 +0000 (12:57 -0500)]
Use raw_assert in ht.h
Also, include torerr.h from ht.h if we are using raw_assert.
Otherwise, our includes need to be ordered so that ht.h comes after
util_log.h.
Nick Mathewson [Tue, 3 Dec 2019 05:51:09 +0000 (00:51 -0500)]
Remove extra ; from tt_assert() macro definition.
We were actually omitting the semicolon in a few places, leading to
confusing indentation and some cocci failures.
Nick Mathewson [Mon, 2 Dec 2019 22:04:17 +0000 (17:04 -0500)]
Use new ENABLE/DISABLE_GCC_WARNING
This is an automated commit, generated by:
perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
Nick Mathewson [Mon, 2 Dec 2019 21:57:37 +0000 (16:57 -0500)]
Replace DISABLE/ENABLE_GCC_WARNING with something that will confuse clang-format less
Nick Mathewson [Thu, 9 Jan 2020 01:50:02 +0000 (20:50 -0500)]
core/include.am: spelling fix
Nick Mathewson [Wed, 8 Jan 2020 23:39:17 +0000 (18:39 -0500)]
It's 2020. Update the copyright dates with "make update-copyright"
Nick Mathewson [Wed, 8 Jan 2020 23:38:24 +0000 (18:38 -0500)]
Run "make autostyle"; add an endif comment
teor [Wed, 8 Jan 2020 07:46:28 +0000 (17:46 +1000)]
router: Improve port search function comments
Roger Dingledine [Tue, 7 Jan 2020 23:25:17 +0000 (18:25 -0500)]
speaking of utf-8, remove strange char from comment
Nick Mathewson [Tue, 7 Jan 2020 15:16:15 +0000 (10:16 -0500)]
Merge branch 'ticket32845_squashed'
teor [Tue, 7 Jan 2020 07:13:22 +0000 (17:13 +1000)]
changes: file for 32845
teor [Tue, 7 Jan 2020 07:09:25 +0000 (17:09 +1000)]
string: Check UTF-8 string pointer and length
If they are inconsistent, output a raw bug log.
Part of 32845.
Nick Mathewson [Tue, 7 Jan 2020 13:59:31 +0000 (08:59 -0500)]
Merge remote-tracking branch 'tor-github/pr/1640'
Nick Mathewson [Tue, 7 Jan 2020 13:22:02 +0000 (08:22 -0500)]
test_helpers: add a missing free for CID
1457527 .
Nick Mathewson [Tue, 7 Jan 2020 13:09:27 +0000 (08:09 -0500)]
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 .
teor [Tue, 7 Jan 2020 07:05:48 +0000 (17:05 +1000)]
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.
Neel Chauhan [Tue, 7 Jan 2020 04:20:38 +0000 (20:20 -0800)]
Space the a-d unsigned ints in tor_inet_aton()
Nick Mathewson [Mon, 6 Jan 2020 18:41:20 +0000 (13:41 -0500)]
Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_merged
Suphanat Chunhapanya [Mon, 2 Dec 2019 07:24:44 +0000 (15:24 +0800)]
circuit: Add change file
Suphanat Chunhapanya [Mon, 21 Oct 2019 17:55:23 +0000 (01:55 +0800)]
test: HTTP CONNECT protocol
Suphanat Chunhapanya [Mon, 21 Oct 2019 10:00:02 +0000 (18:00 +0800)]
test: HAPRoxy protocol
Suphanat Chunhapanya [Tue, 10 Sep 2019 07:32:08 +0000 (15:32 +0800)]
test: Implement haproxy
Suphanat Chunhapanya [Fri, 23 Aug 2019 03:44:49 +0000 (11:44 +0800)]
circuit: Implement haproxy
Nick Mathewson [Mon, 6 Jan 2020 18:32:33 +0000 (13:32 -0500)]
Merge remote-tracking branch 'tor-github/pr/1615'
Nick Mathewson [Mon, 6 Jan 2020 18:31:30 +0000 (13:31 -0500)]
Add documentation about building a TAGS file.
Patch from opara. Closes ticket 32779.
Nick Mathewson [Mon, 6 Jan 2020 18:28:10 +0000 (13:28 -0500)]
Merge remote-tracking branch 'tor-github/pr/1620'
Nick Mathewson [Mon, 6 Jan 2020 18:24:01 +0000 (13:24 -0500)]
Merge branch 'maint-0.4.2'
Nick Mathewson [Mon, 6 Jan 2020 18:20:57 +0000 (13:20 -0500)]
Merge remote-tracking branch 'tor-github/pr/1612' into maint-0.4.2
Nick Mathewson [Mon, 6 Jan 2020 13:08:59 +0000 (08:08 -0500)]
Merge branch 'maint-0.4.2'
Nick Mathewson [Mon, 6 Jan 2020 13:08:59 +0000 (08:08 -0500)]
Merge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Mon, 6 Jan 2020 13:08:48 +0000 (08:08 -0500)]
update changes file to pass "make check-changes"
Nick Mathewson [Mon, 6 Jan 2020 13:06:54 +0000 (08:06 -0500)]
Merge branch 'maint-0.4.1' into maint-0.4.2
Peter Gerber [Sun, 5 Jan 2020 14:48:54 +0000 (15:48 +0100)]
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.
Neel Chauhan [Fri, 20 Dec 2019 19:11:03 +0000 (14:11 -0500)]
Fix spacing in tor_sscanf() call in tor_inet_aton()
Neel Chauhan [Fri, 20 Dec 2019 19:10:43 +0000 (14:10 -0500)]
Fix spacing in tor_inet_aton() function header
Nick Mathewson [Fri, 20 Dec 2019 12:37:47 +0000 (07:37 -0500)]
Merge branch 'bug29819_035'
Nick Mathewson [Fri, 20 Dec 2019 12:18:38 +0000 (07:18 -0500)]
Merge remote-tracking branch 'tor-github/pr/1623'
teor [Fri, 20 Dec 2019 03:27:58 +0000 (13:27 +1000)]
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
teor [Fri, 20 Dec 2019 00:12:59 +0000 (10:12 +1000)]
Merge branch 'maint-0.4.2'
teor [Fri, 20 Dec 2019 00:12:51 +0000 (10:12 +1000)]
Merge branch 'maint-0.4.1' into maint-0.4.2
teor [Fri, 20 Dec 2019 00:12:43 +0000 (10:12 +1000)]
Merge branch 'maint-0.4.0' into maint-0.4.1
teor [Fri, 20 Dec 2019 00:12:18 +0000 (10:12 +1000)]
Merge remote-tracking branch 'tor-github/pr/1606'
teor [Mon, 25 Nov 2019 23:10:32 +0000 (09:10 +1000)]
Code Style: Delete headers that are included twice
These changes were created using the "make autostyle" from
32522, and then split into commits.
teor [Mon, 25 Nov 2019 23:07:47 +0000 (09:07 +1000)]
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.
teor [Thu, 19 Dec 2019 23:45:53 +0000 (09:45 +1000)]
Run "make autostyle"
teor [Mon, 25 Nov 2019 23:20:57 +0000 (09:20 +1000)]
Makefile/git scripts: Add comments to keep owned file lists in sync
Nick Mathewson [Thu, 19 Dec 2019 16:04:48 +0000 (11:04 -0500)]
Mark TestingEstimatedDescriptorPropagationTime as obsolete.
We stopped looking at this option in
85cf6dcba3693b , back when we
implemented the minimal pieces of prop275. Since then, we've had
code to validate and adjust this option, and to give it a different
value in testing networks, but the option hasn't actually done
anything.
We can safely mark it as OBSOLETE, since doing so does not make any
old configuration get rejected.
Closes ticket 32807.
Nick Mathewson [Thu, 19 Dec 2019 12:55:06 +0000 (07:55 -0500)]
Merge branch 'dirauth_config_squashed'
Nick Mathewson [Wed, 18 Dec 2019 16:49:26 +0000 (11:49 -0500)]
Declare relay/dirauth subsystem levels in a header.
This way, we can't get out of sync between the two declarations.
Nick Mathewson [Mon, 16 Dec 2019 00:05:17 +0000 (19:05 -0500)]
Add an integration test for options disabled by dirauth subsystem.
Nick Mathewson [Sun, 15 Dec 2019 16:46:55 +0000 (11:46 -0500)]
Add config object for dirauth; move one option there.
I've chosen the "AuthDirMaxServersPerAddr" option here for
simplicity, since it is used literally nowhere else besides the dirauth
module. Once we have all the infrastructure in place for this, we
can move more options into this structure.
Nick Mathewson [Sun, 15 Dec 2019 23:42:01 +0000 (18:42 -0500)]
Allow struct_magic to be disabled.
When a subsystem is disabled, there will be no corresponding object
allocated, and no magic numbers on it.
Nick Mathewson [Sun, 15 Dec 2019 23:40:12 +0000 (18:40 -0500)]
Support a flag to indicate that a config var is disabled
Like "obsolete" variables, these variables produce a warning when
you try to set them, but the warning says that the relevant module
doesn't have support.
The confdecl macros now have a CONF_CONTEXT that you can define to
make all the modules in a given table disabled.
Nick Mathewson [Sun, 15 Dec 2019 23:10:11 +0000 (18:10 -0500)]
Add "stub" files for disabled modules.
These modules are only built when the selected modules are disabled.
The provide stub implementations of the subsystem blocks. Later,
other stub implementations could move here.
Having real subsystem blocks here will let us handle disabled
configuration options better.
teor [Thu, 19 Dec 2019 09:33:29 +0000 (19:33 +1000)]
Merge remote-tracking branch 'tor-github/pr/1584'
George Kadianakis [Wed, 18 Dec 2019 12:19:15 +0000 (14:19 +0200)]
Merge branch 'tor-github/pr/1587'
Mike Perry [Tue, 17 Dec 2019 20:02:23 +0000 (14:02 -0600)]
Add NSF support acknowledgment to circpad dev doc.
Nick Mathewson [Tue, 17 Dec 2019 20:02:06 +0000 (15:02 -0500)]
Merge branch 'ticket32172_once_again'
Peter Gerber [Mon, 10 Jun 2019 12:56:31 +0000 (14:56 +0200)]
Correct how we use libseccomp
This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
Nick Mathewson [Tue, 17 Dec 2019 14:39:50 +0000 (09:39 -0500)]
Merge remote-tracking branch 'tor-github/pr/1596'
David Goulet [Tue, 17 Dec 2019 14:30:19 +0000 (09:30 -0500)]
Merge branch 'tor-github/pr/1608'
David Goulet [Tue, 17 Dec 2019 14:26:49 +0000 (09:26 -0500)]
Merge branch 'tor-github/pr/1609'
teor [Mon, 16 Dec 2019 23:49:30 +0000 (09:49 +1000)]
Merge branch 'pr1590_amended_commit'
Taylor Yu [Mon, 16 Dec 2019 04:46:31 +0000 (22:46 -0600)]
manpage: fixes to alphabetize General Options
Nick Mathewson [Mon, 16 Dec 2019 20:31:23 +0000 (15:31 -0500)]
Fix formatting in tor_assertf() message in struct_check_magic().
Closes 32771; bugfix on 0.4.2.1-alpha.
Nick Mathewson [Mon, 16 Dec 2019 20:27:18 +0000 (15:27 -0500)]
Merge branch 'bug32765_041' into bug32771_042
Nick Mathewson [Mon, 16 Dec 2019 20:14:13 +0000 (15:14 -0500)]
Use CHECK_PRINTF() for printf-like functions in util_bug.h
George Kadianakis [Mon, 16 Dec 2019 20:01:10 +0000 (22:01 +0200)]
Merge branch 'tor-github/pr/1591'