Mercurial > dovecot > core-2.2
changeset 19589:0a913308fdf2
auth: If passdbs are required, don't allow only master=yes passdbs.
This fixes a crash:
Panic: file auth-request.c: line 743 (auth_request_is_disabled_master_user):
assertion failed: (request->requested_login_user != NULL)
Which would happen because request->passdb=NULL because there are only
master passdbs. Even if only master passdb is actually needed, there should
still be a non-master passdb for non-master logins to specify what happens
to them.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 18 Jan 2016 17:38:22 +0200 |
parents | 3ad2efd7e247 |
children | 791a8c6f4770 |
files | src/auth/auth.c |
diffstat | 1 files changed, 0 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth.c Mon Jan 18 17:08:04 2016 +0200 +++ b/src/auth/auth.c Mon Jan 18 17:38:22 2016 +0200 @@ -114,10 +114,6 @@ { const struct auth_passdb *passdb; - for (passdb = auth->masterdbs; passdb != NULL; passdb = passdb->next) { - if (passdb->passdb->iface.verify_plain != NULL) - return TRUE; - } for (passdb = auth->passdbs; passdb != NULL; passdb = passdb->next) { if (passdb->passdb->iface.verify_plain != NULL) return TRUE; @@ -129,10 +125,6 @@ { const struct auth_passdb *passdb; - for (passdb = auth->masterdbs; passdb != NULL; passdb = passdb->next) { - if (passdb->passdb->iface.lookup_credentials != NULL) - return TRUE; - } for (passdb = auth->passdbs; passdb != NULL; passdb = passdb->next) { if (passdb->passdb->iface.lookup_credentials != NULL) return TRUE;