]> jfr.im git - solanum.git/log
solanum.git
8 years agosslproc: simplify ssl open callback
Simon Arlott [Mon, 25 Apr 2016 20:12:44 +0000 (21:12 +0100)] 
sslproc: simplify ssl open callback

Don't use the librb callback type as we're always passing client_p.

Provide a return value so that the connect handler can exit_client()
and the accept handler can opt to use the default dead handler.

8 years agoopenssl: accept more certificate verify errors as valid
Simon Arlott [Mon, 25 Apr 2016 19:38:33 +0000 (20:38 +0100)] 
openssl: accept more certificate verify errors as valid

8 years agoconf: require certificate fingerprint for SSL connections
Simon Arlott [Mon, 25 Apr 2016 19:19:48 +0000 (20:19 +0100)] 
conf: require certificate fingerprint for SSL connections

8 years agosslproc: prefix SPKI certfp types to distinguish them from CERT
Simon Arlott [Mon, 25 Apr 2016 19:12:27 +0000 (20:12 +0100)] 
sslproc: prefix SPKI certfp types to distinguish them from CERT

8 years agosslproc: send the certftp method on rehash
Simon Arlott [Mon, 25 Apr 2016 18:22:10 +0000 (19:22 +0100)] 
sslproc: send the certftp method on rehash

8 years agosslproc: use global ServerInfo configuration
Simon Arlott [Mon, 25 Apr 2016 18:20:45 +0000 (19:20 +0100)] 
sslproc: use global ServerInfo configuration

There's no need to pass information around that sslproc already has access
to, so use ServerInfo directly. Remove the extra NULL checks as these are
already performed before setting ircd_ssl_ok = true.

8 years agosslproc: include ssl_cipher_list in length check before sending configuration to...
Simon Arlott [Mon, 25 Apr 2016 18:12:47 +0000 (19:12 +0100)] 
sslproc: include ssl_cipher_list in length check before sending configuration to ssld

8 years agossld: remove init_prng command
Simon Arlott [Mon, 25 Apr 2016 18:02:03 +0000 (19:02 +0100)] 
ssld: remove init_prng command

This is no longer configurable so it's redundant.

8 years agoircd: don't send ERR_NOTREGISTERED to servers
Simon Arlott [Sun, 24 Apr 2016 16:41:44 +0000 (17:41 +0100)] 
ircd: don't send ERR_NOTREGISTERED to servers

Sending messages after SERVER but before zlib is established breaks
outgoing connections. If the other server is misbehaving then ignore
its messages.

8 years agolibrb: remove socklen parameter from rb_connect_tcp
Simon Arlott [Sun, 24 Apr 2016 16:11:20 +0000 (17:11 +0100)] 
librb: remove socklen parameter from rb_connect_tcp

8 years agoircd: server connection configuration
Simon Arlott [Sun, 24 Apr 2016 16:05:05 +0000 (17:05 +0100)] 
ircd: server connection configuration

Fix the server connection configuration so that it can simultaneously
handle a hostname/IPv4/IPv6 for connecting and a hostname/IPv4/IPv6
for binding. Maintains backwards compatibility for matching a hostname
with a mask.

Multiple host/vhost entries can be specified and the last value for
each address family is stored. Hostnames that resolve automatically
overwrite the IP address.

Server connections can now be made to either IPv4 or IPv6 at random
as well as preferring a specific address family.

8 years agoircd: Don't try to connect to servers that we know have an invalid fingerprint
Simon Arlott [Sun, 24 Apr 2016 10:49:21 +0000 (11:49 +0100)] 
ircd: Don't try to connect to servers that we know have an invalid fingerprint

This just causes an unnecessary link/squit on the other server.

8 years agossld: add a callback when the connection is opened
Simon Arlott [Sun, 24 Apr 2016 10:48:35 +0000 (11:48 +0100)] 
ssld: add a callback when the connection is opened

This allows us to wait until we have the fingerprint information before
continuing with a server connect process.

8 years agossld: send cipher/certfp before proxying any plaintext traffic
Simon Arlott [Sun, 24 Apr 2016 09:39:16 +0000 (10:39 +0100)] 
ssld: send cipher/certfp before proxying any plaintext traffic

