Mercurial > dovecot > core-2.2
diff src/auth/auth-request-handler.c @ 20420:5b48cdd7b54c
auth-policy: Hook auth policy to auth code
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Fri, 03 Jun 2016 21:35:48 +0300 |
parents | 1b966650aef9 |
children | 3a12f30c03d5 |
line wrap: on
line diff
--- a/src/auth/auth-request-handler.c Fri Jun 03 20:21:42 2016 +0300 +++ b/src/auth/auth-request-handler.c Fri Jun 03 21:35:48 2016 +0300 @@ -16,7 +16,7 @@ #include "auth-token.h" #include "auth-master-connection.h" #include "auth-request-handler.h" - +#include "policy.h" #define AUTH_FAILURE_DELAY_CHECK_MSECS 500 @@ -215,6 +215,8 @@ auth_request_ref(request); auth_request_handler_remove(handler, request); + auth_policy_report(request); + if (auth_fields_exists(request->extra_fields, "nodelay")) { /* passdb specifically requested not to delay the reply. */ handler->callback(reply, handler->conn); @@ -267,6 +269,9 @@ process to pick it up. delete it */ auth_request_handler_remove(handler, request); } + + auth_policy_report(request); + handler->callback(str_c(str), handler->conn); }