Commit Graph

84 Commits

Author SHA1 Message Date
Hamcha dd021e6449 Fallback only if EGD is selected 2014-10-12 01:05:06 +02:00
Hamcha bd91ef662b Fixed conding style (tab->spaces) 2014-10-12 01:02:17 +02:00
Hamcha b1bd65b6ab Fix conflicts with PR #24
Conflicts:
	libratbox/src/openssl.c
2014-08-08 14:10:34 +02:00
Sam Dodrill 9890a48cd9 Change all code to a consistent style
We use the Linux Kernel format now.
2014-08-03 10:38:55 -07:00
Hamcha 0cea0c17d2 Allow compilation for targets without EGD (ie LibreSSL) 2014-08-03 12:30:51 +02:00
Jilles Tjoelker 0ae1f793d9 libratbox: Fix undefined behaviour advancing pointer beyond end of array.
The C standard does not allow constructing pointers beyond one past the end
of an array. Therefore, if size is an unsigned type (size_t), then
buf + size is never less than buf.

Clang on 32-bit took advantage of the undefined behaviour, causing
segfaults.

(cherry picked from commit fab79c5d25423884fc4f5e0a56d97cb59b618196)
2014-08-01 18:23:59 -07:00
Sam Dodrill fb096745d8 Fix autotools build system 2014-06-09 16:10:15 -07:00
Sam Dodrill 990a42b71b Staging for Elemental-IRCd 6.6 release 2014-06-01 16:09:24 -07:00
Sam Dodrill c141ed9307 Add defer_accept option to enable TCP_DEFER_ACCEPT
Merge: 6fb5e9636fa1fffc62e86561e7dcd734fa2ee53f

Add defer_accept option to enable TCP_DEFER_ACCEPT
Charybdis commits referenced:

atheme/charybdis@77cb59b
    libratbox: add support for TCP_DEFER_ACCEPT on linux

atheme/charybdis@aa4737a
    libratbox: make defer_accept optional.

atheme/charybdis@02270e9
    Add listen::defer_accept option for controlling usage
    of TCP_DEFER_ACCEPT option.

atheme/charybdis@797a29f
    libratbox: Allow defer_accept on FreeBSD.
2013-09-28 20:47:02 -07:00
Sam Dodrill 7f45233243 libratbox/openssl: Fix possible memory leak of certificate fingerprints 2013-09-17 18:26:12 -07:00
Sam Dodrill 5efee8cc5e Update gitignore, remove cruft
Add OSX debug symbols to gitignore

Remove libratbox version file, it is automatically generated
2013-09-17 17:43:18 -07:00
Sam Dodrill 3189f0761b Merge commit a4db1558bf2b5ca931bd89e4507505a61df06738
Work around a bug in GCC's loop optimization.