8 years agom_stats: display certificate fingerprint in STATS C
Simon Arlott [Sat, 23 Apr 2016 23:29:11 +0000 (00:29 +0100)] 
m_stats: display certificate fingerprint in STATS C

8 years agom_alias: store a copy of alias->name as it will be freed on a rehash
Simon Arlott [Sat, 23 Apr 2016 23:09:12 +0000 (00:09 +0100)] 
m_alias: store a copy of alias->name as it will be freed on a rehash

8 years agoircd: parse: add asserts for improper use of mod_add_cmd/mod_del_cmd
Simon Arlott [Sat, 23 Apr 2016 22:56:41 +0000 (23:56 +0100)] 
ircd: parse: add asserts for improper use of mod_add_cmd/mod_del_cmd

8 years agomodules: add missing break
Simon Arlott [Sat, 23 Apr 2016 22:35:27 +0000 (23:35 +0100)] 
modules: add missing break

8 years agoircd: do nothing in client_release_connids if !MyConnect
Simon Arlott [Sat, 23 Apr 2016 22:25:25 +0000 (23:25 +0100)] 
ircd: do nothing in client_release_connids if !MyConnect

8 years agoircd: fix assert in client_release_connids
Simon Arlott [Sat, 23 Apr 2016 22:21:47 +0000 (23:21 +0100)] 
ircd: fix assert in client_release_connids

The connection may have already been closed and MyConnect cleared.

It's only a bug if the connection somehow has connids but is not
our connection.

8 years agossld: Add new certfp_methods spki_sha256 and spki_sha512
Simon Arlott [Sat, 23 Apr 2016 21:51:05 +0000 (22:51 +0100)] 
ssld: Add new certfp_methods spki_sha256 and spki_sha512

These operate on the SubjectPublicKeyInfo of the certificate, which does
change unless the private key is changed. This allows the fingerprint to
stay constant even if the certificate is reissued.

(The same fingerprint is also used by DANE)

8 years agossld: cipher commands don't have any fds
Simon Arlott [Sat, 23 Apr 2016 21:46:25 +0000 (22:46 +0100)] 
ssld: cipher commands don't have any fds

8 years agolibrb: mbedtls: fix rb_get_ssl_certfp()
Simon Arlott [Sat, 23 Apr 2016 21:45:13 +0000 (22:45 +0100)] 
librb: mbedtls: fix rb_get_ssl_certfp()

Add missing break statements.
Return the hash length on success.

8 years agolibrb: fix mbedtls library order
Simon Arlott [Sat, 23 Apr 2016 21:13:03 +0000 (22:13 +0100)] 
librb: fix mbedtls library order

libmbedtls depends on libmbedx509 and libmbedcrypto
libmbedx509 depends on libmbedcrypto

They have to be specified in the correct order for the GNU linker to work.

8 years agoircd: sslproc: certfp commands have a 9 byte header, not 5 bytes
Simon Arlott [Sat, 23 Apr 2016 19:52:20 +0000 (20:52 +0100)] 
ircd: sslproc: certfp commands have a 9 byte header, not 5 bytes

SHA512 hashes were being ignored because the message was too large

8 years agossld: certfp change commands don't have any fds
Simon Arlott [Sat, 23 Apr 2016 19:46:26 +0000 (20:46 +0100)] 
ssld: certfp change commands don't have any fds

8 years agoclient: fix up client_release_connids() too, pointed out by lp0
William Pitcock [Sat, 23 Apr 2016 19:26:01 +0000 (14:26 -0500)] 
client: fix up client_release_connids() too, pointed out by lp0

8 years agoclient: connid_get() should check MyConnect(), not MyClient().
William Pitcock [Sat, 23 Apr 2016 19:17:09 +0000 (14:17 -0500)] 
client: connid_get() should check MyConnect(), not MyClient().

8 years agomr_server: Report certificate fingerprint mismatches
Simon Arlott [Sat, 23 Apr 2016 16:32:24 +0000 (17:32 +0100)] 
mr_server: Report certificate fingerprint mismatches

Log the received certificate fingerprint when it causes a server to be
rejected.

8 years agomr_server: Handle unknown error codes
Simon Arlott [Sat, 23 Apr 2016 16:30:59 +0000 (17:30 +0100)] 
mr_server: Handle unknown error codes

