bb0ded
From 669f3d71161741c676ddd6a08bd08d4a4ccd495b Mon Sep 17 00:00:00 2001
bb0ded
From: Alexander Bokovoy <abokovoy@redhat.com>
bb0ded
Date: Fri, 26 Nov 2021 17:40:54 +0200
bb0ded
Subject: [PATCH] ipa-kdb: issue PAC_REQUESTER_SID only for TGTs
bb0ded
bb0ded
MS-KILE 3.3.5.6.4.8 in revision after Windows Server November 2021
bb0ded
security fixes added the following requirement:
bb0ded
bb0ded
- PAC_REQUESTER_SID is only added in TGT case (including referrals and
bb0ded
  tickets to RODCs)
bb0ded
bb0ded
Fixes: https://pagure.io/freeipa/issue/9031
bb0ded
bb0ded
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
bb0ded
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
bb0ded
---
bb0ded
 daemons/ipa-kdb/ipa_kdb_mspac.c | 3 ++-
bb0ded
 1 file changed, 2 insertions(+), 1 deletion(-)
bb0ded
bb0ded
diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c
bb0ded
index 6f7d1ac15daf17dfca36ebd3265c866725d24717..538cfbba958068bd2ee0aaae7a2743ae82237898 100644
bb0ded
--- a/daemons/ipa-kdb/ipa_kdb_mspac.c
bb0ded
+++ b/daemons/ipa-kdb/ipa_kdb_mspac.c
bb0ded
@@ -1148,7 +1148,8 @@ static krb5_error_code ipadb_get_pac(krb5_context kcontext,
bb0ded
 #endif
bb0ded
 
bb0ded
 #ifdef HAVE_PAC_REQUESTER_SID
bb0ded
-    {
bb0ded
+    /* MS-KILE 3.3.5.6.4.8: add PAC_REQUESTER_SID only in TGT case */
bb0ded
+    if ((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) != 0) {
bb0ded
         union PAC_INFO pac_requester_sid;
bb0ded
         /* == Package PAC_REQUESTER_SID == */
bb0ded
         memset(&pac_requester_sid, 0, sizeof(pac_requester_sid));
bb0ded
-- 
bb0ded
2.31.1
bb0ded