Or maybe it's undefined behavior in our C. Or maybe both. Either way,
it wasn't broken before, and now it is. So this fixes it.
2013-09-09 17:23:34 -07:00
Joah d6e3e1cbbe Port OpenVZ/epoll Fix From charybdis
Ported the epoll fix to allow ShadowIRCd to work on OpenVZ VPSes from atheme/charybdis.
2012-11-20 03:15:54 -05:00
David Dixon II 336c99f71f Update libratbox/src/sigio.c
This needs to be changed. Originally done here: a85566b151
2012-08-30 16:37:28 -03:00
Nathan Phillip Brink ee269f46f5 Detect a potential infinite loop in ./configure in AC_DEFINE_DIR.
Fixes the changes made to AC_DEFINE_DIR in
c74836dc4a5bde1e0bf38da58053bf5f28da8ff5.
2012-03-02 23:18:35 -05:00
JD Horelick bf9bfd2696 run autoconf, autoheader and make depend 2012-02-29 23:18:57 -05:00
Nathan Phillip Brink e8da6ccee6 Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide installation of charybdis. The ssld and bandb daemons, intended to be directly used by ircd and not the user, install into libexec when --enable-fhs-paths is set. For binaries which are meant to be in PATH (bindir), such as ircd and viconf, there is now an option --with-program-prefix=progprefix inspired by automake. If the user specifies --with-program-prefix=charybdis, the ircd binary is named charybdisircd when installed. Add support for saving the pidfile to a rundir and storing the ban database in localstatedir instead of in sysconfdir. This is, again, conditional on --enable-fhs-paths. Fix(?) genssl.sh to always write created SSL key/certificate/dh parameters to the sysconfdir specified during ./configure. The previous behavior was to assume that the user ran genssl.sh after ensuring that his current working directory was either sysconfdir or a sibling directory of sysconfdir.
2012-02-29 23:16:29 -05:00
Jilles Tjoelker 8d5df4cb82 Cope with OPENSSL_VERSION_NUMBER not being a long.
Contrary to the documentation, this is the case on recent FreeBSD at least.
2011-03-20 18:46:32 +01:00
JD Horelick 6dec141a91 Regenerate libratbox configure. 2011-02-05 21:23:08 -05:00
Elizabeth Jennifer Myers d0c759a857 Add endian test to autoconf and convert crypt to use it. 2011-01-24 21:03:00 -05:00
Elizabeth Jennifer Myers 44e6a470d6 Add blowfish to libratbox crypt.
Also change u_int*_t to uint*_t whilst I'm here.
2011-01-17 05:01:11 -05:00
Jilles Tjoelker 86044bd2d6 Fix compiler warnings. 2011-01-08 17:40:12 +01:00
JD Horelick 12e395252c Add SHA256/SHA512 support to crypt.c and fix up the MD5 component (it seemed to have been broken). In addition, unconditionally use the libratbox crypt. 2011-01-19 15:50:46 -05:00
Jilles Tjoelker 7123097bae libratbox: Unbreak compile. 2010-12-15 21:48:26 +01:00
William Pitcock 6ec1ddabff libratbox: Use the server SSL certificate on outgoing connections. 2010-12-13 22:58:09 -06:00
William Pitcock ad06ad5710 libratbox: Clean up uses of strcpy(). 2010-11-23 08:52:18 -06:00
JD Horelick fb06d910df SVN Id removal part two 2010-06-10 21:28:15 -04:00
JD Horelick 133755685e Removal of ancient SVN ID's part one 2010-06-10 21:22:44 -04:00
Jilles Tjoelker 57fe1cf10e openssl: Avoid cutting off OpenSSL errors at 119 chars.
ERR_error_string() is just broken, as it returns at most 119 chars
which means error messages are frequently truncated.
Allow for 511 chars using ERR_error_string_n().
2010-05-09 00:30:51 +02:00
Jilles Tjoelker dce31e2723 Fix --disable-balloc.
libratbox r26769
2010-03-05 17:28:47 +01:00
Jilles Tjoelker ed1dc6b379 gnutls: I guess a gnutls_x509_crt_deinit() is needed to avoid memory leak. 2010-02-22 19:16:37 +01:00
William Pitcock 0a62583676 gnutls: Add support for certfp gathering. 2010-02-22 11:13:59 -06:00
Jilles Tjoelker 6af7e4faa6 Fix a memory leak with client certificates. 2010-02-19 16:55:15 +01:00
William Pitcock b3fa6c9dc6 Fix libtool build issue. 2010-02-18 18:11:23 -06:00
William Pitcock 1800d9737b Run autoreconf. 2010-02-17 23:12:45 -06:00
Jilles Tjoelker 360a73dc94 Add new function rb_get_ssl_certfp() to export-syms.txt. 2010-02-07 20:38:37 +01:00
Jilles Tjoelker a099270d45 Add certfp support to libratbox and ssld.
This lets a user connect with a client certificate, and
passes the certificate's fingerprint to ircd, which
currently just notices it to the user.

A new ssld->ircd message 'F' is used to pass on the
fingerprint.

This is only for OpenSSL for now, not GNUTLS.
2010-01-31 19:04:20 +01:00
Jilles Tjoelker 8b4cf5c15b Fix memory leak and bad error reporting with posix_spawn():
* an initialized posix_spawnattr_t must be destroyed
* posix_spawn() returns an error number instead of setting errno

libratbox trunk r26730
2010-01-22 00:09:56 +01:00
William Pitcock 042acc47bb Run autoreconf. 2010-01-07 16:51:32 -06:00
Jilles Tjoelker 4486c20089 Fix fd passing on FreeBSD/amd64 and possibly Solaris/sparc.
The number of file descriptors in the message was not
determined correctly.
2009-07-10 00:27:01 +02:00
Valeriy Yatsko cb2b4d497e Run automake for libratbox. 2008-12-22 12:50:23 +03:00
Valeriy Yatsko f030cae802 Update libratbox. 2008-12-22 12:49:01 +03:00
Valeriy Yatsko c915c2090e Fix serno.h. 2008-12-22 02:46:26 +03:00
Valeriy Yatsko d56c84364a Remove .hgignore for serno.h, add serno.h for libratbox. 2008-12-22 02:34:40 +03:00
Jilles Tjoelker 7a509a687f Remove additional wrong declaration for rb_kill(). 2008-12-03 22:57:13 +01:00
Valeriy Yatsko 2f6c1ef878 Forgot version.c.SH for libratbox/. 2008-12-03 02:54:08 +03:00
Valeriy Yatsko c7c9aa764d Branch merge. 2008-12-03 02:50:01 +03:00
Valeriy Yatsko 94b4fbf93a Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
Valery V Yatsko e6451707d9 branch merge 2008-08-17 09:33:47 +04:00
Valery V Yatsko 40b8b28e1b run autoreconf 2008-08-17 09:27:15 +04:00