Roger Dingledine
b5a8c3aa00
Remove misleading function comment (bug 5324)
...
In the distant past, connection_handle_read() could be called when there
are pending bytes in the TLS object during the main loop. The design
since then has been to always read all pending bytes immediately, so
read events only trigger when the socket actually has bytes to read.
Resolves bug 5324.
2012-03-07 21:07:30 -05:00
Nick Mathewson
298e08132f
Merge remote-tracking branch 'public/bug4760'
2012-03-05 10:44:48 -05:00
Nick Mathewson
77a7a980d0
Don't leak the env_vars_sorted smartlist in process_environment_make
...
Found by Coverity.
No changes/ file, because this bug has not been in a release yet.
2012-02-29 19:49:26 -05:00
Nick Mathewson
6a0d809f44
Merge remote-tracking branch 'sebastian/bug5231'
2012-02-29 15:16:15 -05:00
Roger Dingledine
406bc95271
Merge branch 'maint-0.2.2'
2012-02-29 13:23:23 -05:00
Roger Dingledine
e21756908f
new ip address for maatuska
2012-02-29 13:22:41 -05:00
Roger Dingledine
c26aaf9cba
whitespace fix
2012-02-29 13:17:52 -05:00
Sebastian Hahn
2755b09c52
Don't cannibalize already cannibalized circuits
...
This ensures we don't build circuits that have 5 hops or more. Patch
contributed by wanoskarnet, thanks!
2012-02-25 17:59:21 +01:00
Daniel Bryg
f7e87f41f7
When not fetching v2 dir info, don't require it for cleaning descriptors
...
Bugfix on 0.2.2.26-beta, which introduced the idea of caches not
cacheing v2 info. Fixes bug 4838.
2012-02-23 13:59:37 -05:00
Nick Mathewson
81fe3e438b
Merge remote-tracking branch 'sebastian/bug5161'
2012-02-20 13:00:17 -05:00
Nick Mathewson
73d2f335c5
Merge remote-tracking branch 'pmezard/armv5'
2012-02-20 12:53:49 -05:00
Patrick Mézard
857ae345c8
Fix off-by-one error in test_util_make_environment
2012-02-20 14:12:50 +01:00
Robert Ransom
cd029f0ca3
Fix crypto_hmac_sha256 documentation comment
2012-02-20 02:47:10 -08:00
Sebastian Hahn
bc66878bde
Don't redeclare environ if std headers already did
...
This would cause a redundant redeclaration warning on some versions of
Linux otherwise.
2012-02-19 16:52:38 +01:00
Roger Dingledine
3a94530595
document a cool attack that we evaluated
2012-02-17 14:02:25 -05:00
Nick Mathewson
1d36693570
Use get_environment(), not environ.
2012-02-17 11:50:19 -05:00
Nick Mathewson
eaedcba493
Merge branch 'bug5105-v2-squashed'
...
Conflicts:
src/or/transports.c
2012-02-17 11:50:10 -05:00
Robert Ransom
773290c09a
Add unit tests for easily tested, non-trivial utility functions
2012-02-17 11:42:21 -05:00
Robert Ransom
33552c16ca
Heap-allocate strings returned by get_current_process_environment_variables
2012-02-17 11:42:21 -05:00
Robert Ransom
c0808b795f
Pass process_environment_t * to tor_spawn_background
...
Now tor_spawn_background's prototype is OS-independent.
2012-02-17 11:42:20 -05:00
Robert Ransom
ee3a49d6ed
Remove (void)envp from tor_spawn_background
...
The envp argument is used on Windows.
2012-02-17 11:42:20 -05:00
Robert Ransom
bf1ce3f53d
Rewrite managed proxy environment setup code
...
Now, the environment setup is entirely OS-independent, as well as less
hacky and brittle.
2012-02-17 11:42:20 -05:00
Robert Ransom
340d906419
Change type of unixoid_environment_block to match tor_spawn_background's arg
2012-02-17 11:42:20 -05:00
Robert Ransom
d37a1ec8c6
Add set_environment_variable_in_smartlist
2012-02-17 11:42:20 -05:00
Robert Ransom
0ba93e184a
Add get_current_process_environment_variables
2012-02-17 11:42:19 -05:00
Robert Ransom
98cec14982
Add process_environment_make and related utilities
2012-02-17 11:42:19 -05:00
Robert Ransom
806e0f7e19
Add tor_calloc
2012-02-17 11:42:19 -05:00
Nick Mathewson
936b7b7b0b
Downgrade "Registered server transport" msg to notice. Bug 5136
2012-02-15 12:58:36 -05:00
Sebastian Hahn
19b4df0d46
Include compat.h from natpmp-helper to fix build
...
This means tor_socket_t is declared.
2012-02-14 23:36:39 +01:00
Sebastian Hahn
efb7b9dec1
Use _NSGetEnviron() instead of environ where required
...
OS X would otherwise crash with a segfault when linked statically to
some libraries.
2012-02-14 11:18:39 -05:00
Sebastian Hahn
efcdc930fb
Make ht.h conform to Tor's code style again
...
When porting over changes from libevent, a bunch of tabs and a couple of
long lines got introduced.
2012-02-14 11:13:06 +01:00
Nick Mathewson
a31fb42d2e
Port over the last ht.h changes from libevent: avoid _reserved identifiers
2012-02-13 18:40:30 -05:00
Nick Mathewson
107f604f31
Port over ht.h improvements from Libevent.
...
There is a facility (not used now in Tor) to avoid storing the hash
of a given type if it is a fast-to-calculate hash.
There are also a few ancient-openbsd compilation issues fixed here.
The fact that Tor says INLINE while Libevent says inline remains
unaddressed.
2012-02-13 18:06:40 -05:00
Nick Mathewson
1e9400d9c8
ht.h comment tweaks, upstreamed from libevent
2012-02-13 17:56:13 -05:00
Nick Mathewson
8cae9c53b7
Oops; there were a couple of typos in the upstream tinytest
2012-02-13 17:48:43 -05:00
Nick Mathewson
9efee31fae
Synchronize with upstream tinytest again: remove _identifiers
2012-02-13 17:45:15 -05:00
Nick Mathewson
3b47a11654
Synchronize with upstream tinytest.
...
The big change here is a patch (first added to Libevent by Ed Day)
to make sure that the CreateProcess forked-test trick works even
when the main test program is invoked without its .exe suffix.
2012-02-13 17:29:31 -05:00
Roger Dingledine
184a455293
bump to 0.2.3.12-alpha-dev
2012-02-13 10:53:49 -05:00
Roger Dingledine
ff0059b924
bump to 0.2.3.12-alpha
2012-02-13 00:55:03 -05:00
Nick Mathewson
c08dde7e28
Reinstate TOR_PR_EXTENDED_SERVER_PORT, just a little
2012-02-13 00:13:58 -05:00
Sebastian Hahn
93414707ae
set_managed_proxy_environment() can't fail anymore
...
It already couldn't fail on Windows, now it can't fail on non-Windows,
either.
2012-02-12 23:39:58 -05:00
Sebastian Hahn
9857ef0fb5
Properly set up environment for managed-mode obfsproxy
2012-02-12 23:39:58 -05:00
Nick Mathewson
60b42d68f3
Try to have (and maintain!) an invariant about unconfigured_proxies_n
...
The invariant is: unconfigured_proxies_n is exactly the number of
managed_proxy_t not in state PT_PROTO_COMPLETED.
To maintain this, we need to stop overloading unconfigured_proxies_n
to also count managed_proxy_t items that are in PT_PROTO_COMPLETED but
which might need relaunching. To make it so we can detect those, we
introduce another variable.
This commit also adds a function to assert that we haven't broken the
invariant.
Fix for bug 5084; bugfix on 0.2.3.6-alpha, I think.
2012-02-12 23:30:19 -05:00
Nick Mathewson
fff511a5e7
Don't smartlist_remove a managed proxy from a list we're iterating over.
...
In some cases, we solve this by doing a SMARTLIST_DEL_CURRENT before
calling managed_proxy_destroy. But for a trickier one, we just make a
copy of the list before iterating over it, so that changes to the
manage proxy list don't hurt our iteration.
This could be related to bug 5084.
2012-02-12 23:30:18 -05:00
Sebastian Hahn
d7d6da28d4
Fix a check-spaces complaint
2012-02-12 23:29:22 -05:00
Nick Mathewson
4aa0aa0300
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/Makefile.am
src/or/Makefile.am
2012-02-12 23:27:31 -05:00
Nick Mathewson
61452299d1
Unpack a smartlist_foreach and add an assert: try to hunt #5102
2012-02-12 19:42:35 -05:00
Robert Ransom
93dbc17a1a
Fix #5097 on Windows, too
2012-02-12 19:13:17 -05:00
Robert Ransom
0e9663d439
Fix bug #5097 : remove bogus envvar from managed proxies' environment
2012-02-12 19:12:51 -05:00
Sebastian Hahn
8ce6722d76
Properly protect paths to sed, sha1sum, openssl
...
in Makefile.am, we used it without quoting it, causing build failure if
your openssl/sed/sha1sum happened to live in a directory with a space in
it (very common on windows)
2012-02-10 20:12:03 +01:00