aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2017-11-02Merge branch 'buf_for_stringbuffer_squashed'Nick Mathewson
2017-11-02Add a zero-copy buffer move implementation.Nick Mathewson
2017-11-02Add buf_t API helpers for using buffers to construct outputs.Nick Mathewson
2017-11-01Merge remote-tracking branch 'public/owning_control_fd'Nick Mathewson
2017-10-31Merge branch 'fix-torrcd-sandbox-22605v2'Nick Mathewson
2017-10-27Merge remote-tracking branch 'public/exit_carefully'Nick Mathewson
2017-10-27Make sure all C files have copyright/license noticesNick Mathewson
2017-10-27Merge branch 'protover-rust-impl_squashed'Nick Mathewson
2017-10-27move to allocating c strings from rustChelsea Holland Komlo
2017-10-27use tor allocator for string allocation in rustChelsea Holland Komlo
2017-10-27minimize scope for unsafeChelsea Holland Komlo
update documentation missing check for null
2017-10-27rust implementation of protoverChelsea Holland Komlo
2017-10-20Expose a new function to make the event loop exit once and for all.Nick Mathewson
Instead of calling tor_cleanup(), exit(x), we can now call tor_shutdown_event_loop_and_exit.
2017-10-19Comment-only change: annotate exit() calls.Nick Mathewson
Sometimes when we call exit(), it's because the process is completely hopeless: openssl has a broken AES-CTR implementation, or the clock is in the 1960s, or something like that. But sometimes, we should return cleanly from tor_main() instead, so that embedders can keep embedding us and start another Tor process. I've gone through all the exit() and _exit() calls to annotate them with "exit ok" or "XXXX bad exit" -- the next step will be to fix the bad exit()s. First step towards 23848.
2017-10-19Mark some unreachable code in compat_winthreads.c as unreachableNick Mathewson
2017-10-18New function for Tor to treat itself as the "owner" of a socketNick Mathewson
Our socket accounting functions assumed that we'd never be asked to close a socket that we didn't open ourselves. But now we want to support taking control sockets that we inherit -- so we need a way of taking ownership of them, so we don't freak out later on when we close them.
2017-10-18Make the mark_socket_open() no-op treat the socket as used.Nick Mathewson
This is preliminary for extracting the "take socket ownership" code into its own function.
2017-09-29Make some assertions nonfatal to help prevent bug23690 recurrence.Nick Mathewson
2017-09-28Better error handling when trying to compress/decompress into empty buffer.Alexander Færøy
This patch ensures that we return TOR_COMPRESS_BUFFER_FULL in case we have a input bytes left to process, but are out of output buffer or in case we need to finish where the compression implementation might need to write an epilogue. See: https://bugs.torproject.org/23551
2017-09-28Fix whitespace issue in compress.cAlexander Færøy
2017-09-28Fix typo in buffers.c.Alexander Færøy
2017-09-28Improve unit test coverage for compression code.Nick Mathewson
These tests try uncompressing garbage, verify that we won't make compression bombs, and verify that we won't uncompress compression bombs.
2017-09-28Fix spelling: compressing, not compresingNick Mathewson
2017-09-28Correct docs for config_lines_dup_and_filterNick Mathewson
2017-09-28Move around some LCOV_EXCLs in src/commonNick Mathewson
Apparently, my compiler now generates coverage markers for label-only lines, so we need to exclude those too if they are meant to be unreachable.
2017-09-28Note an unreachable (?) section in buffers.cNick Mathewson
2017-09-20Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-20in zstd compression, fix 32 bit buildAndreas Stieger
format '%lu' expects argument of type 'long unsigned int', but argument ... has type 'size_t' Closes ticket 23568.
2017-09-19Add a BASE32_DIGEST_LEN defineDavid Goulet
Use this value instead of hardcoded values of 32 everywhere. This also addresses the use of REND_DESC_ID_V2_LEN_BASE32 in hs_lookup_last_hid_serv_request() for the HSDir encoded identity digest length which is accurate but semantically wrong. Fixes #23305. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-15Split some long #if lines to make the #endif annotator happyNick Mathewson
2017-09-15Merge branch 'bug23487_029'Nick Mathewson
2017-09-15Use different variable names for pw_uid usagesNick Mathewson
Catalyst points out that using pw_uid for two different purposes here is likely to be confusing.
2017-09-15Merge remote-tracking branch 'dgoulet/ticket12541_032_02'Nick Mathewson
2017-09-15sched: Add sandbox support for KISTDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Explain the restrictions on divisor in round*_to_next_multiple_ofteor
Closes 23528.
2017-09-12Fix warnings about passing uninitialized buffers into functionsNick Mathewson
Most of these buffers were never actually inspected, but it's still bad style.
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
2017-09-12clang scan-build: Fix "dead increment" warnings.Nick Mathewson
For the most part, these indicated a spot where the code could have been better.
2017-09-12Log correctly on owner/user mismatch.Nick Mathewson
Found with clang's scan-build while looking at dead assignments. Fixes bug 23487; bugfix on 1135405c8c6ea31 in 0.2.9.1-alpha
2017-09-12One more implicit fallthrough warning to fix on GCC 7Nick Mathewson
2017-09-11Fix mixed-sign comparison warning in fix for 22797.Nick Mathewson
2017-09-11Merge branch 'teor-bug22797-025' into maint-0.2.9Nick Mathewson
2017-09-11Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-11Extract the important parts of the run-pending-timers function.Nick Mathewson
Our unit tests will need this, so that they can simulate advancing time without getting libevent involved.
2017-09-08Merge branch 'ticket20119'Nick Mathewson
2017-09-07Add a module comment to util_bug.hNick Mathewson
Closes ticket 22824.
2017-09-06Better error on failure to load seccomp2 sandboxNick Mathewson
There are two reasons this is likeliest to happen -- no kernel support, and some bug in Tor. We'll ask people to check the former before they report. Closes 23090.
2017-09-06Exit when we can't write to a configured pid fileNick Mathewson
This is probably what the user wants, according to 20119.