mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-kdb: Free talloc autofree context when module is closed
Currently kdb5kdc crashes on exit if the ipadb KDB modules is loaded and trusts are configured. The reason is the talloc autofree context which get initialised during the ndr_push_union_blob() call. On exit the KDC module is unloaded an later on atexit() tries to free the context, but all related symbols are already unloaded with the module. This patch frees the talloc autofree context during the cleanup routine of the module. Since this is called only at exit and not during normal operations this is safe even if other KDC plugins use the talloc autofree context, e.g. via some Samba libraries, as well. Fixes https://fedorahosted.org/freeipa/ticket/3410
This commit is contained in:
parent
dfad4396ff
commit
3f8778890e
@ -20,6 +20,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
#include "ipa_kdb.h"
|
||||
|
||||
struct ipadb_context *ipadb_get_context(krb5_context kcontext)
|
||||
@ -456,6 +458,7 @@ static krb5_error_code ipadb_fini_module(krb5_context kcontext)
|
||||
|
||||
ipactx = ipadb_get_context(kcontext);
|
||||
ipadb_context_free(kcontext, &ipactx);
|
||||
talloc_free(talloc_autofree_context());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user