Stub out an optional LDAP-based auth backend
This commit is contained in:
@@ -260,10 +260,12 @@ LIBS=$SAVE_LIBS
|
||||
AC_SUBST(RESOLV_LIBS)
|
||||
|
||||
have_ldap="no"
|
||||
info_ldap="No. LDAP auth backend will be unavailable."
|
||||
AC_CHECK_HEADER(ldap.h,[
|
||||
AC_CHECK_LIB(ldap, ldap_init,[
|
||||
LDAP_LIBS="-lldap"
|
||||
have_ldap="yes"
|
||||
info_ldap="Yes. LDAP auth backend will be available."
|
||||
])
|
||||
])
|
||||
AM_CONDITIONAL(HAVE_LDAP,test "$have_ldap" = "yes")
|
||||
@@ -717,5 +719,6 @@ Imported libraries:
|
||||
libical: ${info_libical}
|
||||
|
||||
Optional libraries:
|
||||
LDAP: ${info_ldap}
|
||||
Check: ${info_check}
|
||||
])
|
||||
|
||||
@@ -44,6 +44,14 @@ libauthsqlite3_la_CPPFLAGS = $(AM_CPPFLAGS) $(SQLITE_CFLAGS)
|
||||
libauthsqlite3_la_LIBADD = \
|
||||
$(SQLITE_LIBS)
|
||||
|
||||
if HAVE_LDAP
|
||||
auth_LTLIBRARIES += libauthldap.la
|
||||
endif
|
||||
|
||||
libauthldap_la_SOURCES = src/libs/msgapi/auth-backends/ldap.c
|
||||
libauthldap_la_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
libauthldap_la_LIBADD = $(LDAP_LIBS)
|
||||
|
||||
src/libs/msgapi/all: libbongomsgapi.la $(auth_LTLIBRARIES)
|
||||
src/libs/msgapi/clean: clean
|
||||
src/libs/msgapi/install:
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#include <stdio.h>
|
||||
#include <config.h>
|
||||
#include <xpl.h>
|
||||
#include <msgapi.h>
|
||||
|
||||
/* returns 0 on success */
|
||||
int
|
||||
AuthLdap_Install(void)
|
||||
{
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
AuthLdap_FindUser(const char *user)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
AuthLdap_VerifyPassword(const char *user, const char *password)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* "Write" functions below */
|
||||
|
||||
int
|
||||
AuthLdap_AddUser(const char *user)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
AuthLdap_SetPassword(const char *user, const char *password)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
AuthLdap_InterfaceVersion(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
printf("This cannot be run directly");
|
||||
return (-1);
|
||||
}
|
||||
Reference in New Issue
Block a user