krb5 commit: Interop with Heimdal KDC for S4U2Self requests

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/8e80ddbfdb479800c8e6ef7b287d400476578f8a
commit 8e80ddbfdb479800c8e6ef7b287d400476578f8a
Author: Isaac Boukris <[email protected]>
Date:   Wed Jun 10 01:32:56 2020 +0300

    Interop with Heimdal KDC for S4U2Self requests
    
    [MS-SFU] 3.1.5.1.1.1 says the KDC SHOULD send PA_S4U_X509_USER pa-data
    if the TGT session key is of a newer enctype.  Our S4U2Self client
    code has enforced this clause as if it were a MUST.  For consistency
    with Microsoft and interoperability with Heimdal (which does not
    implement PA_S4U_X509_USER), stop enforcing this constraint.
    
    [[email protected]: compressed code slightly; wrote commit message]
    
    ticket: 8919 (new)

 src/lib/krb5/krb/s4u_creds.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/lib/krb5/krb/s4u_creds.c b/src/lib/krb5/krb/s4u_creds.c
index 1f0ab85..5c2b6ff 100644
--- a/src/lib/krb5/krb/s4u_creds.c
+++ b/src/lib/krb5/krb/s4u_creds.c
@@ -302,16 +302,11 @@ verify_s4u2self_reply(krb5_context context,
                                           enc_padata,
                                           KRB5_PADATA_S4U_X509_USER);
 
-    /* XXX this will break newer enctypes with a MIT 1.7 KDC */
     rep_s4u_padata = krb5int_find_pa_data(context,
                                           rep_padata,
                                           KRB5_PADATA_S4U_X509_USER);
-    if (rep_s4u_padata == NULL) {
-        if (not_newer == FALSE || enc_s4u_padata != NULL)
-            return KRB5_KDCREP_MODIFIED;
-        else
-            return 0;
-    }
+    if (rep_s4u_padata == NULL)
+        return (enc_s4u_padata != NULL) ? KRB5_KDCREP_MODIFIED : 0;
 
     data.length = rep_s4u_padata->length;
     data.data = (char *)rep_s4u_padata->contents;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.