Debian Codegraph @

modules/auth/dummy.c

raw
1 /*
2 * Copyright (c) 2009 Atheme Development Group
3 * Rights to this code are as documented in doc/LICENSE.
4 *
5 * Dummy authentication, always returns failure.
6 * This really only serves to have an auth module that always compiles.
7 */
8
9 #include "atheme.h"
10
11 DECLARE_MODULE_V1
12 (
13 "auth/dummy", false, _modinit, _moddeinit,
14 PACKAGE_STRING,
15 VENDOR_STRING
16 );
17
18 static bool dummy_auth_user(myuser_t *mu, const char *password)
19 {
20 return false;
21 }
22
23 void _modinit(module_t *m)
24 {
25 auth_user_custom = &dummy_auth_user;
26
27 auth_module_loaded = true;
28 }
29
30 void _moddeinit(module_unload_intent_t intent)
31 {
32 auth_user_custom = NULL;
33
34 auth_module_loaded = false;
35 }
36
37 /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs
38 * vim:ts=8
39 * vim:sw=8
40 * vim:noexpandtab
41 */