1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

winbind: Fix 100% loop

Thanks to "L.P.H. van Belle" <belle@bazuin.nl>
for help in reproducing the issue.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11038

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 28 22:03:31 CEST 2015 on sn-devel-104
This commit is contained in:
Volker Lendecke 2015-08-28 12:33:13 +02:00 committed by Jeremy Allison
parent 16c14aef2a
commit e551cdb37d

View File

@ -48,6 +48,22 @@ kerb_prompter(krb5_context ctx, void *data,
{
if (num_prompts == 0) return 0;
if ((num_prompts == 2) &&
(prompts[0].type == KRB5_PROMPT_TYPE_NEW_PASSWORD) &&
(prompts[1].type == KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN)) {
/*
* We don't want to change passwords here. We're
* called from heimal when the KDC returns
* KRB5KDC_ERR_KEY_EXPIRED, but at this point we don't
* have the chance to ask the user for a new
* password. If we return 0 (i.e. success), we will be
* spinning in the endless for-loop in
* change_password() in
* source4/heimdal/lib/krb5/init_creds_pw.c:526ff
*/
return KRB5KDC_ERR_KEY_EXPIRED;
}
memset(prompts[0].reply->data, '\0', prompts[0].reply->length);
if (prompts[0].reply->length > 0) {
if (data) {