userdb-ldap.c revision c067f92edf6bc5bba2b3b6216a9b3525cd173eae
/* Copyright (C) 2003 Timo Sirainen */
#include "config.h"
#ifdef USERDB_LDAP
#include "common.h"
#include "str.h"
#include "var-expand.h"
#include "db-ldap.h"
#include "userdb.h"
#include <ldap.h>
#include <stdlib.h>
/* using posixAccount */
#define DEFAULT_ATTRIBUTES "uid,homeDirectory,,,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_COUNT:
break;
}
}
{
struct userdb_ldap_request *urequest =
(struct userdb_ldap_request *) request;
int ret;
if (ret != LDAP_SUCCESS) {
i_error("LDAP: ldap_search() failed: %s",
return;
}
i_error("LDAP: Authenticated user not found");
return;
}
t_push();
}
i_error("LDAP: No username in reply");
i_error("ldap(%s): uidNumber not set and no default given in "
i_error("ldap(%s): gidNumber not set and no default given in "
i_error("ldap(%s): Multiple replies found for user",
} else {
t_pop();
return;
}
/* error */
t_pop();
}
void *context)
{
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