25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen ((pass)[0] != '\0' && (pass)[0] != '*' && (pass)[0] != '!')
7d6389e4053c2dac1fb37180b5756b00785983dcTimo Sirainentypedef void verify_plain_callback_t(enum passdb_result result,
f968e62caa52a8924bd05ebf76ff515b5c18e17bTimo Sirainentypedef void lookup_credentials_callback_t(enum passdb_result result,
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen const unsigned char *credentials,
484e12acec34f16e5a8adc001e23ae48f1dda8c7Timo Sirainentypedef void set_credentials_callback_t(bool success,
849969f639a00eab26791db3cb1b66430420c0cdTimo Sirainen struct passdb_module *(*preinit)(pool_t pool, const char *args);
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen /* Check if plaintext password matches */
7d6389e4053c2dac1fb37180b5756b00785983dcTimo Sirainen void (*verify_plain)(struct auth_request *request, const char *password,
a3dd97fb6d92a89c3de0597fed2d4b044c7aeb84Timo Sirainen /* Return authentication credentials, set in
a3dd97fb6d92a89c3de0597fed2d4b044c7aeb84Timo Sirainen auth_request->credentials. */
7d6389e4053c2dac1fb37180b5756b00785983dcTimo Sirainen void (*lookup_credentials)(struct auth_request *request,
35136dd2baf8dc30e4e754294ed81ff48e8c1e64Timo Sirainen /* Update credentials */
adea1e1e46ccb4ae107767fd930e3d1fb4f1d11dTimo Sirainen void (*set_credentials)(struct auth_request *request,
74674a53a72dab535c61f455b2246ef2797844eaTimo Sirainen /* The default caching key for this module, or NULL if caching isn't
74674a53a72dab535c61f455b2246ef2797844eaTimo Sirainen wanted. This is updated by settings in auth_passdb. */
25ee72451d16374ed27fdbf829f4ec756c778352Timo Sirainen /* Default password scheme for this module.
1ae87afde32c1ac73909dfacfd59641b470a3e93Martti Rannanjärvi If default_cache_key is set, must not be NULL. */
10f6f2224c897fc543973efd2f46b86a3ab1148dAki Tuomi /* Supported authentication mechanisms, NULL is all, [NULL] is none*/
268a76700330d159c805c70d1e3eae2e21f1cb9eAki Tuomi /* Username filter, NULL is no filter */
25ee72451d16374ed27fdbf829f4ec756c778352Timo Sirainen /* If blocking is set to TRUE, use child processes to access
25ee72451d16374ed27fdbf829f4ec756c778352Timo Sirainen this passdb. */
3cf67672fdc87583cb23ce088c95bb5dee60e74dTimo Sirainen /* id is used by blocking passdb to identify the passdb */
9ed2951bd0bb1878a27437d7c00611b2baadd614Timo Sirainen /* number of time init() has been called */
2d8f66596f445dd8b399b7032c3f0e9202015b63Timo Sirainen /* WARNING: avoid adding anything here that isn't based on args.
2d8f66596f445dd8b399b7032c3f0e9202015b63Timo Sirainen if you do, you need to change passdb.c:passdb_find() also to avoid
2d8f66596f445dd8b399b7032c3f0e9202015b63Timo Sirainen accidentally merging wrong passdbs. */
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen/* Try to get credentials in wanted scheme (request->credentials_scheme) from
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen given input. Returns FALSE if this wasn't possible (unknown scheme,
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen conversion not possible or invalid credentials).
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen If wanted scheme is "", the credentials are returned as-is without any
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen checks. This is useful mostly just to see if there exist any credentials
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainenbool passdb_get_credentials(struct auth_request *auth_request,
b44650b0f48a4b5f0dc240ed836833a00b643b9fTimo Sirainen const unsigned char **credentials_r,
f968e62caa52a8924bd05ebf76ff515b5c18e17bTimo Sirainenvoid passdb_handle_credentials(enum passdb_result result,
04052d7cacaa866a3f00afb4e104fa46c04c1dd7Timo Sirainenpassdb_preinit(pool_t pool, const struct auth_passdb_settings *set);
f3d506e525a720f214020ca0f989a1966b30edaeTimo Sirainenvoid passdb_init(struct passdb_module *passdb);
849969f639a00eab26791db3cb1b66430420c0cdTimo Sirainenvoid passdb_deinit(struct passdb_module *passdb);
43a66a0b16299bd4f7615acd85e98bd3832c54d5Timo Sirainenvoid passdb_register_module(struct passdb_module_interface *iface);
43a66a0b16299bd4f7615acd85e98bd3832c54d5Timo Sirainenvoid passdb_unregister_module(struct passdb_module_interface *iface);