From 21ec6f257b6c8142382bb2fc942702e9ac06cb48 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Tue, 13 May 2003 21:53:59 +0000 Subject: [PATCH] Try forwarding with no enctype restriction if forwarding with an enctype restriction fails. This is sufficient for 1.3. Ticket: 1473 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15431 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 3 +++ src/lib/krb5/krb/fwd_tgt.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index acce4eadb..14026dc28 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,5 +1,8 @@ 2003-05-13 Sam Hartman + * fwd_tgt.c (krb5_fwd_tgt_creds): Try with no specified enctype if + forwarding a specific enctype fails. l + * get_in_tkt.c (krb5_get_init_creds): Free s2kparams * preauth2.c (krb5_do_preauth): Fix memory management diff --git a/src/lib/krb5/krb/fwd_tgt.c b/src/lib/krb5/krb/fwd_tgt.c index aa42f8cc1..844536bbd 100644 --- a/src/lib/krb5/krb/fwd_tgt.c +++ b/src/lib/krb5/krb/fwd_tgt.c @@ -161,9 +161,15 @@ retval = KRB5_FWD_BAD_PRINCIPAL; kdcoptions &= ~(KDC_OPT_FORWARDABLE); if ((retval = krb5_get_cred_via_tkt(context, &tgt, kdcoptions, - addrs, &creds, &pcreds))) - goto errout; - + addrs, &creds, &pcreds))) { + if (enctype) { + creds.keyblock.enctype = 0; + if ((retval = krb5_get_cred_via_tkt(context, &tgt, kdcoptions, + addrs, &creds, &pcreds))) + goto errout; + } + else goto errout; + } retval = krb5_mk_1cred(context, auth_context, pcreds, &scratch, &replaydata); krb5_free_creds(context, pcreds); -- 2.26.2