aboutsummaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
authorDennis Kaarsemaker <dennis@kaarsemaker.net>2016-02-23 19:52:32 +0100
committerDennis Kaarsemaker <dennis@kaarsemaker.net>2016-03-25 19:07:53 +0100
commita6005da78ae1563ae4577179d1e54fff74cfe21a (patch)
tree5429777b8c47b3a33f0213952c8b6de932974e89 /auth.c
parent8e6ecfe23ff985e57675bd00b94860edb62de9ad (diff)
Linux pam authentication backend
This backend authenticates users against pam.
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/auth.c b/auth.c
index e83a683f..9717acc1 100644
--- a/auth.c
+++ b/auth.c
@@ -1,10 +1,20 @@
#define BITLBEE_CORE
#include "bitlbee.h"
+#ifdef WITH_PAM
+extern auth_backend_t auth_pam;
+#endif
+
GList *auth_init(const char *backend)
{
GList *gl = NULL;
int ok = backend ? 0 : 1;
+#ifdef WITH_PAM
+ gl = g_list_append(gl, &auth_pam);
+ if (backend && !strcmp(backend, "pam")) {
+ ok = 1;
+ }
+#endif
return ok ? gl : NULL;
}