As mr_server is a module, it could potentially receive an unknown
error code from check_server().

8 years agodoc: fix whitespace in example configs [ci skip]
Mantas Mikulėnas [Sat, 23 Apr 2016 14:57:07 +0000 (17:57 +0300)] 
doc: fix whitespace in example configs [ci skip]

8 years agoauthproc: set GOT_ID flag when an ident response is received
Simon Arlott [Sat, 23 Apr 2016 14:41:27 +0000 (15:41 +0100)] 
authproc: set GOT_ID flag when an ident response is received

8 years agoauthd: Avoid negative array indices
staticfox [Sat, 23 Apr 2016 03:06:42 +0000 (23:06 -0400)] 
authd: Avoid negative array indices

8 years agoRevert "Implement the netsplit batch type."
Elizabeth Myers [Sat, 16 Apr 2016 16:05:00 +0000 (11:05 -0500)] 
Revert "Implement the netsplit batch type."

This needs more work, see
https://github.com/ircv3/ircv3-specifications/issues/253

This reverts commit 23738912993a8debf007542c51aeff79588e35ca.

8 years agoImplement the netsplit batch type.
Elizabeth Myers [Fri, 15 Apr 2016 21:50:43 +0000 (16:50 -0500)] 
Implement the netsplit batch type.

This also lays the groundwork for the netjoin batch type, but that isn't
implemented yet. I don't like how some of this is implemented but it'll
have to do for now...

Compile tested, needs more testing.

8 years agoDon't use key member of dictionary iter objects after deletion
Elizabeth Myers [Tue, 12 Apr 2016 14:43:50 +0000 (09:43 -0500)] 
Don't use key member of dictionary iter objects after deletion

8 years agoauthproc: fix a typo
Elizabeth Myers [Tue, 12 Apr 2016 14:37:56 +0000 (09:37 -0500)] 
authproc: fix a typo

8 years agoChange the way authd configures opm
Elizabeth Myers [Tue, 12 Apr 2016 14:33:51 +0000 (09:33 -0500)] 
Change the way authd configures opm

It's a bit of a hack, but better than before. Rather than rehashing
(which could get us into an endless loop), we now segregate the
configuration phase (creating entries ircd-side in case we restart authd
later) and sending phases (when configure_authd() is called). Since we
have to call configure_authd() no matter what (to send timeouts etc.)
and we have to send this data to configure authd anyway, and sending
duplicate data is bad, this is the only way I can think of for now.

8 years agoMerge pull request #183 from grawity/sasl-fail-throttle-v3
Mantas Mikulėnas [Mon, 11 Apr 2016 19:28:33 +0000 (22:28 +0300)] 
Merge pull request #183 from grawity/sasl-fail-throttle-v3

limit failed SASL authentication attempts

8 years agom_sasl: rate-limit SASL REAUTH usage
Mantas Mikulėnas [Mon, 11 Apr 2016 18:38:43 +0000 (21:38 +0300)] 
m_sasl: rate-limit SASL REAUTH usage

8 years agom_sasl: fix coding style
Mantas Mikulėnas [Mon, 11 Apr 2016 17:12:31 +0000 (20:12 +0300)] 
m_sasl: fix coding style

8 years agom_sasl: temporarily reject clients after many failed attempts
Mantas Mikulėnas [Fri, 13 Feb 2015 18:13:06 +0000 (20:13 +0200)] 
m_sasl: temporarily reject clients after many failed attempts

8 years agosend: trim a blank line [ci skip]
Elizabeth Myers [Mon, 11 Apr 2016 16:51:51 +0000 (11:51 -0500)] 
send: trim a blank line [ci skip]

8 years agoMake directions more clear for disabling OPM
Elizabeth Myers [Mon, 11 Apr 2016 16:26:15 +0000 (11:26 -0500)] 
Make directions more clear for disabling OPM

8 years agoName the fallback strncasecmp properly [ci skip]
Elizabeth Myers [Sun, 10 Apr 2016 22:28:20 +0000 (17:28 -0500)] 
Name the fallback strncasecmp properly [ci skip]

