]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
11 years agowhitespace fixes
Nick Mathewson [Mon, 16 Jun 2014 19:18:02 +0000 (15:18 -0400)] 
whitespace fixes

11 years agoBring remaining 0.2.5.5-alpha entries into changelog
Nick Mathewson [Mon, 16 Jun 2014 19:00:10 +0000 (15:00 -0400)] 
Bring remaining 0.2.5.5-alpha entries into changelog

11 years agomanpage: Move more authority-only options into the authority section
Nick Mathewson [Mon, 16 Jun 2014 15:15:47 +0000 (11:15 -0400)] 
manpage: Move more authority-only options into the authority section

I don't know whether we missed these or misclassified them when we
first made the "DIRECTORY AUTHORITY SERVER OPTIONS" section, but they
really belong there.

11 years agoAdd ATTR_UNUSED to HT_FIND
Nick Mathewson [Sat, 14 Jun 2014 15:46:54 +0000 (11:46 -0400)] 
Add ATTR_UNUSED to HT_FIND

The fix for bug 8746 added a hashtable instance that never actually
invoked HT_FIND.  This caused a warning, since we didn't mark HT_FIND
as okay-not-to-use.

11 years agoMerge branch 'bug8746_v2_squashed'
Nick Mathewson [Sat, 14 Jun 2014 15:46:38 +0000 (11:46 -0400)] 
Merge branch 'bug8746_v2_squashed'

Conflicts:
src/common/include.am

11 years agochanges file for 8746
Nick Mathewson [Wed, 30 Apr 2014 17:13:38 +0000 (13:13 -0400)] 
changes file for 8746

11 years agorefactor win/nix handling for test_spawn_background*()
Nick Mathewson [Wed, 30 Apr 2014 17:00:54 +0000 (13:00 -0400)] 
refactor win/nix handling for test_spawn_background*()

Instead of having a #if ... for every function, just define
TEST_CHILD to the right patch and EOL to the expected line terminator.

11 years agoMore unit tests for process spawning
Nick Mathewson [Wed, 30 Apr 2014 16:50:00 +0000 (12:50 -0400)] 
More unit tests for process spawning

Try killing a running process; try noticing that a process has
exited without checking its output; verify that waitpid_cb (when
present) is set to NULL when you would expect it to be.

11 years agoNew testing-only tor_sleep_msec function
Nick Mathewson [Wed, 30 Apr 2014 16:48:46 +0000 (12:48 -0400)] 
New testing-only tor_sleep_msec function

In the unit tests I want to loop with a delay, but I want less than
a 1 second delay.  This, sadly, requires compatibility code.

11 years agoOn Windows, terminate processes by handle, not pid
Nick Mathewson [Thu, 10 Apr 2014 15:16:42 +0000 (11:16 -0400)] 
On Windows, terminate processes by handle, not pid

When we create a process yourself with CreateProcess, we get a
handle to the process in the PROCESS_INFO output structure.  But
instead of using that handle, we were manually looking up a _new_
handle based on the process ID, which is a poor idea, since the
process ID might refer to a new process later on, but the handle
can't.

11 years agoUse waitpid code to learn when a controlled process dies
Nick Mathewson [Thu, 10 Apr 2014 15:06:10 +0000 (11:06 -0400)] 
Use waitpid code to learn when a controlled process dies

This lets us avoid sending SIGTERM to something that has already
died, since we realize it has already died, and is a fix for the
unix version of #8746.

11 years agoNew waitpid-handler functions to run callbacks when a child exits.
Nick Mathewson [Wed, 9 Apr 2014 17:45:27 +0000 (13:45 -0400)] 
New waitpid-handler functions to run callbacks when a child exits.

Also, move 'procmon' into libor_event library, since it uses libevent.

11 years agoMerge branch 'bug12184_diagnostic_squashed'
Nick Mathewson [Sat, 14 Jun 2014 15:01:04 +0000 (11:01 -0400)] 
Merge branch 'bug12184_diagnostic_squashed'

