summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-12-08Fix wide lines introduced by previous patch.Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Let's have only one FREE_AND_NULL variant.Nick Mathewson
This commit removes the old FREE_AND_NULL, and renames the old FREE_AND_NULL_UNMATCHED so that it is now called FREE_AND_NULL. This will break all the FREE_AND_NULL_* users; the next commit will fix them.
2017-12-08Make tor_free only evaluate its input once (at least on gcc and clang)Nick Mathewson
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Convert the rest of src/common's headers to use FREE_AND_NULLNick Mathewson
2017-12-07add a missing windows underscoreNick Mathewson
2017-12-06Fix a compiler warningNick Mathewson
2017-12-06Merge remote-tracking branch 'public/monotime_coarse_stamps'Nick Mathewson
2017-12-05Merge branch 'maint-0.3.2'Nick Mathewson
2017-12-05Tweaks to strings in 24500Nick Mathewson
2017-12-05Make errno error log more useful for getrandom()Fernando Fernandez Mancera
Making errno error log more useful for getrandom() call. Adding if statement to make difference between ENOSYS and other errors. Fixes #24500 Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2017-11-30Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-30Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2017-11-30Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-11-30Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-11-30Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-11-30Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-11-27Avoid asking for passphrase on junky PEM inputNick Mathewson
Fixes bug 24246 and TROVE-2017-011. This bug is so old, it's in Matej's code. Seems to have been introduced with e01522bbed6eea.
2017-11-27Add a new notion of "stamps" to be a fast 32-bit monotonic timestampNick Mathewson
The goal here is to replace our use of msec-based timestamps with something less precise, but easier to calculate. We're doing this because calculating lots of msec-based timestamps requires lots of 64/32 division operations, which can be inefficient on 32-bit platforms. We make sure that these stamps can be calculated using only the coarse monotonic timer and 32-bit bitwise operations.
2017-11-21re-run ./scripts/maint/annotate_ifdef_directivesNick Mathewson
2017-11-21Merge branch 'ticket23953_033_squashed'Nick Mathewson
2017-11-21Use stdatomic.h for atomic_counter_t where available.Nick Mathewson
Closes ticket 23953.
2017-11-21Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-21Merge branches 'bug24099_031' and 'bug24086_031' into maint-0.3.2Nick Mathewson
2017-11-20Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-20Merge remote-tracking branches 'public/ticket24315_029' and ↵Nick Mathewson
'public/bug24198_029' into maint-0.3.2
2017-11-20In storagedir, take more care with errno on empty or mislabeled fileNick Mathewson
Required for 24099 fix -- we won't be able to act based on errno unless we can trust it.
2017-11-17Make all the crypto free() functions macros that clear their targetsNick Mathewson
2017-11-17Make all the free() functions from container.h clear their targetsNick Mathewson
2017-11-17Add a macro to call a free_ function and clear a variableNick Mathewson
2017-11-16Check the libc version to decide whether to allow openat.Nick Mathewson
2017-11-16Make our seccomp2 sandbox handle Glibc 2.26Nick Mathewson
There are three changes here: * We need to allow epoll_pwait. * We need to allow PF_NETLINK sockets to be opened with SOCK_CLOEXEC. * We need to use openat() instead of open(). Note that this fix is not complete, since the openat() change is turned off. The next commit will make the openat() change happen when we're running glibc 2.26 or later. Fix for 24315.
2017-11-16Permit kill(pid, 0) in the seccomp2 sandbox.Nick Mathewson
We don't want to allow general signals to be sent, but there's no problem sending a kill(0) to probe whether a process is there. Fixes bug 24198; bugfix on 0.2.5.1-alpha when the seccomp2 sandbox was introduced.
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.