static void static_verify_plain(struct auth_request *request, const char *password, verify_plain_callback_t *callback) { enum passdb_result result; const char *static_password; const char *static_scheme; int ret; result = static_save_fields(request, &static_password, &static_scheme); if (result != PASSDB_RESULT_OK) { callback(result, request); return; } ret = auth_request_password_verify(request, password, static_password, static_scheme, AUTH_SUBSYS_DB); if (ret <= 0) { callback(PASSDB_RESULT_PASSWORD_MISMATCH, request); return; } callback(PASSDB_RESULT_OK, request); }
static void static_lookup_credentials(struct auth_request *request, lookup_credentials_callback_t *callback) { enum passdb_result result; const char *static_password; result = static_save_fields(request, &static_password); passdb_handle_credentials(result, static_password, STATIC_PASS_SCHEME, callback, request); }