userdb-ldap.c revision b34e5d8ab8e3bd06e63763f340f04cb935a1f20d
/* Copyright (C) 2003 Timo Sirainen */
#include "common.h"
#ifdef USERDB_LDAP
#include "hash.h"
#include "str.h"
#include "var-expand.h"
#include "auth-cache.h"
#include "db-ldap.h"
#include "userdb.h"
#include <ldap.h>
#include <stdlib.h>
struct ldap_userdb_module {
struct userdb_module module;
struct ldap_connection *conn;
};
struct userdb_ldap_request {
struct ldap_request request;
struct auth_request *auth_request;
};
static const char *default_attr_map[] = {
};
struct auth_stream_reply *reply,
{
return FALSE;
}
return TRUE;
}
struct auth_stream_reply *reply,
{
return FALSE;
}
return TRUE;
}
static struct auth_stream_reply *
struct auth_request *auth_request)
{
struct auth_stream_reply *reply;
const char *name;
unsigned int i;
return NULL;
return NULL;
} else if (*name != '\0') {
vals[i]);
}
}
}
}
if (!seen_uid) {
"uid not in user_attrs and no default given in "
"user_global_uid");
return NULL;
}
}
if (!seen_gid) {
"gid not in user_attrs and no default given in "
"user_global_gid");
return NULL;
}
}
return reply;
}
{
struct userdb_ldap_request *urequest =
(struct userdb_ldap_request *) request;
int ret;
if (ret != LDAP_SUCCESS) {
return;
}
}
"Unknown user");
}
} else {
else {
"Multiple replies found for user");
}
}
}
{
struct ldap_userdb_module *module =
(struct ldap_userdb_module *)_module;
const struct var_expand_table *vars;
struct userdb_ldap_request *request;
str_truncate(str, 0);
"base=%s scope=%s filter=%s fields=%s",
}
static struct userdb_module *
{
struct ldap_userdb_module *module;
struct ldap_connection *conn;
}
const char *args __attr_unused__)
{
struct ldap_userdb_module *module =
(struct ldap_userdb_module *)_module;
}
{
struct ldap_userdb_module *module =
(struct ldap_userdb_module *)_module;
}
struct userdb_module_interface userdb_ldap = {
"ldap",
};
#endif