else if (strcmp(key, "successful") == 0)
auth_request_set_auth_successful(request);
else if (strcmp(key, "skip-password-check") == 0)
- fields->skip_password_check = TRUE;
+ auth_request_set_password_verified(request);
else if (strcmp(key, "delayed-credentials") == 0) {
/* just make passdb_handle_credentials() work identically in
auth-worker as it does in auth-master. the worker shouldn't
{
request->fields.successful = TRUE;
}
+
+void auth_request_set_password_verified(struct auth_request *request)
+{
+ request->fields.skip_password_check = TRUE;
+}
if (*result == PASSDB_RESULT_OK) {
/* password was successfully verified. don't bother
checking it again. */
- request->fields.skip_password_check = TRUE;
+ auth_request_set_password_verified(request);
}
break;
case AUTH_DB_RULE_CONTINUE_OK:
request->passdb_success = TRUE;
/* password was successfully verified. don't bother
checking it again. */
- request->fields.skip_password_check = TRUE;
+ auth_request_set_password_verified(request);
break;
case AUTH_DB_RULE_CONTINUE_FAIL:
passdb_continue = TRUE;
and such. There may still be some final delay or final SASL
response. */
bool successful:1;
+ /* Password was verified successfully by a passdb. The following
+ passdbs shouldn't attempt to verify the password again. Note that
+ this differs from passdb_success, which may be set to FALSE due to
+ the result_* rules. */
bool skip_password_check:1;
/* flags received from auth client: */
void auth_request_set_realm(struct auth_request *request, const char *realm);
/* Request was fully successfully authenticated, including policy checks etc. */
void auth_request_set_auth_successful(struct auth_request *request);
+/* Password was successfully verified by a passdb. */
+void auth_request_set_password_verified(struct auth_request *request);
void auth_request_set_field(struct auth_request *request,
const char *name, const char *value,