userdb-ldap.c revision 9974f4807ef7eafcd56f7b2908d8ecc6d1177317
/* Copyright (C) 2003 Timo Sirainen */
#include "config.h"
#ifdef USERDB_LDAP
#include "common.h"
#include "db-ldap.h"
#include "userdb.h"
#include <ldap.h>
#include <stdlib.h>
/* using posixAccount */
#define DEFAULT_ATTRIBUTES "uid,homeDirectory,,uid,uidNumber,gidNumber"
enum ldap_user_attr {
ATTR_VIRTUAL_USER = 0,
};
struct userdb_ldap_connection {
struct ldap_connection *conn;
unsigned int *attrs;
char **attr_names;
};
struct userdb_ldap_request {
struct ldap_request request;
};
static struct userdb_ldap_connection *userdb_ldap_conn;
{
enum ldap_user_attr i;
for (i = 0; i < ATTR_COUNT; i++) {
break;
}
if (i == ATTR_COUNT) {
return;
}
case ATTR_VIRTUAL_USER:
break;
case ATTR_HOME:
break;
case ATTR_MAIL:
break;
case ATTR_SYSTEM_USER:
break;
case ATTR_UID_NUMBER:
break;
case ATTR_GID_NUMBER:
break;
case ATTR_CHROOT:
break;
case ATTR_COUNT:
break;
}
}
{
struct userdb_ldap_request *urequest =
(struct userdb_ldap_request *) request;
i_error("LDAP: ldap_first_entry failed()");
return;
}
t_push();
}
i_error("LDAP: No username in reply");
else {
i_error("LDAP: Multiple replies found for user %s",
} else {
}
}
t_pop();
}
{
struct userdb_ldap_request *request;
const char *filter;
} else {
}
}
static void userdb_ldap_init(const char *args)
{
struct ldap_connection *conn;
}
static void userdb_ldap_deinit(void)
{
}
struct userdb_module userdb_ldap = {
};
#endif