aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-30
|\ | | | | | | | | | | Conflicts: src/common/compat.c src/or/main.c
| * Merge remote-tracking branch 'public/bug3270' into maint-0.2.2Nick Mathewson2011-05-30
| |\
| | * Use a 64-bit type to hold sockets on win64.Nick Mathewson2011-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On win64, sockets are of type UINT_PTR; on win32 they're u_int; elsewhere they're int. The correct windows way to check a socket for being set is to compare it with INVALID_SOCKET; elsewhere you see if it is negative. On Libevent 2, all callbacks take sockets as evutil_socket_t; we've been passing them int. This patch should fix compilation and correctness when built for 64-bit windows. Fixes bug 3270.
* | | Fix a -Wunused-but-set-variable instance in masterNick Mathewson2011-05-28
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-23
|\| | | | | | | | | | | | | | | | | Conflicts: src/common/Makefile.am src/or/control.c
| * | Merge branch 'feature3049-v2' into maint-0.2.2Nick Mathewson2011-05-23
| |\ \ | | |/ | |/| | | | | | | Conflicts: src/common/Makefile.am
| | * Improve a documentation commentRobert Ransom2011-05-12
| | |
* | | Merge branch 'maint-0.2.2'Roger Dingledine2011-05-21
|\| |
| * | what's up with this trailing whitespaceRoger Dingledine2011-05-20
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-15
|\| |
| * | Make check_private_dir check for group ownership as appropriateNick Mathewson2011-05-15
| | |
| * | Fix up some comment issues spotted by rransomNick Mathewson2011-05-15
| | |
| * | Add a new flag to check_private_dir to make it _not_ change permissionsNick Mathewson2011-05-15
| | | | | | | | | | | | | | | | | | 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.
| * | Make check_private_dir accept g+rx dirs if told to do so.Nick Mathewson2011-05-15
| | |
* | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023Nick Mathewson2011-05-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson2011-05-11
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Hand-conversion and audit phase of memcmp transitionNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Remove the "fuzzy time" codeNick Mathewson2011-03-25
| | | | | | | | | | | | | | | It was the start of a neat idea, but it only got used in 3 places, none of which really needed it.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\|
| | * Avoid assertion on read_file_to_str() with size==SIZE_T_CEILING-1Nick Mathewson2011-01-03
| | | | | | | | | | | | Spotted by doors, fixes bug 2326.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\|
| | * Check size against SIZE_T_CEILING in realloc too.Nick Mathewson2011-01-03
| | | | | | | | | | | | Fixes bug 2324.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\| | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Merge branch 'maint-0.2.2'Roger Dingledine2010-12-19
|\| |
| * | Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson2010-12-15
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
| | * Have all of our allocation functions and a few others check for underflowNick Mathewson2010-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* | | Fix connecting the stdin of tor-fw-helper to /dev/nullSteven Murdoch2010-12-01
| | | | | | | | | | | | | | | 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.
* | | Obviate need for doing a CLOEXEC on pipes: just close them before execNick Mathewson2010-11-20
| | |
* | | Initial work to set CLOEXEC on all possible fdsNick Mathewson2010-11-20
| | | | | | | | | | | | Still to go: some pipes, all stdio files.
* | | Remove the unused old fuzzy-time codeNick Mathewson2010-10-15
| | |
* | | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \ \
| * | | Implement a few more node-based functionsNick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge remote branch 'sjmurdoch/bug1903'Nick Mathewson2010-10-11
|\ \ \ \
| * | | | Add a unit test for tor_spawn_backgroundSteven Murdoch2010-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | - Test sucessfully starting a process - Test failing to find the executable
| * | | | Update documentation for tor_spawn_backgroundSteven Murdoch2010-10-10
| | | | | | | | | | | | | | | | | | | | - Include description of stdout_read, stderr_read, and argv
| * | | | Fix issues in nickm's review of log_from_pipe for bug #1903Steven Murdoch2010-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | - Replace sscanf with tor_sscanf - Replace use of strstr with equivalent call to strcmpstart
| * | | | Fix nickm's comments on logging for bug #1903Steven Murdoch2010-10-10
| | | | | | | | | | | | | | | | | | | | - Use log_warn rather than log_err for bad but survivable events
| * | | | Note icky constructs mentioned in bug #1903Steven Murdoch2010-10-10
| | | | | | | | | | | | | | | | | | | | - To be dealt with as part of bug #2029
| * | | | Fix issues in nickm's review of format_helper_exit_status for bug #1903Steven Murdoch2010-10-04
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | - Responsibility of clearing hex_errno is no longer with caller - More conservative bounds checking - Length requirement of hex_errno documented - Output format documented
* / / / Make tor_sscanf handle %xNick Mathewson2010-10-11
|/ / /
* | | Initialize fd values in tor_port_check_forwarding to -1Nick Mathewson2010-10-01
| | |
* | | Merge branch 'tor-fw-squashed2'Nick Mathewson2010-09-30
|\ \ \ | |/ / |/| | | | | | | | Conflicts: src/common/util.c
| * | Fix space and formatting issuesNick Mathewson2010-09-30
| | |
| * | #if-out the fw-helper code in util.c when building on windowsNick Mathewson2010-09-30
| | |
| * | Start tor-fw-helper in the background, and log whatever it outputsSteven Murdoch2010-09-30
| | |