Commit graph

112 commits

Author SHA1 Message Date
Jess Porter
687f290a6c
make some authd warnings L_NETWIDE 2022-10-03 20:00:21 +01:00
Aaron Jones
80d71456cf
authd/providers/opm.c: include <netinet/tcp.h> (#318)
This header defines the TCP_NODELAY flag, which this compilation
unit uses.

Other C libraries implicitly include this header from some other
header we are using (I have not investigated which), but musl's
system headers do not, which breaks building on musl.

Reported-by: 0x5c <dev@0x5c.io>
2022-04-08 09:47:18 -07:00
Ed Kellett
396edc6fbd authd: substitute * if rewritten user is empty
We remove characters like ^ and ~ from the ident string after checking
if it's valid. If it consisted entirely of those, we'd try to send an
empty string to ircd, which would break the protocol, so don't let that
happen.
2021-06-08 22:09:47 +01:00
Ed Kellett
6ee7c05cfc
Undo overzealous seddery 2020-10-23 12:57:02 +01:00
Ed Kellett
a6f63a829e
Innovation by sed 2020-10-15 15:52:41 +01:00
Simon Arlott
bc89b788fa
authd: Don't reveal to users how many DNSBLs are configured 2020-07-09 20:53:00 +01:00
Simon Arlott
e658268b22
authd: Fix DNSBL messages 2020-07-09 20:52:24 +01:00
Ariadne Conill
a389de2a25 authd: rename blacklist_provider to dnsbl_provider, change auth notices accordingly 2020-07-05 21:20:34 -06:00
Simon Arlott
17809d2db7
librb: Fix type of dst for rb_inet_pton_sock() 2019-08-31 16:10:50 +01:00
Simon Arlott
244f6259de
authd: always use an empty buffer to read ident reply
Otherwise we could read uninitialised data beyond the actual reply
2018-08-12 18:45:05 +01:00
Simon Arlott
bfd95f010b
authd: fix "is provider done" logic in blacklist/opm providers
This fixes #262.
2018-08-12 11:19:44 +01:00
Simon Arlott
c6ad9b0c5f
Add basic SCTP listener support that binds to multiple addresses
This only supports two addresses as the intended use is 1 IPv4 and 1 IPv6
address on a single-homed host, and the only supported configuration of
outgoing connections to other servers is to bind a single IPv4 or IPv6
address.
2017-08-24 20:08:20 +01:00
Simon Arlott
de2934965c
remove RB_IPV6 2017-08-20 12:54:46 +01:00
Simon Arlott
f21ef0cebc
authd: assume all providers are running
Otherwise ident returns without setting itself running causing problems.

Move opm/blacklist before ident/rdns so that they can receive completion
notifications.
2017-08-20 12:54:45 +01:00
Simon Arlott
6b80043eca
remove unused variables 2017-08-04 21:01:29 +01:00
Simon Arlott
de36941445
remove unused variables 2017-08-04 20:02:20 +01:00
Simon Arlott
26acc0c4fd
authd: opm: avoid clang static analysis warning
Remove unused `c` variable.
2017-07-29 22:39:52 +01:00
Simon Arlott
4a9f4dccb8
authd: opm: avoid clang static analysis warning
Remove unused `lookup` variables.
2017-07-29 22:28:52 +01:00
Aaron Jones
d1f8acb0da
authd: don't exit() on OPM duplicate scanner errors, just ignore it
I run into this code even with a single kind of scanner with a single
port, so I'm not even sure how it thinks it already exists.

Perhaps it's being parsed twice, or something similar.

c.f. issue #229
2016-12-19 04:57:58 +00:00
Jason Volk
7c003d84bc authd: Fix use after reference count decrement. 2016-08-05 13:08:16 -06:00
Elizabeth Myers
8b0392ca39
Fix stupid compiler errors by my stupidity and tiredness 2016-06-27 19:37:02 -05:00
Elizabeth Myers
cec81c7978
blacklist: add blacklist_cancel_none 2016-06-27 19:36:52 -05:00
Elizabeth Myers
1db45f312a
blacklist: add return statement. d'oh. 2016-06-27 19:36:44 -05:00
Elizabeth Myers
c47e4958e9
blacklist: fix precedence lossage 2016-06-27 19:36:35 -05:00
Elizabeth Myers
02e4674001
blacklist: if no blacklists were checked, properly terminate query. 2016-06-27 19:36:24 -05:00
Elizabeth Myers
d52762b2a9
build_rdns: minor cleanup 2016-06-27 19:36:10 -05:00
Elizabeth Myers
c12d9cd3b2
blacklist: tweak message for timeout 2016-06-27 19:35:51 -05:00
Elizabeth Myers
f16493f468
blacklist: give different messages for cancellation and timeout 2016-06-27 19:35:32 -05:00
Simon Arlott
a5f52774bb
authd: Only use refcount for reference counting
Use providers_active for provider activity tracking.
2016-05-01 11:31:05 +01:00
William Pitcock
a71b65b15c Revert "authd: change to lists instead of dictionaries for various things"
This reverts commit 49fd293f20.
2016-04-30 19:20:12 -05:00
Elizabeth Myers
c767c58b2a
opm: use rb_dlinkDelete instead of rb_dlinkFindDelete. 2016-04-30 01:59:05 -05:00
Elizabeth Myers
49fd293f20
authd: change to lists instead of dictionaries for various things
Iteration is the primary thing done on these, so using a dictionary
doesn't help a lot. Furthermore (and most importantly), they are not
safe to delete from.
2016-04-30 01:59:05 -05:00
Simon Arlott
5ad62c80ee
librb: remove socklen parameter from rb_connect_tcp 2016-04-24 17:11:20 +01:00
Elizabeth Myers
5e9a3f8674
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.
2016-04-12 09:36:09 -05:00
Elizabeth Myers
0807c97e69 elide messages about not checking blacklists or scanning for proxies 2016-04-07 09:45:12 -05:00
Elizabeth Myers
9057170ce8 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...).
2016-04-07 04:47:48 -05:00
Elizabeth Myers
34f65493cd 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.
2016-04-06 09:22:24 -05:00
Elizabeth Myers
8b886283e0 opm: minor fixes 2016-04-06 08:34:39 -05:00
Elizabeth Myers
269646ed4c opm: silly bugfix 2016-04-06 07:43:36 -05:00
Elizabeth Myers
731d128990 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).
2016-04-05 04:31:22 -05:00
Elizabeth Myers
376ae2e2a7 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).
2016-04-05 03:30:02 -05:00
William Pitcock
d475622639 authd: mention rDNS in found your hostname message 2016-04-05 00:56:43 -05:00
Elizabeth Myers
bdddd9ba83 authd: update all providers to new timeout API 2016-04-04 04:32:55 -05:00
Elizabeth Myers
1b4dba98a6 opm: fix typo 2016-04-04 03:59:18 -05:00
Elizabeth Myers
a8322b5268 opm: update to new provider data API 2016-04-04 03:58:46 -05:00
Elizabeth Myers
e78a87f3c4 blacklist: update for new provider data API 2016-04-04 03:49:34 -05:00
Elizabeth Myers
9155a94867 ident: replace some checks with asserts
These checks shouldn't ever trigger, and if they do, it's a problem.
2016-04-04 03:48:42 -05:00
Elizabeth Myers
751d39cc17 ident: update to use new provider data API 2016-04-04 03:39:22 -05:00
Elizabeth Myers
85589ba32f opm: don't start until we've finished ident and rDNS queries.
This ensures that if we reject the client, they will always have a
username and hostname if ircd decides to accept them.
2016-04-03 00:05:53 -05:00
Elizabeth Myers
ffa79a9516 Use rb_dlink_list_length... == 0, not !rb_dlink_list_length 2016-04-02 22:45:52 -05:00