userdb.h revision e9371f899a3d4207a0ffd3923ea5ec7250cf5e75
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainentypedef void userdb_callback_t(enum userdb_result result,
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen/* user=NULL when there are no more users */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainentypedef void userdb_iter_callback_t(const char *user, void *context);
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* The caching key for this module, or NULL if caching isn't wanted. */
f6d57a2c182f63cd52819f0abb3c3d9f828afe19Timo Sirainen /* If blocking is set to TRUE, use child processes to access
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen this userdb. */
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen /* id is used by blocking userdb to identify the userdb */
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen unsigned int id;
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen /* number of time init() has been called */
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen struct userdb_module *(*preinit)(pool_t pool, const char *args);
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen void (*lookup)(struct auth_request *auth_request,
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen (*iterate_init)(struct auth_request *auth_request,
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainen void (*iterate_next)(struct userdb_iterate_context *ctx);
cd83124e5d070a016c590bb0b1096d7828c7b6adTimo Sirainen int (*iterate_deinit)(struct userdb_iterate_context *ctx);
cd83124e5d070a016c590bb0b1096d7828c7b6adTimo Sirainenuid_t userdb_parse_uid(struct auth_request *request, const char *str);
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainengid_t userdb_parse_gid(struct auth_request *request, const char *str);
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainenuserdb_preinit(pool_t pool, const struct auth_userdb_settings *set);
cd83124e5d070a016c590bb0b1096d7828c7b6adTimo Sirainenvoid userdb_init(struct userdb_module *userdb);
cbc61fcb33b370d049c16a3c44568b4deb4e2b33Timo Sirainenvoid userdb_deinit(struct userdb_module *userdb);
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainenvoid userdb_register_module(struct userdb_module_interface *iface);
cf7164ece50797a67fc4bfb5889022ac93a36a8aTimo Sirainenvoid userdb_unregister_module(struct userdb_module_interface *iface);
73b50eecfc31750a312e2f940023f522eb07178cTimo Sirainenvoid userdbs_generate_md5(unsigned char md5[MD5_RESULTLEN]);