From 7d4a3e365c7ba17bf1732b3c98191fc3a4462b01 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 24 Aug 1997 10:40:08 +0000 Subject: [PATCH] (krb5_get_init_creds_password): If KDC_ERR_PREUATH_REQUIRED, add preauthentication and try again. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3119 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/init_creds_pw.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/krb5/init_creds_pw.c b/lib/krb5/init_creds_pw.c index 2cfeacd6a..12837eb8b 100644 --- a/lib/krb5/init_creds_pw.c +++ b/lib/krb5/init_creds_pw.c @@ -447,6 +447,15 @@ krb5_get_init_creds_password(krb5_context context, goto out; password = buf; break; + case KRB5KDC_ERR_PREAUTH_REQUIRED : + if (pre_auth_types) + free (pre_auth_types); + pre_auth_types = malloc(2 * sizeof(*pre_auth_types)); + if (pre_auth_types == NULL) + goto out; + pre_auth_types[0] = KRB5_PADATA_ENC_TIMESTAMP; + pre_auth_types[1] = 0; + break; default: goto out; }