From d6f7c0b14c7211b603b47e8fe3851ba0197ed38c Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 6 Jan 2026 14:44:50 -0500 Subject: [PATCH] ipa-pwd-extop: Don't manipulate the config if not retrieved There is a non-zero chance that the Kerberos configuration can't be retrieved. If this fails it should report an error which will likely fail the operation but otherwise allow the server to remain running. A flag was added to not allow the Master key to be returned but since this manipulates *config and that is NULL...SEGV. Add a goto to skip that block in the case of failure. Credit to Viktor Ashirov for identifying the fix. All I did was write up the patch. Fixes: https://pagure.io/freeipa/issue/9914 Signed-off-by: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c index 7179b1dc3..0e69f3410 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/common.c @@ -585,6 +585,7 @@ int ipapwd_gen_checks(Slapi_PBlock *pb, char **errMesg, LOG_FATAL("Error Retrieving Master Key\n"); *errMesg = "Fatal Internal Error"; rc = LDAP_OPERATIONS_ERROR; + goto done; } /* do not return the master key if asked */