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
a68d9a2b61
authd: dynamically allocate data and timeout elements
2016-04-05 03:08:52 -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
2e1e0b9981
authd: add provider timeout setting API
2016-04-04 04:24:49 -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
74909c9ada
authd: add provider data getter/setter functions
2016-04-04 03:33:25 -05:00
Elizabeth Myers
53c0462146
provider: use rb_dlinkAddTail instead of rb_dlinkAdd.
...
Providers we add last should come last, not first.
2016-04-03 00:06:58 -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
Elizabeth Myers
55984834e5
opm: properly disable opm on blacklist deletions.
...
If there are no proxies left (or they're all being cleared), disable
OPM, as it's totally useless from that point.
2016-04-02 22:31:19 -05:00
Elizabeth Myers
7f2272d3d3
opm: properly check for duplicate listeners
2016-04-02 21:13:44 -05:00
Elizabeth Myers
850ced64fe
authd: options can have no parameters.
...
This is used for deleting all blacklists for instance.
2016-04-02 20:42:45 -05:00
Elizabeth Myers
7c4b574e1b
authd: avoid crash on full reload
2016-04-02 20:10:17 -05:00
Elizabeth Myers
18f3b3c928
opm: downgrade a non-fatal warning
2016-04-02 19:50:25 -05:00
Elizabeth Myers
eb0814b3cb
opm: add support for HTTPS CONNECT proxies.
...
TBD: do we need an SSL listener for these?
2016-04-02 18:38:21 -05:00
Elizabeth Myers
fa2d5b83b4
authd/res: clean up some horribly indented code
2016-04-02 17:45:01 -05:00
Elizabeth Myers
5cbfed5407
authd: fix up comment [ci skip]
2016-04-02 03:49:31 -05:00
Elizabeth Myers
a3b112f426
authd: fix race with aborting clients.
2016-04-02 03:48:37 -05:00
Elizabeth Myers
fabe8b94c5
Add HTTP CONNECT proxy scanning
2016-04-02 03:11:30 -05:00
Elizabeth Myers
fbe8d087e7
Add exempt logic for open proxies
2016-04-02 02:42:11 -05:00
Elizabeth Myers
1de169a248
opm: add configuration interface for configuring scan ports
2016-04-02 00:47:02 -05:00
Elizabeth Myers
4deb334f17
opm: properly re-establish listeners on re-enable
2016-04-01 17:16:17 -05:00
Elizabeth Myers
1661e3656d
opm: properly close listeners after disabling proxy scan
2016-04-01 16:35:21 -05:00
Elizabeth Myers
8275e2700d
Add opm stuff to default configs
2016-04-01 04:11:04 -05:00
Elizabeth Myers
8860e46a33
providers/opm: It Works™
2016-04-01 02:17:25 -05:00
Elizabeth Myers
8aacefa338
opm: properly connect to destination port on scan
2016-03-31 19:08:08 -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
8c0b90de9f
authd/providers/opm: configure port listeners correctly
2016-03-31 02:13:27 -05:00
Elizabeth Myers
272af6a505
providers/opm: use a name that makes more sense for this variable
2016-03-31 01:45:19 -05:00
Elizabeth Myers
766d4ffccd
sockaddr_storage -> rb_sockaddr_storage
...
What is even the point of this type anyway?
2016-03-31 01:27:50 -05:00
Elizabeth Myers
468ef960f8
opm: don't assume we have netinet/tcp.h
...
Instead, check for it in librb
2016-03-31 01:08:38 -05:00
Elizabeth Myers
4e85459a7c
authd: add (not really working) OPM provider.
...
It doesn't do anything yet as no configuration is plugged in, as well.
2016-03-31 00:28:05 -05:00
Elizabeth Myers
c23f97550f
authd/provider: exit on critical errors
2016-03-31 00:26:48 -05:00
Elizabeth Myers
1e89fb5fa2
providers/ident: restore accidentally deleted line
2016-03-30 23:30:09 -05:00
Elizabeth Myers
9f9ab5c2d6
authd/provider: don't crash if there's no init or destroy function
2016-03-30 23:17:21 -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
a5ab106298
authd/provider: fix misordering in macro
2016-03-30 03:38:30 -05:00
Elizabeth Myers
045d9d31c2
Merge branch 'master' of github.com:charybdis-ircd/charybdis
2016-03-30 02:33:19 -05:00
Elizabeth Myers
b3912eae9b
authd/provider: it's va_start.
2016-03-30 02:32:34 -05:00
Elizabeth Myers
52d49164a8
authd/provider: include stdinc.h for stdarg.h
2016-03-30 02:22:43 -05:00
Elizabeth Myers
64afc35817
authd/provider: make reject_client take a format string and varargs
2016-03-30 01:29:21 -05:00
Elizabeth Myers
3257f9d6af
blacklist: this didn't get committed somehow
2016-03-29 23:33:13 -05:00
Elizabeth Myers
ccb5c37db9
blacklist: compile fixes
2016-03-29 23:29:58 -05:00
Elizabeth Myers
7246347058
blacklist: add notices that we're performing checks.
2016-03-29 23:22:13 -05:00
Elizabeth Myers
4094d2fad5
Remove trailing whitespace from files.
2016-03-29 13:23:27 -05:00
Elizabeth Myers
dfd7d4b103
authd: use atexit() hook to attempt to destroy providers
2016-03-28 19:38:43 -05:00
Elizabeth Myers
34b96d7f76
authd: be more anal about errors
2016-03-28 19:22:40 -05:00
Matt Ullman
d8f8474dfd
authd: Cleanup
2016-03-28 20:14:31 -04:00
Elizabeth Myers
1096025891
authd/dns: remove magic number
2016-03-28 17:50:45 -05:00
Elizabeth Myers
1bebedd6fb
authd: remove useless blacklist stats provider for now.
...
Right now we keep track of this in ircd as stats is not ready for
asynchronous replies.
2016-03-28 16:49:26 -05:00
Elizabeth Myers
1345a41dda
authd: misc fixes
2016-03-28 16:46:52 -05:00
Elizabeth Myers
c6ebd4fdad
authd: fix fencepost error
2016-03-28 15:15:16 -05:00
Elizabeth Myers
bd7c2037bf
authd/providers/rdns: change option name to rdns_timeout
2016-03-28 01:55:54 -05:00
Elizabeth Myers
a90465f767
authd/providers/blacklist: add stats reporting for blacklist info
2016-03-28 01:05:19 -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
26d491b95f
authd: pass in uint32_t rid's.
2016-03-27 17:32:05 -05:00
Elizabeth Myers
ee7f92714a
authd/provider: add stats handling hooking
2016-03-27 17:15:08 -05:00
Elizabeth Myers
02e141f7a3
authd: add stats reporting API
2016-03-27 17:04:14 -05:00
Elizabeth Myers
eccc44ed7b
authd/providers/blacklist: use uint8_t for iptype
...
This clearly illustrates what it is
2016-03-27 14:41:50 -05:00
Elizabeth Myers
6535177fef
authd/provider: add data to rejection tag.
...
This is used for information such as what blacklist rejected the client.
2016-03-27 13:52:52 -05:00
Elizabeth Myers
60374ac975
authd: add abiltiy to cancel connection
2016-03-26 23:54:21 -05:00
Elizabeth Myers
0da2a404fa
authd: try to destroy all providers on the way out.
2016-03-26 23:39:22 -05:00
Elizabeth Myers
420cfb677c
authd/provider: add notices in comments to certain functions not to use auth after calling
2016-03-26 23:16:53 -05:00
Elizabeth Myers
e43e61f7a7
authd/providers/blacklist: fix use after free
...
After calling provider_done, you must *always* assume your auth instance
is freed.
2016-03-26 23:15:28 -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
247b304f1f
authd/provider: forgot this file...
2016-03-26 20:33:21 -05:00
Elizabeth Myers
05fdc0301d
authd/provider: do not accept clients until all providers have had a chance to run
2016-03-26 20:32:35 -05:00
Elizabeth Myers
f5586c3abb
authd: misc provider fixes
2016-03-26 19:50:09 -05:00
Elizabeth Myers
4ac5b30e77
authd/providers/ident: remove debugging message
2016-03-26 19:31:45 -05:00
Elizabeth Myers
6950cc255a
authd/providers/blacklist: remove dead store.
2016-03-26 19:19:52 -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
0cff7adb13
authd/provider: some fixes
2016-03-26 18:01:58 -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
cdf1592915
Check these out from authd-framework-2.
2016-03-26 16:53:43 -05:00
Elizabeth Myers
9b24cbdecc
Merge branch 'authd-framework-2' into authd-framework
2016-03-26 16:52:13 -05:00
Elizabeth Myers
6ced6a1f1a
authd/providers/rdns: minor function renaming cleanup
2016-03-26 16:37:04 -05:00
Elizabeth Myers
67acafca57
authd/providers/ident: add configuration interface
2016-03-26 16:36:50 -05:00
Elizabeth Myers
a0a218bac8
authd/providers/blacklist: add configuration interface for deletion
2016-03-26 16:36:14 -05:00
Elizabeth Myers
06f3496ab3
providers/ident: cleanup things
2016-03-26 15:39:55 -05:00
Elizabeth Myers
646e6567c7
providers/rdns: add configuration interface for rDNS timeout
2016-03-26 15:36:12 -05:00
Elizabeth Myers
3f2695ac86
providers/blacklist: add configuration interface
2016-03-26 15:27:57 -05:00
Elizabeth Myers
a51487e0e7
authd/provider: add options handlers for providers
...
This allows providers to create handlers for changing their
configuration.
2016-03-25 23:04:00 -05:00
Elizabeth Myers
db821ee9ba
authd: split out notices stuff for backporting to master.
2016-03-25 21:29:44 -05:00
Elizabeth Myers
a70a737c9b
Merge branch 'master' into authd-framework-2
2016-03-25 21:16:04 -05:00
William Pitcock
c63cd21e6a
authd: check if handler is NULL, ensure that we do not overflow
2016-03-25 21:10:34 -05:00
Elizabeth Myers
75844b15af
authd: fix undefined behaviour
2016-03-25 21:09:55 -05:00
Elizabeth Myers
3ad21f6107
authd/provider: remove obsolete comment [ci skip]
2016-03-25 21:08:46 -05:00
Elizabeth Myers
ee658821e3
reject_client: send back ident and hostname with rejection.
...
At the moment (possibly not in the future) ircd will want to override
our decision whether or not to accept a client; we need to give them
enough information back to ensure they can do it properly.
2016-03-25 21:05:52 -05:00
Elizabeth Myers
a21a82b1b6
Fix dangling line from merge
2016-03-25 21:05:39 -05:00
Elizabeth Myers
f49198a67f
Merge branch 'master' into authd-framework-2
2016-03-25 21:01:48 -05:00