8 years agowhoops, fix a typo
Elizabeth Myers [Sun, 10 Apr 2016 22:26:09 +0000 (17:26 -0500)] 
whoops, fix a typo

8 years agoReplace my shitty fallbacks with those from FreeBSD
Elizabeth Myers [Sun, 10 Apr 2016 22:25:32 +0000 (17:25 -0500)] 
Replace my shitty fallbacks with those from FreeBSD

8 years agoREADME: put git command in backticks [ci skip]
Elizabeth Myers [Sun, 10 Apr 2016 22:15:46 +0000 (17:15 -0500)] 
README: put git command in backticks [ci skip]

8 years ago*sigh* comment these out until travis is fixed.
Elizabeth Myers [Sun, 10 Apr 2016 22:11:57 +0000 (17:11 -0500)] 
*sigh* comment these out until travis is fixed.

8 years agoAdd these for now until travis actually gets their shit together.
Elizabeth Myers [Sun, 10 Apr 2016 22:07:33 +0000 (17:07 -0500)] 
Add these for now until travis actually gets their shit together.

8 years agotravis: install shtool.
Elizabeth Myers [Sun, 10 Apr 2016 21:53:40 +0000 (16:53 -0500)] 
travis: install shtool.

8 years agoGet rid of install-sh and use shtoolize to create them.
Elizabeth Myers [Sun, 10 Apr 2016 21:49:42 +0000 (16:49 -0500)] 
Get rid of install-sh and use shtoolize to create them.

Contributed by jackal^

8 years agomodules/m_set: booleanify.
Elizabeth Myers [Sun, 10 Apr 2016 15:11:03 +0000 (10:11 -0500)] 
modules/m_set: booleanify.

8 years agolibrb: minor adjustments to rb_strcasestr fallback to avoid warnings.
Elizabeth Myers [Sun, 10 Apr 2016 15:10:46 +0000 (10:10 -0500)] 
librb: minor adjustments to rb_strcasestr fallback to avoid warnings.

8 years agos_user: clean up authd checks
Elizabeth Myers [Sun, 10 Apr 2016 15:02:33 +0000 (10:02 -0500)] 
s_user: clean up authd checks

8 years agos_user: enhancements to proxy reporting messages
Elizabeth Myers [Sun, 10 Apr 2016 14:35:02 +0000 (09:35 -0500)] 
s_user: enhancements to proxy reporting messages

8 years agoRemove extraneous whitespace [ci skip]
Elizabeth Myers [Sun, 10 Apr 2016 14:23:14 +0000 (09:23 -0500)] 
Remove extraneous whitespace [ci skip]

8 years agoFix stupid linux warning
Elizabeth Myers [Sun, 10 Apr 2016 14:22:34 +0000 (09:22 -0500)] 
Fix stupid linux warning

8 years agoWrap up authd preclient stuff in its own struct
Elizabeth Myers [Sun, 10 Apr 2016 14:20:51 +0000 (09:20 -0500)] 
Wrap up authd preclient stuff in its own struct

8 years agoversion.c.SH: Fix build
staticfox [Sat, 9 Apr 2016 10:05:08 +0000 (06:05 -0400)] 
version.c.SH: Fix build

We need stddef.h mainly for NULL

8 years agoFormatting fixes for credits
Elizabeth Myers [Sat, 9 Apr 2016 09:54:56 +0000 (04:54 -0500)] 
Formatting fixes for credits

Contributed from jackal^, but fixed up a bit.

8 years agoProperly clean up build artifacts.
Elizabeth Myers [Fri, 8 Apr 2016 15:33:36 +0000 (10:33 -0500)] 
Properly clean up build artifacts.

Author: jackal^ from freenode

8 years agoipv4_from_ipv6: move to librb
Elizabeth Myers [Fri, 8 Apr 2016 08:49:23 +0000 (03:49 -0500)] 
ipv4_from_ipv6: move to librb

8 years agoelide messages about not checking blacklists or scanning for proxies
Elizabeth Myers [Thu, 7 Apr 2016 14:45:12 +0000 (09:45 -0500)] 
elide messages about not checking blacklists or scanning for proxies

8 years agoFix overzealotry in flags fixing.
Elizabeth Myers [Thu, 7 Apr 2016 12:48:50 +0000 (07:48 -0500)] 
Fix overzealotry in flags fixing.

