From: Aki Tuomi Date: Wed, 29 Jun 2016 11:12:29 +0000 (+0300) Subject: auth-policy: Do not allow/report when master query X-Git-Tag: 2.3.0.rc1~3408 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d35bb9e2d725d1ceb747dfc6487c1b89480c7e4e;p=thirdparty%2Fdovecot%2Fcore.git auth-policy: Do not allow/report when master query This way auth policy isn't consulted when e.g. doveadm is used. --- diff --git a/src/auth/policy.c b/src/auth/policy.c index 32820f18a4..6d9fbf151f 100755 --- a/src/auth/policy.c +++ b/src/auth/policy.c @@ -495,7 +495,7 @@ void auth_policy_url(struct policy_lookup_ctx *context, const char *command) void auth_policy_check(struct auth_request *request, const char *password, auth_policy_callback_t cb, void *context) { - if (*(request->set->policy_server_url) == '\0') { + if (request->master != NULL || *(request->set->policy_server_url) == '\0') { cb(0, context); return; } @@ -518,6 +518,9 @@ void auth_policy_check(struct auth_request *request, const char *password, void auth_policy_report(struct auth_request *request) { + if (request->master != NULL) + return; + if (*(request->set->policy_server_url) == '\0') return; pool_t pool = pool_alloconly_create("auth policy", 128);