Commit graph

39 commits

Author SHA1 Message Date
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 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 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 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 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 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 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
Elizabeth Myers bdddd9ba83 authd: update all providers to new timeout API 2016-04-04 04:32:55 -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 d86692fa44 Add new sockaddr_storage port retrieval/setting macros
These macros are safe for use on IPv6 and clean up a lot of code.
2016-03-31 03:00:29 -05:00
Elizabeth Myers 367b1a398d authd/providers/ident: remove pointless memcpy 2016-03-31 02:18:02 -05:00
Elizabeth Myers 1e89fb5fa2 providers/ident: restore accidentally deleted line 2016-03-30 23:30:09 -05:00
Elizabeth Myers 15c49abbb3 authd/providers: add timeout callback system.
This means that each provider no longer has to keep its own event; it
can set a timeout and have a callbackinstead.
2016-03-30 17:21:49 -05:00
Elizabeth Myers 34b96d7f76 authd: be more anal about errors 2016-03-28 19:22:40 -05:00
Elizabeth Myers 1345a41dda authd: misc fixes 2016-03-28 16:46:52 -05:00
Elizabeth Myers 8e00155164 authd/providers/ident: fix typo 2016-03-28 00:03:27 -05:00
Elizabeth Myers 54fb109d82 authd/providers/ident: add conf option for enabling ident 2016-03-27 23:57:06 -05:00
Elizabeth Myers f681e277eb authd/providers/ident: perform check for valid auth_client data 2016-03-26 20:33:35 -05:00
Elizabeth Myers 4ac5b30e77 authd/providers/ident: remove debugging message 2016-03-26 19:31:45 -05:00
Elizabeth Myers 22946d30d5 authd/providers/ident: fix up trailing lf/cr at end of username
This bug existed in the original code too, but I have no idea how it
didn't manifest.
2016-03-26 19:18:54 -05:00
Elizabeth Myers d1b70e3524 providers/ident: fix some nasty crashes 2016-03-26 18:40:17 -05:00
Elizabeth Myers f875cb8482 providers/ident: more aggressive NULL checks 2016-03-26 18:01:14 -05:00
Elizabeth Myers 47ab6f6e6e authd/providers/ident: properly initialise variable 2016-03-26 17:35:48 -05:00
Elizabeth Myers 67acafca57 authd/providers/ident: add configuration interface 2016-03-26 16:36:50 -05:00
Elizabeth Myers 06f3496ab3 providers/ident: cleanup things 2016-03-26 15:39:55 -05:00
Elizabeth Myers db821ee9ba authd: split out notices stuff for backporting to master. 2016-03-25 21:29:44 -05:00
Elizabeth Myers a7d5aea119 provider: make blacklist queries come after ident/rdns. 2016-03-25 20:46:58 -05:00
Elizabeth Myers 32f8c78b55 stupidity fixes 2016-03-23 19:06:33 -05:00
Elizabeth Myers 6cd3964de7 ident: use new *_addr fields 2016-03-23 18:58:56 -05:00
Elizabeth Myers 6e4bcf20ff providers/ident: fix inet_ntop/inet_pton mixup 2016-03-23 18:47:02 -05:00
Elizabeth Myers ab33d608de DICTIONARY_FOREACH -> RB_DICTIONARY_FOREACH [ci skip] 2016-03-23 14:29:27 -05:00
Elizabeth Myers aba29d5a19 authd/provider: incorporate new changes 2016-03-23 09:03:37 -05:00
Elizabeth Myers 3e875f629f authd/provider: overhaul storage of various pieces of data
Clients are stored in a dictionary referenced by id (to allow for
UINT32_MAX auth clients, which is plenty).

Each provider now has a data slot (this limits the number of providers
to 32 for now, but that's plenty for now) which they can use to attach
data to auth_clients. This consolidates data, aids in debugging, and
makes it easier to just pass around auth_client structures.
2016-03-22 19:13:54 -05:00
Elizabeth Myers 2b0cc3d36a Redo of the authd-framework branch.
This is basically most of the code from the authd-framework branch, but
written to the new DNS code in master. Not quite done yet but getting
there.
2016-03-17 16:23:27 -05:00