Commit Graph

34622 Commits

Author SHA1 Message Date
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
4f6901d7cc When initializing pthreads, always set the main thread.
Fixes bug 32884.  This is a bugfix on 0.3.3.1-alpha, when we started
allowing restart-in-process with tor_api.h.
2020-01-06 09:37:12 -05:00
Nick Mathewson
b6f099672b Make ntmain.h functions stubs when NT_SERVICE not enabled.
This lets us simplify main.c a little, and avoid a practracker
exception.

Followup from #32883.
2020-01-06 09:25:23 -05:00
Nick Mathewson
5c240db0bf Restore feature where nt-services detect non-"run_tor" modes.
Followup for #32883.
2020-01-06 09:25:23 -05:00
Nick Mathewson
dca2629480 Use tor_api.h entry points in ntmain.c.
When we updated main.c to use the same entry points as tor_api.h, we
didn't update ntmain.c.  This led to bugs as the two got out of
sync.

There are two calls that we drop in this patch: first, I drop the
call to set_main_thread(), since that's redundant with the init
function in compat_winthreads.c (but see #32884).  Second, I drop
the check for CMD_RUN_TOR: I'll add that back with a subsequent
commit.

Closes ticket 32883.
2020-01-06 09:24:15 -05:00
Nick Mathewson
54eec5342d Initialize publish/subscribe code when running as an NT service.
Fixes bug 32778; bugfix on 0.4.1.1-alpha.
2020-01-06 09:22: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
rl1987
52bbc7fb49 Add changes file 2019-12-30 13:02:04 +07:00
rl1987
c0dd214c8a Remove 0.2.9 from git scripts 2019-12-30 12:41:08 +07: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
5c6fc5250e test_util: remove UTIL_LEGACY_NO_WIN.
It was only used in one place.
2019-12-20 09:57:52 -05:00
Hans-Christoph Steiner
a96317a79d Android: skip tests that check UNIX user account setup
* there is no ~ or HOME in Android
* UIDs and GIDs in Android represent apps, not users, and Android apps
  cannot ever change UIDs

This should be replaced by whatever @nmathewson wants to name this stuff:
https://github.com/torproject/tor/pull/1436
2019-12-20 09:53:16 -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
Nick Mathewson
42e31b5c45 Mark TestingEstimatedDescriptorPropagationTime as obsolete.
We stopped looking at this option in 85cf6dcba3, 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.
2019-12-19 11:04:48 -05:00
Nick Mathewson
a6ba56761b Merge branch 'dirauth_config_squashed' 2019-12-19 07:55:06 -05:00
Nick Mathewson
13df744921 Declare relay/dirauth subsystem levels in a header.
This way, we can't get out of sync between the two declarations.
2019-12-19 07:54:56 -05:00
Nick Mathewson
8d474e4dc5 Add an integration test for options disabled by dirauth subsystem. 2019-12-19 07:54:56 -05:00
Nick Mathewson
ffa3499d81 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.
2019-12-19 07:54:56 -05:00
Nick Mathewson
419ba97df5 Allow struct_magic to be disabled.
When a subsystem is disabled, there will be no corresponding object
allocated, and no magic numbers on it.
2019-12-19 07:54:56 -05:00
Nick Mathewson
9082a6db3f 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.
2019-12-19 07:54:56 -05:00
Nick Mathewson
5e2318165d 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.
2019-12-19 07:54:56 -05:00
teor
5c98a42f49
Merge remote-tracking branch 'tor-github/pr/1584' 2019-12-19 19:33:29 +10:00
George Kadianakis
b7304027f6 Merge branch 'tor-github/pr/1587' 2019-12-18 14:19:15 +02:00
Mike Perry
b7dbb4a554 Add NSF support acknowledgment to circpad dev doc. 2019-12-17 17:10:40 -06:00
Nick Mathewson
08bfc2d71a Merge branch 'ticket32172_once_again' 2019-12-17 15:02:06 -05:00
Peter Gerber
0d64bafcfe Correct how we use libseccomp
This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
2019-12-17 09:47:28 -05:00
Nick Mathewson
5f9808d1d7 Merge remote-tracking branch 'tor-github/pr/1596' 2019-12-17 09:39:50 -05:00
David Goulet
47d69d981e Merge branch 'tor-github/pr/1608' 2019-12-17 09:30:19 -05:00
David Goulet
fa791b840a Merge branch 'tor-github/pr/1609' 2019-12-17 09:26:49 -05:00
teor
11c8c4f23c
Merge branch 'pr1590_amended_commit' 2019-12-17 09:49:30 +10:00