These flags are for oper confs, not for client flags.

8 years agoGet rid of flags2.
Elizabeth Myers [Thu, 7 Apr 2016 12:40:55 +0000 (07:40 -0500)] 
Get rid of flags2.

It seems to come from an era where long long didn't exist and 64-bit
machines weren't common. 32-bit machines are still common but I can't
imagine this will have much performance impact there.

This "fixes" #179 in title only, but see comments within.

8 years agoCleanup defaults.h config file.
Elizabeth Myers [Thu, 7 Apr 2016 09:47:48 +0000 (04:47 -0500)] 
Cleanup defaults.h config file.

Clean up spaces/tabs mixing mess (bleh), add some defaults for authd
stuff, and get rid of CHARYBDIS_SOMAXCONN (just define SOMAXCONN if it's
available...).

8 years agoNEWS: add some more relevant items [ci skip]
Elizabeth Myers [Thu, 7 Apr 2016 09:47:31 +0000 (04:47 -0500)] 
NEWS: add some more relevant items [ci skip]

8 years agoNEWS: move news element down to code changes [ci skip]
Elizabeth Myers [Thu, 7 Apr 2016 09:21:16 +0000 (04:21 -0500)] 
NEWS: move news element down to code changes [ci skip]

8 years agoNEWS: add module changes
Elizabeth Myers [Thu, 7 Apr 2016 09:19:24 +0000 (04:19 -0500)] 
NEWS: add module changes

8 years agomodules: fix up display names
Elizabeth Myers [Thu, 7 Apr 2016 09:15:12 +0000 (04:15 -0500)] 
modules: fix up display names

8 years agomodules: move module loading/unloading commands to dedicated module.
Elizabeth Myers [Thu, 7 Apr 2016 09:00:25 +0000 (04:00 -0500)] 
modules: move module loading/unloading commands to dedicated module.

There's no reason to really have these in the main ircd anymore, static
modules are dead and aren't coming back.

To ensure people don't do something hopelessly retarded, this is a core
module.

8 years agom_stats: use macros to clean up generating the stats table
Elizabeth Myers [Thu, 7 Apr 2016 08:27:50 +0000 (03:27 -0500)] 
m_stats: use macros to clean up generating the stats table

8 years agoRemove useless alias_entry hits member
Elizabeth Myers [Wed, 6 Apr 2016 16:47:13 +0000 (11:47 -0500)] 
Remove useless alias_entry hits member

8 years agom_stats: don't list alias entries twice.
Elizabeth Myers [Wed, 6 Apr 2016 16:45:55 +0000 (11:45 -0500)] 
m_stats: don't list alias entries twice.

8 years agom_alias: fix an assert
Elizabeth Myers [Wed, 6 Apr 2016 16:43:19 +0000 (11:43 -0500)] 
m_alias: fix an assert

8 years agoauthd: clean up refcounting stuff
Elizabeth Myers [Wed, 6 Apr 2016 16:43:05 +0000 (11:43 -0500)] 
authd: clean up refcounting stuff

8 years agoauthd: refcounting fixes
Elizabeth Myers [Wed, 6 Apr 2016 14:52:25 +0000 (09:52 -0500)] 
authd: refcounting fixes

8 years agoopm: big cleanup
Elizabeth Myers [Wed, 6 Apr 2016 14:22:24 +0000 (09:22 -0500)] 
opm: big cleanup

This simplifies the creation of scan types by removing lots of awful
boilerplate code and checks that need to be duplicated everywhere.

8 years agoopm: minor fixes
Elizabeth Myers [Wed, 6 Apr 2016 13:34:39 +0000 (08:34 -0500)] 
opm: minor fixes

8 years agom_alias: fix build with --enable-assert
Elizabeth Myers [Wed, 6 Apr 2016 12:57:20 +0000 (07:57 -0500)] 
m_alias: fix build with --enable-assert

8 years agoircd: load modules after conf files
Elizabeth Myers [Wed, 6 Apr 2016 12:43:45 +0000 (07:43 -0500)] 
ircd: load modules after conf files

The alias module depends on this

