aboutsummaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
authorDennis Kaarsemaker <dennis@kaarsemaker.net>2016-02-23 20:14:57 +0100
committerDennis Kaarsemaker <dennis@kaarsemaker.net>2016-03-25 19:07:53 +0100
commit50bb49039b264ac599ad1ddee2be86cfc7cb68ce (patch)
treecf8bbc7389ba680db21a68209d0298a35a7ebac2 /auth.c
parenta6005da78ae1563ae4577179d1e54fff74cfe21a (diff)
ldap authentication backend
We only support the openldap scheme for now, with users that are posixAccounts. Moreover, as the plugin cannot be configured directly, you must configure libldap correctly in /etc/openldap/ldap.conf
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/auth.c b/auth.c
index 9717acc1..5a9d8bb8 100644
--- a/auth.c
+++ b/auth.c
@@ -4,6 +4,9 @@
#ifdef WITH_PAM
extern auth_backend_t auth_pam;
#endif
+#ifdef WITH_LDAP
+extern auth_backend_t auth_ldap;
+#endif
GList *auth_init(const char *backend)
{
@@ -15,6 +18,12 @@ GList *auth_init(const char *backend)
ok = 1;
}
#endif
+#ifdef WITH_LDAP
+ gl = g_list_append(gl, &auth_ldap);
+ if (backend && !strcmp(backend, "ldap")) {
+ ok = 1;
+ }
+#endif
return ok ? gl : NULL;
}