pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0019-Fix-NULL-pointer-dereference-in-maybe_require_preaut.patch

6ec482
From e3206de9fb0d25691b35568723ad67a60ca01165 Mon Sep 17 00:00:00 2001
6ec482
From: Robbie Harwood <rharwood@redhat.com>
6ec482
Date: Wed, 4 Sep 2019 13:48:14 -0400
6ec482
Subject: [PATCH] Fix NULL pointer dereference in maybe_require_preauth()
6ec482
6ec482
ipadb_get_global_config() is permitted to return NULL.
6ec482
6ec482
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
6ec482
Reviewed-By: Christian Heimes <cheimes@redhat.com>
6ec482
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
6ec482
---
6ec482
 daemons/ipa-kdb/ipa_kdb_principals.c | 2 +-
6ec482
 1 file changed, 1 insertion(+), 1 deletion(-)
6ec482
6ec482
diff --git a/daemons/ipa-kdb/ipa_kdb_principals.c b/daemons/ipa-kdb/ipa_kdb_principals.c
6ec482
index 0fe8e396b9bc011b77b183851389f6c57c70a2c9..259a0d2563f4b9c038b041781b2580fe72d7ed7e 100644
6ec482
--- a/daemons/ipa-kdb/ipa_kdb_principals.c
6ec482
+++ b/daemons/ipa-kdb/ipa_kdb_principals.c
6ec482
@@ -1070,7 +1070,7 @@ static krb5_flags maybe_require_preauth(struct ipadb_context *ipactx,
6ec482
     struct ipadb_e_data *ied;
6ec482
 
6ec482
     config = ipadb_get_global_config(ipactx);
6ec482
-    if (config->disable_preauth_for_spns) {
6ec482
+    if (config && config->disable_preauth_for_spns) {
6ec482
         ied = (struct ipadb_e_data *)entry->e_data;
6ec482
         if (ied && ied->ipa_user != true) {
6ec482
             /* not a user, assume SPN */
6ec482
-- 
6ec482
2.20.1
6ec482