Fix NULL pointer dereference in maybe_require_preauth()

ipadb_get_global_config() is permitted to return NULL.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Robbie Harwood
2019-09-04 13:48:14 -04:00
committed by Rob Crittenden
parent 9414b038e7
commit 45b4f5377b

View File

@@ -1057,7 +1057,7 @@ static krb5_flags maybe_require_preauth(struct ipadb_context *ipactx,
struct ipadb_e_data *ied;
config = ipadb_get_global_config(ipactx);
if (config->disable_preauth_for_spns) {
if (config && config->disable_preauth_for_spns) {
ied = (struct ipadb_e_data *)entry->e_data;
if (ied && ied->ipa_user != true) {
/* not a user, assume SPN */