Nick Mathewson
2527acb2dc
Merge remote-tracking branch 'origin/maint-0.2.2'
...
Conflicts:
src/common/Makefile.am
src/or/control.c
2011-05-23 01:23:53 -04:00
Nick Mathewson
b80a8bba19
Merge branch 'feature3049-v2' into maint-0.2.2
...
Conflicts:
src/common/Makefile.am
2011-05-23 01:19:04 -04:00
Roger Dingledine
cb7fff193e
Merge branch 'maint-0.2.2'
2011-05-21 18:14:16 -04:00
Roger Dingledine
a2851d3034
what's up with this trailing whitespace
2011-05-20 23:30:37 -04:00
Nick Mathewson
4ac8ff9c9f
Merge remote-tracking branch 'origin/maint-0.2.2'
2011-05-15 20:22:44 -04:00
Nick Mathewson
f72e792be5
Make check_private_dir check for group ownership as appropriate
2011-05-15 20:20:30 -04:00
Nick Mathewson
287f6cb128
Fix up some comment issues spotted by rransom
2011-05-15 20:20:30 -04:00
Nick Mathewson
5d147d8527
Add a new flag to check_private_dir to make it _not_ change permissions
...
We'll need this for checking permissions on the directories that hold
control sockets: if somebody says "ControlSocket ~/foo", it would be
pretty rude to do a chmod 700 on their homedir.
2011-05-15 20:20:29 -04:00
Nick Mathewson
b147c01295
Make check_private_dir accept g+rx dirs if told to do so.
2011-05-15 20:20:29 -04:00
Robert Ransom
c714a098ea
Improve a documentation comment
2011-05-12 02:57:09 -07:00
Nick Mathewson
9fba014e3f
Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023
...
Conflicts in various places, mainly node-related. Resolved them in
favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022.
src/common/Makefile.am
src/or/circuitlist.c
src/or/connection_edge.c
src/or/directory.c
src/or/microdesc.c
src/or/networkstatus.c
src/or/router.c
src/or/routerlist.c
src/test/test_util.c
2011-05-11 16:39:45 -04:00
Nick Mathewson
44ad734573
Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcmp_022
...
Conflicts throughout. All resolved in favor of taking HEAD and
adding tor_mem* or fast_mem* ops as appropriate.
src/common/Makefile.am
src/or/circuitbuild.c
src/or/directory.c
src/or/dirserv.c
src/or/dirvote.c
src/or/networkstatus.c
src/or/rendclient.c
src/or/rendservice.c
src/or/router.c
src/or/routerlist.c
src/or/routerparse.c
src/or/test.c
2011-05-11 16:24:29 -04:00
Nick Mathewson
59f9097d5c
Hand-conversion and audit phase of memcmp transition
...
Here I looked at the results of the automated conversion and cleaned
them up as follows:
If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I
changed it to a fast_memcmp or fast_memeq.
Otherwise if there was a tor_memcmp that could turn into a
tor_memneq or tor_memeq, I converted it.
This wants close attention.
[*] I'm erring on the side of caution here, and leaving some things
as tor_memcmp that could in my opinion use the data-dependent
fast_memcmp variant.
2011-05-11 16:12:51 -04:00
Nick Mathewson
db7b2a33ee
Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq
...
This commit is _exactly_ the result of
perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch]
perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch]
git checkout src/common/di_ops.[ch]
git checkout src/or/test.c
git checkout src/common/test.h
2011-05-11 16:12:51 -04:00
Nick Mathewson
444e46d96d
Remove the "fuzzy time" code
...
It was the start of a neat idea, but it only got used in 3 places,
none of which really needed it.
2011-03-25 16:28:37 -04:00
Nick Mathewson
a87a55a9b6
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 15:55:41 -05:00
Nick Mathewson
f089804332
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-01-03 15:31:19 -05:00
Nick Mathewson
e365aee971
Avoid assertion on read_file_to_str() with size==SIZE_T_CEILING-1
...
Spotted by doors, fixes bug 2326.
2011-01-03 15:30:11 -05:00
Nick Mathewson
a96b46570f
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 15:16:36 -05:00
Nick Mathewson
cee433d751
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
2011-01-03 15:15:54 -05:00
Nick Mathewson
e09ab69703
Check size against SIZE_T_CEILING in realloc too.
...
Fixes bug 2324.
2011-01-03 15:15:27 -05:00
Nick Mathewson
8730884ebe
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 11:53:28 -05:00
Nick Mathewson
f1de329e78
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/common/test.h
src/or/test.c
2011-01-03 11:51:17 -05:00
Nick Mathewson
1a07348a50
Bump copyright statements to 2011
2011-01-03 11:50:39 -05:00
Roger Dingledine
c79427a992
Merge branch 'maint-0.2.2'
2010-12-19 22:08:42 -05:00
Nick Mathewson
b5e293afe6
Merge remote branch fix_security_bug_021 into fix_security_bug_022
...
Conflicts:
src/common/memarea.c
src/or/or.h
src/or/rendclient.c
2010-12-15 22:48:23 -05:00
Nick Mathewson
785086cfba
Have all of our allocation functions and a few others check for underflow
...
It's all too easy in C to convert an unsigned value to a signed one,
which will (on all modern computers) give you a huge signed value. If
you have a size_t value of size greater than SSIZE_T_MAX, that is way
likelier to be an underflow than it is to be an actual request for
more than 2gb of memory in one go. (There's nothing in Tor that
should be trying to allocate >2gb chunks.)
2010-12-13 18:40:21 -05:00
Steven Murdoch
d5127ebdd8
Fix connecting the stdin of tor-fw-helper to /dev/null
...
This wasn't working due to the parameters of dup2 being in the wrong order.
As a result, tor-fw-helper was inheriting the stdin of Tor.
2010-12-01 12:22:21 -05:00
Nick Mathewson
b4f56dd4c6
Obviate need for doing a CLOEXEC on pipes: just close them before exec
2010-11-20 01:24:30 -05:00
Nick Mathewson
5a66de7015
Initial work to set CLOEXEC on all possible fds
...
Still to go: some pipes, all stdio files.
2010-11-20 00:58:40 -05:00
Nick Mathewson
a5289fa794
Remove the unused old fuzzy-time code
2010-10-15 11:16:42 -04:00
Nick Mathewson
8c837db38f
Merge branch 'nodes'
2010-10-13 16:04:25 -04:00
Nick Mathewson
544a8afe5a
Merge remote branch 'sjmurdoch/bug1903'
2010-10-11 11:01:15 -04:00
Nick Mathewson
8f76f31761
Make tor_sscanf handle %x
2010-10-11 10:50:47 -04:00
Steven Murdoch
8a12ce2cf9
Add a unit test for tor_spawn_background
...
- Test sucessfully starting a process
- Test failing to find the executable
2010-10-10 19:08:44 +01:00
Steven Murdoch
68e576e9f9
Update documentation for tor_spawn_background
...
- Include description of stdout_read, stderr_read, and argv
2010-10-10 19:08:44 +01:00
Steven Murdoch
23e9f362a2
Fix issues in nickm's review of log_from_pipe for bug #1903
...
- Replace sscanf with tor_sscanf
- Replace use of strstr with equivalent call to strcmpstart
2010-10-10 19:08:44 +01:00
Steven Murdoch
4d694c7890
Fix nickm's comments on logging for bug #1903
...
- Use log_warn rather than log_err for bad but survivable events
2010-10-10 19:08:44 +01:00
Steven Murdoch
708ba8899f
Note icky constructs mentioned in bug #1903
...
- To be dealt with as part of bug #2029
2010-10-10 19:07:40 +01:00
Steven Murdoch
5a77c64834
Fix issues in nickm's review of format_helper_exit_status for bug #1903
...
- Responsibility of clearing hex_errno is no longer with caller
- More conservative bounds checking
- Length requirement of hex_errno documented
- Output format documented
2010-10-04 14:31:27 +01:00
Nick Mathewson
b5341314c1
Implement a few more node-based functions
...
Some of these functions only work for routerinfo-based nodes, and as
such are only usable for advisory purposes. Fortunately, our uses
of them are compatible with this limitation.
2010-10-01 18:14:27 -04:00
Nick Mathewson
80b515b85f
Initialize fd values in tor_port_check_forwarding to -1
2010-10-01 18:14:17 -04:00
Nick Mathewson
495e630a49
Merge branch 'tor-fw-squashed2'
...
Conflicts:
src/common/util.c
2010-09-30 16:22:39 -04:00
Nick Mathewson
0e9d969bb2
Fix space and formatting issues
2010-09-30 15:55:42 -04:00
Nick Mathewson
2835dcf69f
#if-out the fw-helper code in util.c when building on windows
2010-09-30 12:58:48 -04:00
Steven Murdoch
a6dc00fa75
Start tor-fw-helper in the background, and log whatever it outputs
2010-09-30 11:40:37 -04:00
Sebastian Hahn
45c51e3238
Fix check-spaces
2010-09-30 06:17:32 +02:00
Nick Mathewson
e385961542
Merge remote branch 'public/bug1954' into maint-0.2.2
2010-09-27 15:39:40 -04:00
Nick Mathewson
d073d7d4eb
Consistency issues in load_windows_system_library patch. Thanks Sebastian
2010-09-24 14:16:55 -04:00
Sebastian Hahn
851255170a
Note that the torrc format doesn't need nl at end
2010-09-24 13:32:27 +02:00