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 <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Rob Crittenden authored and Florence Blanc-Renaud committed 2026-01-09 17:47:36 +01:00
1 parent 6ddd9d978a
commit d6f7c0b14c
1 file changed
+1
@@ -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 */