userdb.h revision 2d8f66596f445dd8b399b7032c3f0e9202015b63
#ifndef USERDB_H
#define USERDB_H
#include "md5.h"
#include "auth-fields.h"
struct auth;
struct auth_request;
struct auth_userdb_settings;
enum userdb_result {
USERDB_RESULT_OK = 1
};
struct auth_request *request);
/* user=NULL when there are no more users */
struct userdb_module {
const char *args;
/* The default caching key for this module, or NULL if caching isn't
wanted. This is updated by settings in auth_userdb. */
const char *default_cache_key;
/* If blocking is set to TRUE, use child processes to access
this userdb. */
bool blocking;
/* id is used by blocking userdb to identify the userdb */
unsigned int id;
/* number of time init() has been called */
int init_refcount;
/* WARNING: avoid adding anything here that isn't based on args.
if you do, you need to change userdb.c:userdb_find() also to avoid
accidentally merging wrong userdbs. */
const struct userdb_module_interface *iface;
};
struct userdb_iterate_context {
struct auth_request *auth_request;
void *context;
bool failed;
};
struct userdb_module_interface {
const char *name;
struct userdb_iterate_context *
void *context);
};
ATTR_NULL(1);
ATTR_NULL(1);
struct userdb_module *
void userdbs_init(void);
void userdbs_deinit(void);
#include "auth-request.h"
#endif