8 years agoopm: silly bugfix
Elizabeth Myers [Wed, 6 Apr 2016 12:43:36 +0000 (07:43 -0500)] 
opm: silly bugfix

8 years agom_alias: minor cleanup
Elizabeth Myers [Wed, 6 Apr 2016 12:33:36 +0000 (07:33 -0500)] 
m_alias: minor cleanup

8 years agoPartially update a comment
Elizabeth Myers [Wed, 6 Apr 2016 12:28:30 +0000 (07:28 -0500)] 
Partially update a comment

8 years agoMove alias handling into a dedicated module.
Elizabeth Myers [Wed, 6 Apr 2016 12:27:50 +0000 (07:27 -0500)] 
Move alias handling into a dedicated module.

Not yet tested, caveat emptor!

Closes #166

8 years agos_conf: s_bsd's been gone for a long time... lol
Elizabeth Myers [Wed, 6 Apr 2016 11:48:59 +0000 (06:48 -0500)] 
s_conf: s_bsd's been gone for a long time... lol

8 years agoStatic modules are dead, remove this.
Elizabeth Myers [Wed, 6 Apr 2016 11:30:58 +0000 (06:30 -0500)] 
Static modules are dead, remove this.

8 years agoAdd hook for when rehash is called.
Elizabeth Myers [Wed, 6 Apr 2016 10:43:54 +0000 (05:43 -0500)] 
Add hook for when rehash is called.

This will be used by the future alias module.

8 years agoUse uint32_t for get_provider_id, not int
Elizabeth Myers [Wed, 6 Apr 2016 10:43:28 +0000 (05:43 -0500)] 
Use uint32_t for get_provider_id, not int

8 years agoUse rb_* versions of nonportable string functions
Elizabeth Myers [Tue, 5 Apr 2016 10:39:59 +0000 (05:39 -0500)] 
Use rb_* versions of nonportable string functions

8 years agolibrb: add versions of rb_strcasecmp, rb_strncasecmp, and rb_strcasestr.
Elizabeth Myers [Tue, 5 Apr 2016 10:33:43 +0000 (05:33 -0500)] 
librb: add versions of rb_strcasecmp, rb_strncasecmp, and rb_strcasestr.

The first two are POSIX but not standard (Windows has functions that act
like it, so use them), but the latter is non-standard, full stop.

8 years agoauthd: rework module ID system
Elizabeth Myers [Tue, 5 Apr 2016 09:31:22 +0000 (04:31 -0500)] 
authd: rework module ID system

Provider ID's are now assigned dynamically at load-time. To accomodate
this, there is now a lookup system for finding providers by name (all
providers have names as well).

8 years agoClean up the provider status logic.
Elizabeth Myers [Tue, 5 Apr 2016 08:30:02 +0000 (03:30 -0500)] 
Clean up the provider status logic.

Provider status (done, running, not run) is now attached to the
provider-specific data of the client. A reference count of auth
instances is kept in the auth_client struct to determine if a client is
done or not.

This also moves a lot of the logic for manipulating provider data into
into the provider.h header for inlining (no point in a function call for
these simple accessors).

8 years agoauthd: dynamically allocate data and timeout elements
Elizabeth Myers [Tue, 5 Apr 2016 08:08:52 +0000 (03:08 -0500)] 
authd: dynamically allocate data and timeout elements

8 years agoauthd: mention rDNS in found your hostname message
William Pitcock [Tue, 5 Apr 2016 05:56:43 +0000 (00:56 -0500)] 
authd: mention rDNS in found your hostname message

8 years agoauthd: update all providers to new timeout API
Elizabeth Myers [Mon, 4 Apr 2016 09:32:55 +0000 (04:32 -0500)] 
authd: update all providers to new timeout API

8 years agoauthd: add provider timeout setting API
Elizabeth Myers [Mon, 4 Apr 2016 09:24:49 +0000 (04:24 -0500)] 
authd: add provider timeout setting API

8 years agoopm: fix typo
Elizabeth Myers [Mon, 4 Apr 2016 08:59:18 +0000 (03:59 -0500)] 
opm: fix typo

8 years agoopm: update to new provider data API
Elizabeth Myers [Mon, 4 Apr 2016 08:58:46 +0000 (03:58 -0500)] 
opm: update to new provider data API