11 years agoTry to diagnose bug 12184
Nick Mathewson [Tue, 10 Jun 2014 17:35:45 +0000 (13:35 -0400)] 
Try to diagnose bug 12184

Check for consistency between the queued destroy cells and the marked
circuit IDs.  Check for consistency in the count of queued destroy
cells in several ways.  Check to see whether any of the marked circuit
IDs have somehow been marked longer than the channel has existed.

11 years agoMerge branch 'bug12191_squashed'
Nick Mathewson [Fri, 13 Jun 2014 12:40:59 +0000 (08:40 -0400)] 
Merge branch 'bug12191_squashed'

11 years agoAlso raise the check for 0 circuit ID in created cell.
Nick Mathewson [Wed, 11 Jun 2014 13:33:20 +0000 (09:33 -0400)] 
Also raise the check for 0 circuit ID in created cell.

And add a comment about why conditions that would cause us to drop a
cell should get checked before actions that would cause us to send a
destroy cell.

Spotted by 'cypherpunks'.

And note that these issues have been present since 0.0.8pre1 (commit
0da256ef), where we added a "shutting down" state, and started
responding to all create cells with DESTROY when shutting down.

11 years agosandbox: Permit stat() of DataDir/stats
Nick Mathewson [Fri, 13 Jun 2014 12:26:23 +0000 (08:26 -0400)] 
sandbox: Permit stat() of DataDir/stats

This is a fix for another case of 12064 that alphawolf just spotted.

There's already an 0.2.5.5 changelog entry for this.

11 years agowhitespaces fixes
Nick Mathewson [Wed, 11 Jun 2014 16:00:14 +0000 (12:00 -0400)] 
whitespaces fixes

11 years agoMerge remote-tracking branch 'public/ticket6799_024_v2_squashed'
Nick Mathewson [Wed, 11 Jun 2014 15:57:56 +0000 (11:57 -0400)] 
Merge remote-tracking branch 'public/ticket6799_024_v2_squashed'

Conflicts:
src/or/channel.c
src/or/circuitlist.c
src/or/connection.c

Conflicts involved removal of next_circ_id and addition of
unusable-circid tracking.

11 years agoTweak changes entry for 6799
Nick Mathewson [Wed, 11 Jun 2014 15:52:58 +0000 (11:52 -0400)] 
Tweak changes entry for 6799

11 years agoFix a 32-big conversion warning in 11970 fix
Nick Mathewson [Wed, 11 Jun 2014 15:29:44 +0000 (11:29 -0400)] 
Fix a 32-big conversion warning in 11970 fix

11 years agoReplace last_added_nonpadding with last_had_circuits
Nick Mathewson [Fri, 16 May 2014 14:32:31 +0000 (10:32 -0400)] 
Replace last_added_nonpadding with last_had_circuits

The point of the "idle timeout" for connections is to kill the
connection a while after it has no more circuits.  But using "last
added a non-padding cell" as a proxy for that is wrong, since if the
last circuit is closed from the other side of the connection, we
will not have sent anything on that connection since well before the
last circuit closed.

This is part of fixing 6799.

When applied to 0.2.5, it is also a fix for 12023.

11 years agoGive each or_connection_t a slightly randomized idle_timeout
Nick Mathewson [Wed, 9 Apr 2014 15:13:37 +0000 (11:13 -0400)] 
Give each or_connection_t a slightly randomized idle_timeout

Instead of killing an or_connection_t that has had no circuits for
the last 3 minutes, give every or_connection_t a randomized timeout,
so that an observer can't so easily infer from the connection close
time the time at which its last circuit closed.

Also, increase the base timeout for canonical connections from 3
minutes to 15 minutes.

Fix for ticket 6799.

11 years agoMerge remote-tracking branch 'public/bug11970'
Nick Mathewson [Wed, 11 Jun 2014 15:01:52 +0000 (11:01 -0400)] 
Merge remote-tracking branch 'public/bug11970'

