Commit Graph

152 Commits

Author SHA1 Message Date
Anthony G. Basile
5bf0809744 configure.ac: fix disabling systemd notification support
If --disable-systemd is given, $enable_systemd is set to "no", not "false".
As a result, if libsystemd is found, we still turn on systemd support even
if we explicitly disable it with --disable-system.
2015-01-26 10:03:45 -05:00
Nick Mathewson
23fc1691b6 Merge branch 'better_workqueue_v3_squashed' 2015-01-21 14:47:16 -05:00
Nick Mathewson
63765399eb Merge remote-tracking branch 'public/ticket13037'
Conflicts:
	src/or/config.c
2015-01-18 16:07:08 -05:00
Nick Mathewson
7a63005220 Basic unit test for condition variables. 2015-01-14 11:17:09 -05:00
Nick Mathewson
51bc0e7f3d Isolate the "socketpair or a pipe" logic for alerting main thread
This way we can use the linux eventfd extension where available.
Using EVFILT_USER on the BSDs will be a teeny bit trickier, and will
require libevent hacking.
2015-01-14 11:01:19 -05:00
Nick Mathewson
c2f0d52b7f Split threading-related code out of compat.c
Also, re-enable the #if'd out condition-variable code.

Work queues are going to make us hack on all of this stuff a bit more
closely, so it might not be a terrible idea to make it easier to hack.
2015-01-14 10:41:53 -05:00
Nick Mathewson
b0c32106b3 If libsystemd-daemon.pc is not found, look for libsystemd
(Thanks to toralf for noting that the build was broken, and to
Sebastian for telling me that my fix still wasn't right.)
2015-01-12 10:03:06 -05:00
Nick Mathewson
70b3937425 Fix build on systemdless systems
Fixes bug 14170.
2015-01-11 20:47:15 -05:00
Tomasz Torcz
a8999acc3b fix and enable systemd watchdog
There were following problems:
  - configure.ac wrongly checked for defined HAVE_SYSTEMD; this
    wasn't working, so the watchdog code was not compiled in.
    Replace library search with explicit version check
  - sd_notify() watchdog call was unsetting NOTIFY_SOCKET from env;
    this means only first "watchdog ping" was delivered, each
    subsequent one did not have socket to be sent to and systemd
    was killing service
  - after those fixes, enable Watchdog in systemd unit with one
    minute intervals
2015-01-11 11:14:32 -05:00
Nick Mathewson
dc25fb7382 Better workaround for CFLAGS issues from #14072; fixes #14162
When I applied patch fcc78e5f8a, I somehow broke
stack trace symbols on Linux.  I'll leave it to others to figure out
why that happens.  This should be better.  Really.

Fixes bug 14162; bug not in any released version of Tor.
2015-01-10 17:21:11 -05:00
Nick Mathewson
6bb31cba12 New option "--disable-system-torrc" to not read torrc from etc
Implements 13037.
2015-01-06 17:07:40 -05:00
Nick Mathewson
fcc78e5f8a Use package-config output for -lsystemd correctly
In systemd 209, they deprecated -lsystemd-daemon in favor of
-lsystemd.  So we'd better actually look at the pkg-config output,
or we'll get warnings on newer distributions.

For some as-yet-unknown-to-me reason, setting CFLAGS so early makes
it so -O2 -g doesn't get added to it later.  So, adding it myself
later.  Perhaps a better fix here can be found.

Fixes 14072; bugfix on 0.2.6.2-alpha.  Based on a patch from h.venev
2015-01-06 14:07:13 -05:00
Nick Mathewson
f54e54b0b4 Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
Nick Mathewson
563bb1ad81 Bump version to 0.2.6.2-alpha-dev 2014-12-31 13:24:12 -05:00
Nick Mathewson
a4193252e9 bump the version to 0.2.6.2-alpha 2014-12-31 08:58:26 -05:00
Michael Scherer
29ac883606 Add support for systemd watchdog protocol
It work by notifying systemd on a regular basis. If
there is no notification, the daemon is restarted.
This requires a version newer than the 209 version
of systemd, as it is not supported before.
2014-12-23 11:22:42 -05:00
Michael Scherer
aabaed6f49 add support for systemd notification protocol
This permit for now to signal readiness in a cleaner way
to systemd.
2014-12-23 11:06:01 -05:00
Francisco Blas Izquierdo Riera (klondike)
39e71d8fa5 Use the appropriate call to getsockopt for IPv6 sockets
The original call to getsockopt to know the original address on transparently
proxyed sockets using REDIRECT in iptables failed with IPv6 addresses because
it assumed all sockets used IPv4.

This patch fixes this by using the appropriate options and adding the headers
containing the needed definitions for these.

This patch is released under the same license as the original file as
long as the author iscredited.

Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2014-12-23 10:51:33 -05:00
Nick Mathewson
98ac48785b Bump version to 0.2.6.1-alpha-dev 2014-10-30 10:25:24 -04:00
Nick Mathewson
d8ced3b473 Bump version to 0.2.6.1-alpha 2014-10-30 08:58:58 -04:00
Nick Mathewson
fcdcb377a4 Add another year to our copyright dates.
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code.  Right?
2014-10-28 15:30:16 -04:00
Sebastian Hahn
909aa51b3f Remove configure option to disable curve25519
By now, support in the network is widespread and it's time to require
more modern crypto on all Tor instances, whether they're clients or
servers. By doing this early in 0.2.6, we can be sure that at some point
all clients will have reasonable support.
2014-10-27 14:41:19 +01:00
Nick Mathewson
21fe945ebd Define a strnlen replacement on platforms (win32) that lack it
Right now this is only needed for test_util_format_time_interval, so
define it as a static function.  We can move it into compat later if
we need to.
2014-10-13 14:59:17 -04:00
Nick Mathewson
bbffd0a018 Merge remote-tracking branch 'origin/maint-0.2.5' 2014-10-03 19:58:25 -04:00
Nick Mathewson
d315b8e8bc Merge remote-tracking branch 'public/bug13325_024' into maint-0.2.5 2014-10-03 19:57:41 -04:00
Nick Mathewson
d1fa0163e5 Run correctly on OpenBSD systems without SSL_METHOD.get_cipher_by_char
Also, make sure we will compile correctly on systems where they
finally rip it out.

Fixes issue #13325.  Caused by this openbsd commit:

   ​http://marc.info/?l=openbsd-cvs&m=140768179627976&w=2

Reported by Fredzupy.
2014-10-03 12:15:09 -04:00
rl1987
f20c72f456 Improving error message. 2014-09-28 18:09:25 +03:00
Nick Mathewson
5190ec0bc4 Merge remote-tracking branch 'public/require_some_c99' 2014-09-26 11:06:41 -04:00
Nick Mathewson
764e008092 Merge branch 'libscrypt_trunnel_squashed'
Conflicts:
	src/test/test_crypto.c
2014-09-25 12:03:41 -04:00
Nick Mathewson
e84e1c9745 More generic passphrase hashing code, including scrypt support
Uses libscrypt when found; otherwise, we don't have scrypt and we
only support openpgp rfc2440 s2k hashing, or pbkdf2.

Includes documentation and unit tests; coverage around 95%. Remaining
uncovered code is sanity-checks that shouldn't be reachable fwict.
2014-09-25 11:58:13 -04:00
Nick Mathewson
b0767e85b8 Tell autoconf to make the compiler act as c99
Apparently some compilers want extra switches.
2014-09-25 11:36:28 -04:00
Nick Mathewson
7f5103ec59 Require two c99 features (midblock decls, designated initializers)
c99 lets us do neat stuff like:

    {
      int j, k;
      foo(&j, &k);
      int z = j + k;
    }

and also
    struct point { int x; int y; };
    struct point pt = { .x=5, .y=5 };

This commit makes the configure scripts check to make sure your
compiler implements them.  It also disables our longstanding warning
about midblock declarations.

Closes ticket 13233.
2014-09-25 11:20:04 -04:00
Nick Mathewson
e6150c7fc0 Merge remote-tracking branch 'public/bug12693_025' 2014-09-22 14:45:38 -04:00
Nick Mathewson
550c03336c Bump maint-0.2.5 to 0.2.5.7-rc-dev 2014-09-11 21:38:32 -04:00
Nick Mathewson
8a79b56ac6 Divide torrc.sample into torrc.sample and torrc.minimal
torrc.minimal is now the one that should change as infrequently as
possible.  To schedule an change to go into it eventually, make your
change to torrc.minimal.in-sample.

torrc.sample is now the volatile one: we can change it to our hearts'
content.

Closes ticket #11144
2014-09-02 19:14:30 -04:00
Nick Mathewson
883dc335e9 Fix configure script build with autoconf < 2.63
We added some AS_VAR_IF-based checks to detect whether we have
managed to compile (but not link) with stack-protector.  On autoconf
before 2.63, we don't have AS_VAR_IF, so we just have to let the
user get a compile error rather than a helpful "find libssp" error.

Fixes bug 12693; bugfix on 0.2.5.2-alpha (commit 21ac292820)
2014-08-13 12:01:58 -04:00
Roger Dingledine
77609161f3 bump to 0.2.5.6-alpha 2014-07-28 04:13:18 -04:00
Roger Dingledine
fcbb21b414 bump to 0.2.4.23 2014-07-28 04:07:36 -04:00
Nick Mathewson
7259e3f604 Move test_descriptors.txt to an include file
Making the text file work out-of-tree didn't work on windows.

Maybe we can get it working that way later.
2014-07-16 22:37:00 +02:00
Nick Mathewson
facecce176 Fix tests when building out-of-tree
(This was too hard. Silly autoconf.)
2014-07-16 21:07:22 +02:00
Nick Mathewson
7591ce64fb Merge remote-tracking branch 'origin/maint-0.2.5' 2014-07-16 11:01:20 +02:00
Anthony G. Basile
589de5ec20 configure.ac: fix build with --enable-bufferevents
When building with bufferevents enabled, configure.ac throws an
error if "$ac_cv_header_event2_bufferevent_ssl_h" is not set to
"yes".  However, nowhere was AC_CHECK_HEADERS(event2/bufferevent_ssl.h)
done.  This commit adds the check.
2014-07-16 10:36:34 +02:00
Nick Mathewson
58f4200789 Thread support is now required
Long ago we supported systems where there was no support for
threads, or where the threading library was broken. We shouldn't
have do that any more: on every OS that matters, threads exist, and
the OS supports running threads across multiple CPUs.

This resolves tickets 9495 and 12439.  It's a prerequisite to making
our workqueue code work better, since sensible workqueue
implementations don't split across multiple processes.
2014-06-20 10:20:10 -04:00
Nick Mathewson
c6e1080211 Bump version in master to 0.2.6.0-alpha-dev 2014-06-18 15:18:26 -04:00
Nick Mathewson
3487d26de3 Bump version to Tor 0.2.5.5-alpha-dev 2014-06-18 15:01:45 -04:00
Nick Mathewson
9329c3828d bump version to 0.2.5.5-alpha. Not released yet. 2014-06-16 15:32:35 -04:00
Nick Mathewson
a7cafb1ea9 Merge branch 'bug8746_v2_squashed'
Conflicts:
	src/common/include.am
2014-06-14 11:46:38 -04:00
Nick Mathewson
e2e588175e New testing-only tor_sleep_msec function
In the unit tests I want to loop with a delay, but I want less than
a 1 second delay.  This, sadly, requires compatibility code.
2014-06-14 11:40:27 -04:00
Nick Mathewson
1a73e17801 Merge remote-tracking branch 'andrea/bug11476' 2014-05-22 16:27:29 -04:00
Andrea Shepard
f7a55bc4b4 Turn --enable-mempools off by default 2014-05-16 08:51:51 -07:00