Blame SOURCES/Omit-KDC-indicator-check-for-S4U2Self-requests.patch

287c72
From f7b6d43533d1d9ec3960e3d7f375995896768aef Mon Sep 17 00:00:00 2001
31ace6
From: Greg Hudson <ghudson@mit.edu>
31ace6
Date: Wed, 6 May 2020 16:03:13 -0400
31ace6
Subject: [PATCH] Omit KDC indicator check for S4U2Self requests
31ace6
31ace6
As there was no initial ticket exchange from the client for an
31ace6
S4U2Self request, the auth indicator check is inapplicable (and would
31ace6
always fail if any auth indicators are required).
31ace6
31ace6
ticket: 8902 (new)
31ace6
(cherry picked from commit 183631fbf72351c2d5fc7d60b2d9fc4d09fe7465)
31ace6
(cherry picked from commit 442f1fa5b2e4034954a51048414cc0863b914379)
31ace6
---
31ace6
 src/kdc/do_tgs_req.c | 14 +++++++-------
31ace6
 1 file changed, 7 insertions(+), 7 deletions(-)
31ace6
31ace6
diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c
31ace6
index 241f34e2a..463a9c0dd 100644
31ace6
--- a/src/kdc/do_tgs_req.c
31ace6
+++ b/src/kdc/do_tgs_req.c
31ace6
@@ -392,8 +392,8 @@ process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
31ace6
     }
31ace6
     authtime = subject_tkt->times.authtime;
31ace6
 
31ace6
-    /* Extract auth indicators from the subject ticket, except for S4U2Self
31ace6
-     * requests (where the client didn't authenticate). */
31ace6
+    /* Extract and check auth indicators from the subject ticket, except for
31ace6
+     * S4U2Self requests (where the client didn't authenticate). */
31ace6
     if (s4u_x509_user == NULL) {
31ace6
         errcode = get_auth_indicators(kdc_context, subject_tkt, local_tgt,
31ace6
                                       &local_tgt_key, &auth_indicators);
31ace6
@@ -401,12 +401,12 @@ process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
31ace6
             status = "GET_AUTH_INDICATORS";
31ace6
             goto cleanup;
31ace6
         }
31ace6
-    }
31ace6
 
31ace6
-    errcode = check_indicators(kdc_context, server, auth_indicators);
31ace6
-    if (errcode) {
31ace6
-        status = "HIGHER_AUTHENTICATION_REQUIRED";
31ace6
-        goto cleanup;
31ace6
+        errcode = check_indicators(kdc_context, server, auth_indicators);
31ace6
+        if (errcode) {
31ace6
+            status = "HIGHER_AUTHENTICATION_REQUIRED";
31ace6
+            goto cleanup;
31ace6
+        }
31ace6
     }
31ace6
 
31ace6
     if (is_referral)