Nick Mathewson
985687bc4f
Fix check-spaces
2015-03-10 10:10:35 -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
de2c5ad815
Revert "Missing dependencies; fixes 15127."
...
This reverts commit 930ab95e1f
.
2015-03-04 15:18:33 +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
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
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
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
Nick Mathewson
4a6b43bf76
fix some warnings in compat_threads.c
2015-01-22 14:22:39 -05:00
Nick Mathewson
1fb9979eb8
Move a redundant _GNU_SOURCE to where it is not redundant
2015-01-22 14:18:10 -05:00
Nick Mathewson
38b3f9a619
use the correct free fn. spotted by dgoulet
2015-01-21 14:54:38 -05:00
Nick Mathewson
23fc1691b6
Merge branch 'better_workqueue_v3_squashed'
2015-01-21 14:47:16 -05:00
David Goulet
d684dbb0c7
Support monotonic time for pthread_cond_timedwait
...
This is to avoid that the pthread_cond_timedwait() is not affected by time
adjustment which could make the waiting period very long or very short which
is not what we want in any cases.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:29:12 -05:00
Nick Mathewson
3c8dabf69a
Fix up some workqueue/threading issues spotted by dgoulet.
2015-01-21 12:26:41 -05:00
Nick Mathewson
ac5b70c700
handle EINTR in compat_*threads.c
2015-01-21 12:18:11 -05:00
Nick Mathewson
746bb55851
Ignore warning for redundant decl in openssl/srtp.h
...
Backports some commits from tor master.
2015-01-15 12:38:08 -05:00
Nick Mathewson
a52e549124
Update workqueue implementation to use a single queue for the work
...
Previously I used one queue per worker; now I use one queue for
everyone. The "broadcast" code is gone, replaced with an idempotent
'update' operation.
2015-01-15 11:05:22 -05:00
George Kadianakis
45bc5a0743
Restrict sample values of the Laplace distribution to int64_t.
...
This helps avoid undefined behavior from casting big double values to
int64_t. Fixes #14090 .
2015-01-15 14:43:58 +00:00