|
|
963210 |
From a609a605d87b3107de64141cd3d60c2a73c7b38f Mon Sep 17 00:00:00 2001
|
|
|
963210 |
From: Robbie Harwood <rharwood@redhat.com>
|
|
|
963210 |
Date: Fri, 22 Apr 2016 09:59:22 -0400
|
|
|
963210 |
Subject: [PATCH] krb5-1.12-api.patch
|
|
|
963210 |
|
|
|
963210 |
---
|
|
|
963210 |
src/lib/krb5/krb/princ_comp.c | 7 +++++++
|
|
|
963210 |
1 file changed, 7 insertions(+)
|
|
|
963210 |
|
|
|
963210 |
diff --git a/src/lib/krb5/krb/princ_comp.c b/src/lib/krb5/krb/princ_comp.c
|
|
|
963210 |
index a6936107d..0ed78833b 100644
|
|
|
963210 |
--- a/src/lib/krb5/krb/princ_comp.c
|
|
|
963210 |
+++ b/src/lib/krb5/krb/princ_comp.c
|
|
|
963210 |
@@ -36,6 +36,10 @@ realm_compare_flags(krb5_context context,
|
|
|
963210 |
const krb5_data *realm1 = &princ1->realm;
|
|
|
963210 |
const krb5_data *realm2 = &princ2->realm;
|
|
|
963210 |
|
|
|
963210 |
+ if (princ1 == NULL || princ2 == NULL)
|
|
|
963210 |
+ return FALSE;
|
|
|
963210 |
+ if (realm1 == NULL || realm2 == NULL)
|
|
|
963210 |
+ return FALSE;
|
|
|
963210 |
if (realm1->length != realm2->length)
|
|
|
963210 |
return FALSE;
|
|
|
963210 |
if (realm1->length == 0)
|
|
|
963210 |
@@ -88,6 +92,9 @@ krb5_principal_compare_flags(krb5_context context,
|
|
|
963210 |
krb5_principal upn2 = NULL;
|
|
|
963210 |
krb5_boolean ret = FALSE;
|
|
|
963210 |
|
|
|
963210 |
+ if (princ1 == NULL || princ2 == NULL)
|
|
|
963210 |
+ return FALSE;
|
|
|
963210 |
+
|
|
|
963210 |
if (flags & KRB5_PRINCIPAL_COMPARE_ENTERPRISE) {
|
|
|
963210 |
/* Treat UPNs as if they were real principals */
|
|
|
963210 |
if (princ1->type == KRB5_NT_ENTERPRISE_PRINCIPAL) {
|