if (!client_does_custom_io(client))
io_remove(&client->io);
- /* This has to happen before * handling, otherwise
- client can abort failed request. */
- if (client->final_response) {
- sasl_server_auth_delayed_final(client);
+ if (sasl_server_auth_handle_delayed_final(client))
return;
- }
if (strcmp(response, "*") == 0) {
sasl_server_auth_abort(client);
return;
SASL_SERVER_REPLY_AUTH_ABORTED);
}
-void sasl_server_auth_delayed_final(struct client *client)
+bool sasl_server_auth_handle_delayed_final(struct client *client)
{
+ /* This has to happen before * handling, otherwise
+ client can abort failed request. */
+ if (!client->final_response)
+ return FALSE;
client->final_response = FALSE;
client->authenticating = FALSE;
client->auth_client_continue_pending = FALSE;
call_client_callback(client, client->delayed_final_reply,
NULL, client->final_args);
+
+ return TRUE;
}
enum sasl_server_auth_flags flags,
const char *initial_resp_base64,
sasl_server_callback_t *callback);
-void sasl_server_auth_delayed_final(struct client *client);
void sasl_server_auth_failed(struct client *client, const char *reason,
const char *code) ATTR_NULL(3);
/* Called when client asks for SASL authentication to be aborted by sending
"*" line. */
void sasl_server_auth_abort(struct client *client);
+bool sasl_server_auth_handle_delayed_final(struct client *client);
+
#endif