From 19719003af110c6ed664970cddb353d60805ba91 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet@samba.org>
Date: Thu, 30 Sep 2021 14:55:06 +1300
Subject: [PATCH] CVE-2020-25718 kdc: Remove unused samba_kdc_get_pac_blob()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14558

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
---
 source4/kdc/pac-glue.c | 21 ---------------------
 source4/kdc/pac-glue.h |  3 ---
 2 files changed, 24 deletions(-)

diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index 2aa3d6c..32a9228 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -956,27 +956,6 @@ NTSTATUS samba_kdc_get_pac_blobs(TALLOC_CTX *mem_ctx,
 	return NT_STATUS_OK;
 }
 
-NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
-				struct samba_kdc_entry *p,
-				DATA_BLOB **_logon_info_blob)
-{
-	NTSTATUS nt_status;
-	DATA_BLOB *upn_blob = NULL;
-
-	nt_status = samba_kdc_get_pac_blobs(mem_ctx, p,
-					    _logon_info_blob,
-					    NULL, /* cred_blob */
-					    &upn_blob,
-					    NULL,
-					    NULL);
-	if (!NT_STATUS_IS_OK(nt_status)) {
-		return nt_status;
-	}
-
-	TALLOC_FREE(upn_blob);
-	return NT_STATUS_OK;
-}
-
 NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
 				   krb5_context context,
 				   struct ldb_context *samdb,
diff --git a/source4/kdc/pac-glue.h b/source4/kdc/pac-glue.h
index 9288924..3f4f470 100644
--- a/source4/kdc/pac-glue.h
+++ b/source4/kdc/pac-glue.h
@@ -56,9 +56,6 @@ NTSTATUS samba_kdc_get_pac_blobs(TALLOC_CTX *mem_ctx,
 				 const krb5_boolean *pac_request,
 				 DATA_BLOB **_requester_sid_blob,
 				 struct auth_user_info_dc **_user_info_dc);
-NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
-				struct samba_kdc_entry *skdc_entry,
-				DATA_BLOB **_logon_info_blob);
 
 NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
 				   krb5_context context,
-- 
2.27.0

