Nick Mathewson
a88923e455
whitespace fix
2014-05-14 22:50:25 -04:00
Nick Mathewson
585582fc8c
Merge branch 'bug9781_v2'
2014-05-12 13:35:22 -04:00
Nick Mathewson
b5e142cb1b
Log an error reply from tor-fw-helper correctly.
...
Fix for bug 9781; bugfix on cd05f35d2c
in 0.2.4.2-alpha.
2014-05-12 13:35:01 -04:00
dana koch
d6e6c63baf
Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.
...
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain
implicit treatment of long and time_t as comparable types, so explicitly
cast to time_t.
2014-05-11 23:36:00 -04:00
Nick Mathewson
1adc98b9b5
Split portfw-error-logging code into a new function.
...
No code has changed; only moved. Part of a fix for 9781.
2014-05-06 21:22:40 -04:00
Nick Mathewson
c472ac4fb8
Merge remote-tracking branch 'public/bug11233_diagnose'
2014-05-01 12:37:16 -04:00
Nick Mathewson
545e2119f2
Merge remote-tracking branch 'public/bug11605_024'
2014-04-29 14:33:39 -04:00
Nick Mathewson
f0a57bd363
Make compilation of tor_memdup_nulterm() with dmalloc
...
Fixes bug 11605; bugfix on 0.2.4.10-alpha.
2014-04-25 13:52:07 -04:00
Nick Mathewson
156eefca45
Make sure everything using an interned string is preceded by a log
...
(It's nice to know what we were about to rename before we died from
renaming it.)
2014-04-16 22:03:09 -04:00
Nick Mathewson
c0441cca8b
Merge branch 'bug8787_squashed'
2014-03-31 11:57:56 -04:00
Andrea Shepard
abdf1878a3
Always check returns from unlink()
2014-03-31 11:27:08 -04:00
Nick Mathewson
234dfb0c65
Better log message when writing a CR in text mode on windows
...
Help to diagnose #11233
2014-03-27 23:48:17 -04:00
Nick Mathewson
d5e11f21cc
Fix warnings from doxygen
...
Most of these are simple. The only nontrivial part is that our
pattern for using ENUM_BF was confusing doxygen by making declarations
that didn't look like declarations.
2014-03-25 11:27:43 -04:00
Nick Hopper
b063ebbc60
fixed long -> int implicit cast warning line 3453
2014-02-20 11:54:01 +00:00
David Fifield
b600495441
Set CREATE_NO_WINDOW in tor_spawn_background.
...
This flag prevents the creation of a console window popup on Windows. We
need it for pluggable transport executables--otherwise you get blank
console windows when you launch the 3.x browser bundle with transports
enabled.
http://msdn.microsoft.com/en-us/library/ms684863.aspx#CREATE_NO_WINDOW
The browser bundles that used Vidalia used to set this flag when
launching tor itself; it was apparently inherited by the pluggable
transports launched by tor. In the 3.x bundles, tor is launched by some
JavaScript code, which doesn't have the ability to set CREATE_NO_WINDOW.
tor itself is now being compiled with the -mwindows option, so that it
is a GUI application, not a console application, and doesn't show a
console window in any case. This workaround doesn't work for pluggable
transports, because they need to be able to write control messages to
stdout.
https://trac.torproject.org/projects/tor/ticket/9444#comment:30
2013-12-05 12:30:11 -05:00
Nick Mathewson
acd8c4f868
Avoid warning about impossible check for flags & 0
...
Fixes CID 743381
2013-11-22 12:42:05 -05:00
Nick Mathewson
4b9ec85e47
Fix whitespace
2013-11-18 11:13:40 -05:00
Nick Mathewson
fbc20294aa
Merge branch 'backtrace_squashed'
...
Conflicts:
src/common/sandbox.c
src/common/sandbox.h
src/common/util.c
src/or/main.c
src/test/include.am
src/test/test.c
2013-11-18 11:00:16 -05:00
Nick Mathewson
c2dfae78d3
Refactor format_*_number_sigsafe to have a common implementation
2013-11-18 10:43:16 -05:00
Nick Mathewson
d631ddfb59
Make backtrace handler handle signals correctly.
...
This meant moving a fair bit of code around, and writing a signal
cleanup function. Still pretty nice from what I can tell, though.
2013-11-18 10:43:15 -05:00
Nick Mathewson
063bea58bc
Basic backtrace ability
...
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure. By default, I log
them to DataDir/stack_dump and to stderr.
2013-11-18 10:43:14 -05:00
Nick Mathewson
7a2b30fe16
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/or/relay.c
Conflict changes were easy; compilation fixes required were using
using TOR_SIMPLEQ_FIRST to get head of cell queue.
2013-11-15 15:35:00 -05:00
Nick Mathewson
59f50c80d4
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/or/or.h
src/or/relay.c
Conflicts were simple to resolve. More fixes were needed for
compilation, including: reinstating the tv_to_msec function, and renaming
*_conn_cells to *_chan_cells.
2013-11-15 15:29:24 -05:00
Nick Mathewson
0546edde66
Merge branch 'bug1376'
2013-10-11 12:51:15 -04:00
Nick Mathewson
7ef9ecf6b3
Fix some whitespace; tighten the tests.
2013-10-11 12:51:07 -04:00
Nick Mathewson
3d817fa29c
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-10-10 11:18:17 -04:00
Nick Mathewson
7b1b8c3694
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-10-10 11:18:07 -04:00
Nick Mathewson
004a9c6dd1
Fix unit test for format_helper_exit_status
...
Fix format_helper_exit_status to allow full HEX_ERRNO_SIZE answers,
*and* increase the buffer length again.
2013-10-10 11:15:35 -04:00
Nick Mathewson
97285bc465
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-10-10 10:55:58 -04:00
Nick Mathewson
1137817319
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2013-10-10 10:55:24 -04:00
Nick Mathewson
17bcfb2604
Raise buffer size, fix checks for format_exit_helper_status.
...
This is probably not an exploitable bug, since you would need to have
errno be a large negative value in the unix pluggable-transport launcher
case. Still, best avoided.
Fixes bug 9928; bugfix on 0.2.3.18-rc.
2013-10-08 11:13:21 -04:00
Nick Mathewson
f4db0f429a
Fix a windows compilation warning from sandboxing branch
2013-09-13 12:43:18 -04:00
Nick Mathewson
e0b2cd061b
Merge remote-tracking branch 'ctoader/gsoc-cap-stage2'
...
Conflicts:
src/common/sandbox.c
2013-09-13 12:31:41 -04:00
Kevin Butler
0f070e7858
Added test for new write_chunks_to_file behaviour in #1376 .
2013-09-04 23:25:41 +01:00
Kevin Butler
1bdb391ed0
Added no_tempfile parameter to write_chunks_to_file to do non-atomic writes. Implements #1376 .
2013-09-01 00:24:07 +01:00
Nick Mathewson
74262f1571
Merge branch 'bug5040_4773_rebase_3'
2013-08-15 12:04:56 -04:00
George Kadianakis
c5269a59b0
Test ExtORPort cookie initialization when file writing is broken.
2013-08-15 12:03:38 -04:00
Cristian Toader
8a85a48b9d
attempt to add stat64 filename filters; failed due to getaddrinfo..
2013-08-12 21:14:43 +03:00
Andrea Shepard
468e44a0ef
Fix tor_get_lines_from_handle() for make check-spaces
2013-08-02 18:49:57 -07:00
Nick Mathewson
5405688223
Fix compilation on Windows
...
(Bugfix on tests for #9288 fix; bug not in any released Tor)
2013-07-31 14:19:29 -04:00
Nick Mathewson
904a58d10f
Merge branch 'bug9288_rebased'
...
Conflicts:
src/test/test_pt.c
2013-07-31 13:51:15 -04:00
George Kadianakis
2e7c531fdc
Prepare some mock functions to test #9288 .
2013-07-31 13:34:16 -04:00
Cristian Toader
8022def6f0
added openat parameter filter
2013-07-29 16:30:39 +03:00
Nick Mathewson
f6d8bc9389
Refactor the assertion-failure code into a function
2013-07-19 13:40:20 -04:00
Nick Mathewson
5343ee1a06
Add a signal-safe decimal formatting function
2013-07-19 13:26:25 -04:00
Nick Mathewson
713ff2f5ef
Document what "escape" means in tor_escape_str_for_pt_args
2013-07-18 08:45:03 -04:00
George Kadianakis
1a0cf08841
Rename tor_escape_str_for_socks_arg() to something more generic.
...
Since we are going to be using that function to also escape parameters
passed to transport proxies using environment variables.
2013-07-18 08:45:03 -04:00
George Kadianakis
ea72958f25
Pass characters to be escaped to tor_escape_str_for_socks_arg().
...
This is in preparation for using tor_escape_str_for_socks_arg() to
escape server-side pluggable transport parameters.
2013-07-18 08:45:02 -04:00
Nick Mathewson
9fda7e8cd1
Lightly refactor and test format_hex_number_sigsafe
...
Better tests for upper bounds, and for failing cases.
Also, change the function's interface to take a buffer length rather
than a maximum length, and then NUL-terminate: functions that don't
NUL-terminate are trouble waiting to happen.
2013-07-15 12:52:29 -04:00
Nick Mathewson
22977b7c1d
Expose format_hex_number_..., and rename it to ..._sigsafe().
...
There are some other places in the code that will want a signal-safe
way to format numbers, so it shouldn't be static to util.c.
2013-07-15 12:26:55 -04:00