userdb.c revision 9ed2951bd0bb1878a27437d7c00611b2baadd614
/* Copyright (c) 2002-2010 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "array.h"
#include "auth-worker-server.h"
#include "userdb.h"
#include <stdlib.h>
#include <pwd.h>
#include <grp.h>
{
struct userdb_module_interface *const *ifaces;
return iface;
}
return NULL;
}
{
struct userdb_module_interface *old_iface;
/* replacing a "support not compiled in" userdb */
i_panic("userdb_register_module(%s): Already registered",
}
}
{
struct userdb_module_interface *const *ifaces;
unsigned int idx;
return;
}
}
}
{
char *p;
return (uid_t)-1;
if (*p == '\0')
return uid;
}
"Invalid UID value '%s'", str);
}
return (uid_t)-1;
}
}
{
char *p;
return (gid_t)-1;
if (*p == '\0')
return gid;
}
"Invalid GID value '%s'", str);
}
return (gid_t)-1;
}
}
static struct userdb_module *
{
struct userdb_module *const *userdbs;
unsigned int i, count;
for (i = 0; i < count; i++) {
*idx_r = i;
return userdbs[i];
}
}
return NULL;
}
struct userdb_module *
{
static unsigned int auth_userdb_id = 0;
struct userdb_module_interface *iface;
struct userdb_module *userdb;
unsigned int idx;
i_fatal("Support not compiled in for userdb driver '%s'",
driver);
}
return userdb;
else
return userdb;
}
{
userdb->init_refcount++;
}
{
unsigned int idx;
if (--userdb->init_refcount > 0)
return;
i_unreached();
}
extern struct userdb_module_interface userdb_prefetch;
extern struct userdb_module_interface userdb_static;
extern struct userdb_module_interface userdb_passwd;
extern struct userdb_module_interface userdb_passwd_file;
extern struct userdb_module_interface userdb_vpopmail;
extern struct userdb_module_interface userdb_ldap;
extern struct userdb_module_interface userdb_sql;
extern struct userdb_module_interface userdb_nss;
extern struct userdb_module_interface userdb_checkpassword;
void userdbs_init(void)
{
}
void userdbs_deinit(void)
{
}