userdb.c revision b76737b21cb6cc552dbe0798e9e37d86ca40a398
/* Copyright (c) 2002-2016 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "array.h"
#include "ipwd.h"
#include "auth-worker-server.h"
#include "userdb-template.h"
#include "userdb.h"
static const struct userdb_module_interface userdb_iface_deinit = {
.name = "deinit"
};
{
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;
}
}
}
{
return (uid_t)-1;
return uid;
case -1:
i_error("getpwnam() failed: %m");
return (uid_t)-1;
case 0:
"Invalid UID value '%s'", str);
}
return (uid_t)-1;
default:
}
}
{
return (gid_t)-1;
return gid;
case -1:
i_error("getgrnam() failed: %m");
return (gid_t)-1;
case 0:
"Invalid GID value '%s'", str);
}
return (gid_t)-1;
default:
}
}
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;
/* maybe it's a plugin. try to load it. */
}
i_fatal("Support not compiled in for userdb driver '%s'",
}
i_fatal("userdb %s: No args are supported: %s",
}
return userdb;
else
/* make sure any %variables in default_fields exist
in cache_key */
}
return userdb;
}
{
userdb->init_refcount++;
}
{
unsigned int idx;
if (--userdb->init_refcount > 0)
return;
i_unreached();
/* make sure userdb isn't accessed again */
}
{
struct md5_context ctx;
struct userdb_module *const *userdbs;
unsigned int i, count;
for (i = 0; i < count; i++) {
}
}
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;
extern struct userdb_module_interface userdb_dict;
void userdbs_init(void)
{
}
void userdbs_deinit(void)
{
}