11 years agoYield a real error in the bug case of sandbox_getaddrinfo()
Nick Mathewson [Wed, 11 Jun 2014 15:00:56 +0000 (11:00 -0400)] 
Yield a real error in the bug case of sandbox_getaddrinfo()

11 years agoMerge remote-tracking branch 'public/not_bug8093'
Nick Mathewson [Wed, 11 Jun 2014 13:24:16 +0000 (09:24 -0400)] 
Merge remote-tracking branch 'public/not_bug8093'

11 years agoMerge remote-tracking branch 'public/more_bug8387_diagnosis'
Nick Mathewson [Wed, 11 Jun 2014 13:22:46 +0000 (09:22 -0400)] 
Merge remote-tracking branch 'public/more_bug8387_diagnosis'

11 years agoMove circuit-id-in-use check for CREATE cells to before all other checks
Nick Mathewson [Wed, 11 Jun 2014 02:41:13 +0000 (22:41 -0400)] 
Move circuit-id-in-use check for CREATE cells to before all other checks

This means that we never send a DESTROY cell in response to an attempt
to CREATE an existing circuit.  Fixes bug 12191.

11 years agoMerge remote-tracking branch 'origin/maint-0.2.4'
Nick Mathewson [Wed, 11 Jun 2014 01:09:27 +0000 (21:09 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.4'

11 years agoFix changes file for geoip
Nick Mathewson [Wed, 11 Jun 2014 01:08:44 +0000 (21:08 -0400)] 
Fix changes file for geoip

11 years agoMerge remote-tracking branch 'karsten/geoip6-jun2014' into maint-0.2.4
Nick Mathewson [Wed, 11 Jun 2014 01:08:12 +0000 (21:08 -0400)] 
Merge remote-tracking branch 'karsten/geoip6-jun2014' into maint-0.2.4

11 years agoMerge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
Nick Mathewson [Wed, 11 Jun 2014 01:07:57 +0000 (21:07 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4

11 years agoUpdate geoip to the June 4 2014 database.
Karsten Loesing [Tue, 10 Jun 2014 19:29:56 +0000 (21:29 +0200)] 
Update geoip to the June 4 2014 database.

11 years agoUpdate geoip6 to the June 4 2014 database.
Karsten Loesing [Tue, 10 Jun 2014 19:31:21 +0000 (21:31 +0200)] 
Update geoip6 to the June 4 2014 database.

11 years agoImproved diagnostic log for bug 8387.
Nick Mathewson [Tue, 10 Jun 2014 16:04:06 +0000 (12:04 -0400)] 
Improved diagnostic log for bug 8387.

When we find a stranded one-hop circuit, log whether it is dirty,
log information about any streams on it, and log information about
connections they might be linked to.

11 years agoMerge remote-tracking branch 'public/bug12227_024'
Nick Mathewson [Tue, 10 Jun 2014 15:17:39 +0000 (11:17 -0400)] 
Merge remote-tracking branch 'public/bug12227_024'

11 years agoAvoid illegal read off end of an array in prune_v2_cipher_list
Nick Mathewson [Tue, 10 Jun 2014 15:11:47 +0000 (11:11 -0400)] 
Avoid illegal read off end of an array in prune_v2_cipher_list

This function is supposed to construct a list of all the ciphers in
the "v2 link protocol cipher list" that are supported by Tor's
openssl.  It does this by invoking ssl23_get_cipher_by_char on each
two-byte ciphersuite ID to see which ones give a match.  But when
ssl23_get_cipher_by_char cannot find a match for a two-byte SSL3/TLS
ciphersuite ID, it checks to see whether it has a match for a
three-byte SSL2 ciphersuite ID.  This was causing a read off the end
of the 'cipherid' array.

This was probably harmless in practice, but we shouldn't be having
any uninitialized reads.

(Using ssl23_get_cipher_by_char in this way is a kludge, but then
again the entire existence of the v2 link protocol is kind of a
kludge.  Once Tor 0.2.2 clients are all gone, we can drop this code
entirely.)

Found by starlight. Fix on 0.2.4.8-alpha. Fixes bug 12227.

11 years agoSpell getrlimit correctly.
Nick Mathewson [Mon, 9 Jun 2014 02:33:38 +0000 (22:33 -0400)] 
Spell getrlimit correctly.

Fixes bug in b0c1c700114aa8d4dfc180d85870c5bbe15fcacb; bug
12229. Bugfix not in any released Tor.  Patch from "alphawolf".

11 years agoMerge remote-tracking branch 'public/bug12169_relay_check'
Nick Mathewson [Wed, 4 Jun 2014 19:30:43 +0000 (15:30 -0400)] 
Merge remote-tracking branch 'public/bug12169_relay_check'

11 years agoMerge remote-tracking branch 'andrea/bug10616'
Nick Mathewson [Wed, 4 Jun 2014 19:12:45 +0000 (15:12 -0400)] 
Merge remote-tracking branch 'andrea/bug10616'

11 years agoput the right trac ticket number in changes file
Nick Mathewson [Wed, 4 Jun 2014 16:28:15 +0000 (12:28 -0400)] 
put the right trac ticket number in changes file

11 years agoBulletproof our 11246 fix a little, based on recommendation from andrea.
Nick Mathewson [Wed, 4 Jun 2014 16:27:10 +0000 (12:27 -0400)] 
Bulletproof our 11246 fix a little, based on recommendation from andrea.

11 years agoMerge remote-tracking branch 'public/bug12195'
Nick Mathewson [Wed, 4 Jun 2014 16:16:03 +0000 (12:16 -0400)] 
Merge remote-tracking branch 'public/bug12195'

11 years agoFix ancient code that only checked circ_id, not circ_id and chan
Nick Mathewson [Tue, 3 Jun 2014 22:19:08 +0000 (18:19 -0400)] 
Fix ancient code that only checked circ_id, not circ_id and chan

This code mis-handled the case where a circuit got the same circuit
ID in both directions.  I found three instances of it in the
codebase, by grepping for [pn]_circ_id.

Because of the issue in command_process_relay_cell(), this would
have made roughly one circuit in a million completely nonfunctional.

Fixes bug 12195.

11 years agoAdd changes file for bug10616
Andrea Shepard [Tue, 3 Jun 2014 21:41:51 +0000 (14:41 -0700)] 
Add changes file for bug10616

11 years agoSquelch spurious LD_BUG message in connection_ap_handshake_socks_reply()
Andrea Shepard [Tue, 3 Jun 2014 21:37:49 +0000 (14:37 -0700)] 
Squelch spurious LD_BUG message in connection_ap_handshake_socks_reply()

11 years agofix #10405's changes file
Roger Dingledine [Mon, 2 Jun 2014 06:32:59 +0000 (02:32 -0400)] 
fix #10405's changes file

11 years agoremove a stray " while warning about missing packages on redhat
Roger Dingledine [Mon, 2 Jun 2014 06:30:25 +0000 (02:30 -0400)] 
remove a stray " while warning about missing packages on redhat

11 years agoDon't try to fetch bridge descriptors when DisableNetwork is set
Nick Mathewson [Mon, 2 Jun 2014 06:17:28 +0000 (02:17 -0400)] 
Don't try to fetch bridge descriptors when DisableNetwork is set

Patch from Roger; changes file by me.

Fixes 10405; bugfix on 0.2.3.9-alpha, where DisableNetwork was
introduced.

11 years agoMerge remote-tracking branch 'public/bug12170_024_v2'
Nick Mathewson [Mon, 2 Jun 2014 04:47:51 +0000 (00:47 -0400)] 
Merge remote-tracking branch 'public/bug12170_024_v2'

11 years agoAvoid needless router_dir_info_has_changed from router_set_status
Nick Mathewson [Sun, 1 Jun 2014 20:48:43 +0000 (16:48 -0400)] 
Avoid needless router_dir_info_has_changed from router_set_status

On some profiles of Andrea's from #11332, I found that a great deal
of time can still be attributed to functions called from
update_router_have_minimum_dir_info().  This is making our
digestmap, tor_memeq, and siphash functions take a much bigger
portion of runtime than they really should.

If we're calling update_router_have_minimum_dir_info() too often,
that's because we're calling router_dir_info_changed() too often.
And it looks like most of the callers of router_dir_info_changed()
are coming as tail-calls from router_set_status() as invoked by
channel_do_open_actions().

But we don't need to call router_dir_info_changed() so much!  (I'm
not quite sure we need to call it from here at all, but...) Surely
we don't need to call it from router_set_status when the router's
status has not actually changed.

This patch makes us call router_dir_info_changed() from
router_set_status only when we are changing the router's status.

Fix for bug 12170.  This is leftover from our fix back in 273ee3e81
in 0.1.2.1-alpha, where we started caching the value of
update_router_have_minimum_dir_info().

11 years agoUse uint32 !=, not tor_memneq, for relay cell integrity checking
Nick Mathewson [Sun, 1 Jun 2014 18:02:55 +0000 (14:02 -0400)] 
Use uint32 !=, not tor_memneq, for relay cell integrity checking

tor_memeq has started to show up on profiles, and this is one of the
most frequent callers of that function, appearing as it does on every
cell handled for entry or exit.

59f9097d5c3dc010847c359888d31757d1c97904 introduced tor_memneq here;
it went into Tor 0.2.1.31.  Fixes part of 12169.

11 years agolabel all unlabeled bugfixes sections; lightly sort more
Nick Mathewson [Thu, 29 May 2014 15:49:01 +0000 (11:49 -0400)] 
label all unlabeled bugfixes sections; lightly sort more

11 years agoRemove duplicate changelog entry for 8368
Nick Mathewson [Thu, 29 May 2014 15:33:22 +0000 (11:33 -0400)] 
Remove duplicate changelog entry for 8368

11 years agoSort unlabeled 'minor features' entries in 0255 changelog
Nick Mathewson [Thu, 29 May 2014 15:32:49 +0000 (11:32 -0400)] 
Sort unlabeled 'minor features' entries in 0255 changelog

11 years agoReformat 0255 changelog. Tweak formatter script.
Nick Mathewson [Thu, 29 May 2014 15:30:15 +0000 (11:30 -0400)] 
Reformat 0255 changelog. Tweak formatter script.

11 years agoStart on the 0.2.5.5-alpha changelog.
Nick Mathewson [Thu, 29 May 2014 15:21:17 +0000 (11:21 -0400)] 
Start on the 0.2.5.5-alpha changelog.

I've copied the entries from changes/, labeled the ones that also
appeared in 0.2.4.22, sorted them lightly with a python script
(added to maint), and combined sections with the same name.

I didn't combine sections without a description (e.g. "Minor
bugfixes:"), since we'll probably add a description to those.

11 years agosandbox: allow enough setsockopt to make ConstrainedSockets work
Nick Mathewson [Thu, 29 May 2014 15:04:32 +0000 (11:04 -0400)] 
sandbox: allow enough setsockopt to make ConstrainedSockets work

fixes bug 12139; bugfix on 0.2.5.1-alpha

11 years agosandbox: permit listen(2)
Nick Mathewson [Tue, 27 May 2014 23:28:12 +0000 (19:28 -0400)] 
sandbox: permit listen(2)

Fix for 12115; bugfix on 0.2.5.1-alpha

11 years agosandbox: Allow DirPortFrontPage unconditionally if it's set
Nick Mathewson [Tue, 27 May 2014 23:21:11 +0000 (19:21 -0400)] 
sandbox: Allow DirPortFrontPage unconditionally if it's set

fixes 12114; bug not in any release.

Improves fix for 12028

11 years agoMerge branch 'bug11622'
Nick Mathewson [Tue, 27 May 2014 21:35:04 +0000 (17:35 -0400)] 
Merge branch 'bug11622'

11 years agoLog the errno value if seccomp_load() fails.
Nick Mathewson [Tue, 27 May 2014 19:08:10 +0000 (15:08 -0400)] 
Log the errno value if seccomp_load() fails.

(This is how I found out I was trying to test with a kernel too old
for seccomp. I think.)

11 years agoMake sandbox.c compile on arm
Nick Mathewson [Tue, 27 May 2014 18:50:44 +0000 (14:50 -0400)] 
Make sandbox.c compile on arm

This is a minimal set of changes for compilation; I need a more
recent kernel to test this stuff.

11 years agosandbox: Correct fix for hs part of 12064
Nick Mathewson [Fri, 23 May 2014 15:46:44 +0000 (11:46 -0400)] 
sandbox: Correct fix for hs part of 12064

Bugfix on cfd0ee514c279bc6c7b; bug not in any released version of tor

11 years agoMerge branch 'bug11965_v2'
Nick Mathewson [Fri, 23 May 2014 15:23:00 +0000 (11:23 -0400)] 
Merge branch 'bug11965_v2'

11 years agoPostpone fetches based on should_delay_dir_fetch(), not DisableNetwork
Nick Mathewson [Tue, 20 May 2014 20:57:47 +0000 (16:57 -0400)] 
Postpone fetches based on should_delay_dir_fetch(), not DisableNetwork

Without this fix, when running with bridges, we would try fetching
directory info far too early, and have up to a 60 second delay if we
started with bridge descriptors available.

Fixes bug 11965. Fix on 0.2.3.6-alpha, arma thinks.

11 years agosandbox: allow reading of hidden service configuration files.
Nick Mathewson [Fri, 23 May 2014 00:39:10 +0000 (20:39 -0400)] 
sandbox: allow reading of hidden service configuration files.

fixes part of 12064

11 years agosandbox: refactor string-based option-unchanged tests to use a macro
Nick Mathewson [Fri, 23 May 2014 00:00:22 +0000 (20:00 -0400)] 
sandbox: refactor string-based option-unchanged tests to use a macro

There was too much code duplication in doing it the old way, and I
nearly made a copy-and-paste error in the last commit.

11 years agosandbox: allow access to cookie files, approved-routers
Nick Mathewson [Thu, 22 May 2014 23:56:56 +0000 (19:56 -0400)] 
sandbox: allow access to cookie files, approved-routers

fixes part of 12064

11 years agochanges file for 12064_part1
Nick Mathewson [Thu, 22 May 2014 23:49:59 +0000 (19:49 -0400)] 
changes file for 12064_part1

11 years agosandbox: allow access to various stats/*-stats files
Michael Wolf [Wed, 21 May 2014 02:52:16 +0000 (22:52 -0400)] 
sandbox: allow access to various stats/*-stats files

Fix for 12064 part 1

11 years agoDocumentation fix: DataDir/status/* -> DataDir/stats/*
Nick Mathewson [Thu, 22 May 2014 23:45:45 +0000 (19:45 -0400)] 
Documentation fix: DataDir/status/* -> DataDir/stats/*

Our documentation had the name of this directory wrong.

11 years agosandbox: revamp sandbox_getaddrinfo cacheing
Nick Mathewson [Thu, 22 May 2014 21:39:36 +0000 (17:39 -0400)] 
sandbox: revamp sandbox_getaddrinfo cacheing

The old cache had problems:
     * It needed to be manually preloaded. (It didn't remember any
       address you didn't tell it to remember)
     * It was AF_INET only.
     * It looked at its cache even if the sandbox wasn't turned on.
     * It couldn't remember errors.
     * It had some memory management problems. (You can't use memcpy
       to copy an addrinfo safely; it has pointers in.)

This patch fixes those issues, and moves to a hash table.

Fixes bug 11970; bugfix on 0.2.5.1-alpha.

11 years agoMerge remote-tracking branch 'andrea/bug11476'
Nick Mathewson [Thu, 22 May 2014 20:27:29 +0000 (16:27 -0400)] 
Merge remote-tracking branch 'andrea/bug11476'

11 years agoEliminate #ifdef ENABLE_MEMPOOLS in packed_cell_new/free()
Andrea Shepard [Wed, 21 May 2014 17:53:25 +0000 (10:53 -0700)] 
Eliminate #ifdef ENABLE_MEMPOOLS in packed_cell_new/free()

11 years agosandbox: permit gettid, sched_getaffinity
Nick Mathewson [Tue, 20 May 2014 19:49:01 +0000 (15:49 -0400)] 
sandbox: permit gettid, sched_getaffinity

These are needed under some circumstances if we are running with
expensive-hardening and sandbox at the same time.

fixes 11477, bugfix on 0.2.5.4-alpha (where we introduced
expensive-hardening)

11 years agofix a wide line
Nick Mathewson [Tue, 20 May 2014 19:22:27 +0000 (15:22 -0400)] 
fix a wide line

11 years agosandbox: support logfile rotation
Nick Mathewson [Tue, 20 May 2014 19:21:27 +0000 (15:21 -0400)] 
sandbox: support logfile rotation

Fixes bug 12032; bugfix on 0.2.5.1-alpha

11 years agodoc/HACKING: Improve documentation of how to bump version in maint
Nick Mathewson [Tue, 20 May 2014 19:02:35 +0000 (15:02 -0400)] 
doc/HACKING: Improve documentation of how to bump version in maint

See discussion on 9553: Some of the build scripts don't like it when
you can't merge maint into release.

11 years agosandbox: tolerate reloading with DirPortFrontPage set
Nick Mathewson [Tue, 20 May 2014 18:58:28 +0000 (14:58 -0400)] 
sandbox: tolerate reloading with DirPortFrontPage set

Also, don't tolerate changing DirPortFrontPage.

Fixes bug 12028; bugfix on 0.2.5.1-alpha.

11 years agosandbox: Disallow options which would make us call exec()
Nick Mathewson [Tue, 20 May 2014 16:21:31 +0000 (12:21 -0400)] 
sandbox: Disallow options which would make us call exec()

None of the things we might exec() can possibly run under the
sanbox, so rather than crash later, we have to refuse to accept the
configuration nice and early.

The longer-term solution is to have an exec() helper, but wow is
that risky.

fixes 12043; bugfix on 0.2.5.1-alpha

11 years agosandbox: Permit access to stats/dirreq-stats
Nick Mathewson [Tue, 20 May 2014 16:06:08 +0000 (12:06 -0400)] 
sandbox: Permit access to stats/dirreq-stats

This prevents a crash when rotating logs with dirreq-stats enabled

fixes 12035; bugfix on 0.2.5.1-alpha.

11 years agoOops; permit rename with the correct filename
Nick Mathewson [Tue, 20 May 2014 16:03:27 +0000 (12:03 -0400)] 
Oops; permit rename with the correct filename

11 years agoFix a sentence that I never
Nick Mathewson [Tue, 20 May 2014 15:58:18 +0000 (11:58 -0400)] 
Fix a sentence that I never

11 years agoSandbox: allow access to stats/bridge-stats
Nick Mathewson [Tue, 20 May 2014 15:57:03 +0000 (11:57 -0400)] 
Sandbox: allow access to stats/bridge-stats

Fix for 12041; bugfix on 0.2.5.1-alpha.

11 years agonote a comment that nickm didn't finish
Roger Dingledine [Sat, 17 May 2014 04:02:41 +0000 (00:02 -0400)] 
note a comment that nickm didn't finish

11 years agoAdd changes file for bug11476
Andrea Shepard [Fri, 16 May 2014 15:56:42 +0000 (08:56 -0700)] 
Add changes file for bug11476

11 years agoTurn --enable-mempools off by default
Andrea Shepard [Fri, 16 May 2014 15:51:51 +0000 (08:51 -0700)] 
Turn --enable-mempools off by default

11 years agoMerge remote-tracking branch 'origin/maint-0.2.4'
Nick Mathewson [Fri, 16 May 2014 13:17:34 +0000 (09:17 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.4'

This is an "ours" merge, to avoid taking the commit that bumped
maint-0.2.4's version to 0.2.4.22-dev.

11 years agoBump maint-0.2.4 version to 0.2.4.22-dev
Nick Mathewson [Fri, 16 May 2014 13:16:54 +0000 (09:16 -0400)] 
Bump maint-0.2.4 version to 0.2.4.22-dev

(See discussion on #9553)

11 years agoDocument that we're incrementing version numbers in maint.
Nick Mathewson [Fri, 16 May 2014 13:13:38 +0000 (09:13 -0400)] 
Document that we're incrementing version numbers in maint.

(ticket 9553)

11 years agoForward-port 0.2.4.22 changelog
Nick Mathewson [Fri, 16 May 2014 13:06:48 +0000 (09:06 -0400)] 
Forward-port 0.2.4.22 changelog

11 years agoMerge remote-tracking branch 'public/bug11469_024'
Nick Mathewson [Thu, 15 May 2014 17:35:08 +0000 (13:35 -0400)] 
Merge remote-tracking branch 'public/bug11469_024'

11 years agowhitespace fix, more
Nick Mathewson [Thu, 15 May 2014 02:55:02 +0000 (22:55 -0400)] 
whitespace fix, more

11 years agoMerge branch 'bug11946'
Nick Mathewson [Thu, 15 May 2014 02:51:51 +0000 (22:51 -0400)] 
Merge branch 'bug11946'

11 years agowhitespace fix
Nick Mathewson [Thu, 15 May 2014 02:50:25 +0000 (22:50 -0400)] 
whitespace fix

11 years agoImproved comments on bug11946 fix
Nick Mathewson [Thu, 15 May 2014 02:49:38 +0000 (22:49 -0400)] 
Improved comments on bug11946 fix

11 years agoUse DirPort for uploading descriptors.
Nick Mathewson [Thu, 15 May 2014 01:49:57 +0000 (21:49 -0400)] 
Use DirPort for uploading descriptors.

When we converted the horrible set of options that previously
controlled "use ORPort or DirPort? Anonymously or Non-anonymouly?" to
a single 'indirection' argument, we missed
directory_post_to_dirservers.

The problematic code was introduced in 5cbeb6080, which went into
0.2.4.3-alpha.  This is a fix for bug 11469.

11 years agoUse tor_getpw{nam,uid} wrappers to fix bug 11946
Nick Mathewson [Wed, 14 May 2014 17:53:14 +0000 (13:53 -0400)] 
Use tor_getpw{nam,uid} wrappers to fix bug 11946

When running with User set, we frequently try to look up our
information in the user database (e.g., /etc/passwd).  The seccomp2
sandbox setup doesn't let us open /etc/passwd, and probably
shouldn't.

To fix this, we have a pair of wrappers for getpwnam and getpwuid.
When a real call to getpwnam or getpwuid fails, they fall back to a
cached value, if the uid/gid matches.

(Granting access to /etc/passwd isn't possible with the way we
handle opening files through the sandbox.  It's not desirable either.)

11 years agoAdd a pair of wrapper functions: tor_getpwnam() and tor_getpwuid()
Nick Mathewson [Wed, 14 May 2014 17:50:43 +0000 (13:50 -0400)] 
Add a pair of wrapper functions: tor_getpwnam() and tor_getpwuid()

We'll use these to deal with being unable to access the user DB
after we install the sandbox, to fix bug 11946.