Sebastian Hahn
68e9f364a0
don't init threads as side effect of assertion
...
Fixes part of bug 15211.
2015-03-12 17:52:37 +01:00
Nick Mathewson
2bfdfc849b
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-12 10:06:10 -04:00
Nick Mathewson
192ed94410
Use PTHREAD_CREATE_DETACHED macro instead of 1: fix Solaris crash
...
When calling pthread_attr_setdetachstate, we were using 1 as the
argument. But the pthreads documentation says that you have to say
PTHREAD_CREATE_DETACH, which on Solaris is apparently 0x40. Calling
pthread_attr_setdetachstate with 1 crashes on Solaris with FLTBOUNDS.
(Because we're so late in the release cycle, I made the code define
PTHREAD_CREATE_DETACHED if it doesn't exist, so we aren't likely to
break any other platforms.)
This bug was introduced when we made threading mandatory in
0.2.6.1-alpha; previously, we had force-disabled threading on
Solaris. See #9495 discussion.
2015-03-12 10:03:02 -04:00
Nick Mathewson
985687bc4f
Fix check-spaces
2015-03-10 10:10:35 -04:00
Nick Mathewson
e732ec295d
Merge commit 'origin/maint-0.2.6^'
2015-03-10 08:36:53 -04:00
Nick Mathewson
1af67d7f72
Merge remote-tracking branch 'public/bug15205_025' into maint-0.2.6
2015-03-09 19:47:12 -04:00
Nick Mathewson
24c031b1a2
Don't use checked strl{cat,cpy} on OSX.
...
There is a bug in the overlap-checking in strlcat that can crash Tor
servers. Fixes bug 15205; this is an OSX bug, not a Tor bug.
2015-03-09 15:09:49 -04:00
Nick Mathewson
4ced3b59aa
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 15:19:43 +01:00
Nick Mathewson
de2c5ad815
Revert "Missing dependencies; fixes 15127."
...
This reverts commit 930ab95e1f
.
2015-03-04 15:18:33 +01:00
Nick Mathewson
55e1fe874d
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 12:20:01 +01:00
Nick Mathewson
c5c4ea2db0
Merge remote-tracking branch 'public/bug15088_025' into maint-0.2.6
2015-03-04 12:19:28 +01:00
Nick Mathewson
d5b2cbea10
Add wait4 to the seccomp2 sandbox allowable syscall list
...
fixes bug 15088. patch from sanic.
2015-03-04 12:18:10 +01:00
Nick Mathewson
6a8550fa3c
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 12:15:10 +01:00
Nick Mathewson
5ad47aafab
Merge remote-tracking branch 'public/bug15127_025' into maint-0.2.6
2015-03-04 12:14:17 +01:00
Nick Mathewson
930ab95e1f
Missing dependencies; fixes 15127.
2015-03-04 12:09:33 +01:00
Andrea Shepard
d97f43dc8b
Fix formatting
2015-03-02 10:24:58 +00:00
Nick Mathewson
0dde4d6fa2
Merge remote-tracking branch 'yawning/bug14922'
2015-02-25 08:56:34 -05:00
Nick Mathewson
d74a78c58a
Merge branch 'bug14950_logs_squashed'
2015-02-23 13:04:03 -05:00
Nick Mathewson
21ac0cd2af
Let AF_UNIX connections through the sandbox
...
Fixes bug 15003; bugfix on 0.2.6.3-alpha.
2015-02-23 12:35:20 -05:00
Nick Mathewson
7a1a0a4cd7
Merge remote-tracking branch 'public/bug14988_025'
2015-02-23 11:33:07 -05:00
Nick Mathewson
aeb38bbdce
add another unused-var marker in backtrace.c for 14988
2015-02-23 11:32:04 -05:00
Nick Mathewson
8a9d86bf05
Merge remote-tracking branch 'public/bug11454_11457'
2015-02-20 01:08:12 -05:00
Nick Mathewson
251f6cfcd8
Quiet "caching debian-tor for debian-tor" notice
2015-02-19 12:30:34 -05:00
Yawning Angel
cbd26157c5
Remove tor_strclear(), and replace previous calls with memwipe().
2015-02-17 18:53:33 +00:00
Nick Mathewson
0b46b08225
Check thread count for negative; realloc->reallocarray
...
CID 1268069
2015-02-17 08:46:11 -05:00
Nick Mathewson
5d2a23397a
Fix a few coverity "Use after NULL check" warnings
...
Also remove the unit test mocks that allowed get_options() to be
NULL; that's an invariant violation for get_options().
2015-02-16 15:40:15 -05:00
Nick Mathewson
7117959199
Fix deadcode warning in get_interface_addresses_raw().
...
CID 1268070
2015-02-16 15:28:36 -05:00
Nick Mathewson
2af7bc5b46
Fix a trivial double-close in address.c. CID 1268071
2015-02-16 15:24:13 -05:00
Sebastian Hahn
424edd5710
Don't leak a cond var when starting threads in a pool
2015-02-15 11:21:54 +01:00
Nick Mathewson
5644d92dd7
Merge remote-tracking branch 'sebastian/bug14875'
2015-02-12 14:50:13 -05:00
Sebastian Hahn
c8ce973dc7
Avoid undefined behaviour in ifreq_to_smartlist
...
This could trigger where _SIZEOF_ADDR_IFREQ() might not return a
multiple of sizeof(void *). Fixes bug 14875; not in any released version
of Tor.
2015-02-12 14:56:47 +01:00
Sebastian Hahn
87a95b0236
Actually get all interface addresses
...
If we guessed a buffer size too small, we never increased the buffer and
tried again
Also simplify the interface of ifreq_to_smartlist a little
2015-02-12 14:54:39 +01:00
Nick Mathewson
99e915dbfe
Merge remote-tracking branch 'public/bug14759'
2015-02-11 15:15:24 -05:00
Nick Mathewson
f5f6d13e4c
Fix crash on glibc __libc_message()
...
__libc_message() tries to open /dev/tty with O_RDWR, but the sandbox
catches that and calls it a crash. Instead, I'm making the sandbox
setenv LIBC_FATAL_STDERR_, so that glibc uses stderr instead.
Fix for 14759, bugfix on 0.2.5.1-alpha
2015-02-11 09:46:29 -05:00
Nick Mathewson
6f331645c7
Remove mempools and buf freelists
...
They have been off-by-default since 0.2.5 and nobody has complained. :)
Also remove the buf_shrink() function, which hasn't done anything
since we first stopped using contiguous memory to store buffers.
Closes ticket 14848.
2015-02-11 09:03:50 -05:00
Nick Mathewson
5c820def99
Merge remote-tracking branch 'sysrqb/bug14802_025'
2015-02-09 22:39:55 -08:00
Matthew Finkel
9ae321db66
Return 0 when detecting the amount of memory fails
...
Fixes bug 14802; bugfix on 0.2.5.4-alpha.
2015-02-09 02:06:18 +00:00
Sebastian Hahn
6d8b614729
Avoid logging startup messages twice
2015-02-06 21:34:21 +01:00
Nick Mathewson
3f993dacc1
use ARRAY_LENGTH macro in domain_to_string
2015-02-05 11:01:13 -05:00
Yawning Angel
b330bdec8e
Add a string representation for LD_SCHED, and a extra sanity check.
...
This both fixes the problem, and ensures that forgetting to update
domain_list in the future will trigger the bug codepath instead of
a NULL pointer deref.
2015-02-05 15:46:27 +00:00
Nick Mathewson
5c807f30e4
Add more parenthesis to the definition of ARRAY_LENGTH
2015-02-02 14:14:35 -05:00
Nick Mathewson
69deab8b2a
Merge remote-tracking branch 'public/bug13319'
2015-02-02 10:25:25 -05:00
Nick Mathewson
e78b7e2776
Merge remote-tracking branch 'public/14188_part1'
2015-02-02 10:15:26 -05:00
David Goulet
2c41f12048
Fix: check r < 0 before checking errno
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30 15:18:40 -05:00
David Goulet
51f793e37e
Fix possible infinite loop on pipe/sock_drain()
...
If the returned value of read/recv is 0 (meaning EOF), we'll end up in an
infinite loop (active wait) until something is written on the pipe which is
not really what we want here especially because those functions are called
from the main thread.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30 15:05:18 -05:00
Nick Mathewson
fac8d40886
Merge remote-tracking branch 'public/prop227_v2'
...
Conflicts:
src/test/test_dir.c
2015-01-30 07:36:55 -05:00
Arthur Edelstein
cb714d896c
Bug #8405 : Report SOCKS username/password in CIRC status events
...
Introduces two new circuit status name-value parameters: SOCKS_USERNAME
and SOCKS_PASSWORD. Values are enclosing in quotes and unusual characters
are escaped.
Example:
650 CIRC 5 EXTENDED [...] SOCKS_USERNAME="my_username" SOCKS_PASSWORD="my_password"
2015-01-28 12:02:15 -05:00
Nick Mathewson
e9caa8645e
Try to work around changes in openssl 1.1.0
...
Prefer not to use a couple of deprecated functions; include more
headers in tortls.c
This is part of ticket 14188.
2015-01-28 10:00:58 -05:00
Nick Mathewson
420037dcef
Merge branch 'if_addr_refactoring_squashed'
...
Conflicts:
src/test/include.am
src/test/test.c
2015-01-23 10:13:37 -05:00
rl1987
3966145dff
Refactor code that looks up addresses from interfaces
...
Now the code has separate implementation and examination functions,
uses smartlists sanely, and has relatively decent test coverage.
2015-01-23 10:07:17 -05:00