Nick Mathewson
a57bcffcc7
Implement the various get_foodir_*() functions.
2017-12-05 19:49:29 -05:00
Nick Mathewson
a9806af261
Create a CacheDirectory and KeyDirectory options.
...
They work the same as DataDirectory, but default slightly different.
Tor is not actually updated to use them yet.
2017-12-05 19:49:28 -05:00
Nick Mathewson
7b34ab3e38
Extract common code for creating the keys directory.
...
This had somehow gotten duplicated between router.c and routerkeys.c
2017-12-05 19:49:28 -05:00
Nick Mathewson
36779df4c4
Extract the code that creates the datadir into a separate function.
2017-12-05 19:49:28 -05:00
Nick Mathewson
6aeabd454e
Reindent the body of get_data_directory()
...
I don't know why it wasn't indented properly, but we may as well fix
it now.
2017-11-14 15:56:25 -05:00
Nick Mathewson
192be00691
Make the DataDirectory option immutable.
...
By convention, the torrc options that the user sets are
unchangeable. If we need to change them, we should be using a copy
that's stored in another field
To avoid trouble, I'm keeping DataDirectory as the name for the
field that the rest of Tor uses, and using DataDirectory_option for
the confparse-controlled field.
This commit also modernizes some older string handling code in the
DataDirectory normalization function.
2017-11-14 15:54:36 -05:00
Nick Mathewson
bf8a7201ce
Remove remove_file_if_very_old() -- nothing calls it.
2017-11-14 15:33:58 -05:00
Nick Mathewson
ce3d5da0d2
Merge branch 'maint-0.3.2'
2017-11-09 08:02:36 -05:00
Nick Mathewson
40c64f45f0
Re-remove AllowDotExit deprecation.
...
This was accidentally reintroduced in 5a46074e55
. It should be
harmless, though: the option is obsolete, so calling it deprecated
is redundant.
2017-11-09 07:58:27 -05:00
Nick Mathewson
9f650b24e9
Merge branch 'maint-0.3.2'
2017-11-05 14:09:21 -05:00
Sebastian Hahn
d3fee8b823
ClientDNSRejectInternalAddresses in non-default networks
...
Once again allow the flag to be set, unless the default network is used.
Thanks to nickm for a suggestion for the workaround to a test failure.
2017-11-04 18:31:02 +01:00
Sebastian Hahn
e491c05f96
Undo deprecation of ClientDNSRejectInternalAddresses
2017-11-04 18:31:00 +01:00
Sebastian Hahn
5a46074e55
Revert "Make ClientDNSRejectInternalAddresses testing-only."
...
This reverts commit 27fa4a98d2
.
2017-11-04 18:30:59 +01:00
Roger Dingledine
7700b99fe6
easy typos while reviewing commits
2017-11-01 16:44:09 -04:00
Nick Mathewson
cd606d5ad3
Merge remote-tracking branch 'public/owning_control_fd'
2017-11-01 13:28:31 -04:00
Nick Mathewson
ef25f957e7
Merge branch 'tor_api_squashed'
2017-11-01 13:22:16 -04:00
Nick Mathewson
b76a161e01
Merge branch 'fix-torrcd-sandbox-22605v2'
2017-10-31 13:58:33 -04:00
Neel Chauhan
b70e11ef6b
Add code for letting user select Reduced Exit Policy
2017-10-31 13:25:41 -04:00
Nick Mathewson
7c59c751b0
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-31 11:43:14 -04:00
Nick Mathewson
cf98ca715c
Merge branch 'maint-0.3.2'
2017-10-31 11:43:14 -04:00
Nick Mathewson
5a21b27083
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-31 11:43:14 -04:00
Nick Mathewson
f2e23d38ab
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-31 11:43:14 -04:00
Nick Mathewson
04d4786cc4
Merge remote-tracking branch 'public/bug23693_029' into maint-0.2.9
2017-10-31 11:43:07 -04:00
Nick Mathewson
30a681553f
Merge remote-tracking branch 'public/exit_carefully'
2017-10-27 11:13:05 -04:00
Nick Mathewson
8d908b961f
Merge branch 'maint-0.3.2'
2017-10-24 19:37:11 -04:00
Nick Mathewson
594cf92498
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:28 -04:00
Isis Lovecruft
02cde0d939
test: Add unittest for descriptors with BridgeDistribution option.
2017-10-24 19:26:24 -04:00
Isis Lovecruft
b0e10f23ba
doc: Improve documentation for check_bridge_distribution_setting().
2017-10-24 19:26:24 -04:00
Nick Mathewson
613b18f0af
Always set bridge-distribution-request on bridges' descriptors.
...
Also, warn the user if the BridgeDistribution option is
unrecognized, and reject the value if it is invalid.
2017-10-24 19:26:24 -04:00
Roger Dingledine
ebab521525
Add new BridgeDistribution config option
...
Bridge relays can use it to add a "bridge-distribution-request" line
to their bridge descriptor, which tells BridgeDB how they'd like their
bridge address to be given out.
Implements tickets 18329.
2017-10-24 19:26:24 -04:00
Nick Mathewson
abbd6a36fc
Merge branch 'maint-0.3.2'
2017-10-24 08:25:29 -04:00
Nick Mathewson
48ee85e0c6
Have LOG_PROTOCOL_WARN call its own function
...
Also, make the function that implements LOG_PROTOCOL_WARN use a
cached value of the desired loglevel, rather than calling
get_options().
2017-10-23 12:22:26 -04:00
Nick Mathewson
1db5081ba1
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-10-23 09:06:34 -04:00
Nick Mathewson
c93ecb8189
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-23 09:06:34 -04:00
Nick Mathewson
d99c6b7252
Merge branch 'maint-0.3.2'
2017-10-23 09:06:34 -04:00
Nick Mathewson
009141c6a8
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-23 09:06:34 -04:00
Nick Mathewson
23e3d57e12
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-23 09:06:34 -04:00
Nick Mathewson
8cc147aa83
Merge branch 'maint-0.2.5' into maint-0.2.8
2017-10-23 09:04:56 -04:00
David Goulet
15a699462d
dirauth: Add bastet to the default authorities
...
Fixes #23910
Based on a patch by dgoulet; backported to 0.2.5
2017-10-23 09:03:36 -04:00
Nick Mathewson
97046436b2
Merge branch 'maint-0.3.2'
2017-10-23 08:59:12 -04:00
Nick Mathewson
c958fda6e2
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-10-23 08:59:11 -04:00
Nick Mathewson
783e458c07
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-23 08:59:11 -04:00
Nick Mathewson
b8dedaee74
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-23 08:59:11 -04:00
Nick Mathewson
df57d1e0c0
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-23 08:59:11 -04:00
Nick Mathewson
9a1b385462
Merge branch 'maint-0.2.5' into maint-0.2.8
2017-10-23 08:58:28 -04:00
Nick Mathewson
a62f59f000
Mark "previously validated foo could not be set" blocks as unreachable.
2017-10-20 19:28:12 -04:00
Nick Mathewson
3c99b810a4
Exit more carefully when options_act() fails.
...
Also, annotate options_act() with places where we should be
pre-validating values.
2017-10-20 11:39:17 -04:00
Nick Mathewson
1df43aff41
Return instead of exiting in options_init_from_torrc()
2017-10-20 11:39:17 -04:00
Nick Mathewson
35746a9ee7
Comment-only change: annotate exit() calls.
...
Sometimes when we call exit(), it's because the process is
completely hopeless: openssl has a broken AES-CTR implementation, or
the clock is in the 1960s, or something like that.
But sometimes, we should return cleanly from tor_main() instead, so
that embedders can keep embedding us and start another Tor process.
I've gone through all the exit() and _exit() calls to annotate them
with "exit ok" or "XXXX bad exit" -- the next step will be to fix
the bad exit()s.
First step towards 23848.
2017-10-19 13:42:28 -04:00
Nick Mathewson
72b5e4a2db
Move tor_git_revision into a new module.
...
At first, we put the tor_git_revision constant in tor_main.c, so
that we wouldn't have to recompile config.o every time the git
revision changed. But putting it there had unintended side effect
of forcing every program that wanted to link libor.a (including
test, test-slow, the fuzzers, the benchmarks, etc) to declare their
own tor_git_revision instance.
That's not very nice, especially since we want to start supporting
others who want to link against Tor (see 23846).
So, create a new git_revision.c file that only contains this
constant, and remove the duplicated boilerplate from everywhere
else.
Part of implementing ticket 23845.
2017-10-18 13:49:35 -04:00