summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb/ipa_kdb.h
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2017-01-24 11:02:30 +0200
committerMartin Basti <mbasti@redhat.com>2017-02-15 14:24:05 +0100
commit593ea7da9a732647052cb56c08ad367e40be3912 (patch)
tree538e07f130c78bbf29f37f02cf388a1b44f842d8 /daemons/ipa-kdb/ipa_kdb.h
parent5bd82174233095a3cccfbbf8524622440c31b10c (diff)
downloadfreeipa-593ea7da9a732647052cb56c08ad367e40be3912.tar.gz
freeipa-593ea7da9a732647052cb56c08ad367e40be3912.tar.xz
freeipa-593ea7da9a732647052cb56c08ad367e40be3912.zip
ipa-kdb: support KDB DAL version 6.1
DAL version 6.0 removed support for a callback to free principal. This broke KDB drivers which had complex e_data structure within the principal structure. As result, FreeIPA KDB driver was leaking memory with DAL version 6.0 (krb5 1.15). DAL version 6.1 added a special callback for freeing e_data structure. See details at krb5/krb5#596 Restructure KDB driver code to provide this callback in case we are built against DAL version that supports it. For DAL version prior to 6.0 use this callback in the free_principal callback to tidy the code. Use explicit KDB version dependency in Fedora 26+ via BuildRequires. With new DAL version, freeipa package will fail to build and we'll have to add a support for new DAL version explicitly. https://fedorahosted.org/freeipa/ticket/6619 Reviewed-By: Simo Sorce <ssorce@redhat.com> Reviewed-By: Robbie Harwood <rharwood@redhat.com>
Diffstat (limited to 'daemons/ipa-kdb/ipa_kdb.h')
-rw-r--r--daemons/ipa-kdb/ipa_kdb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb.h b/daemons/ipa-kdb/ipa_kdb.h
index 1fdb409df..d5a343345 100644
--- a/daemons/ipa-kdb/ipa_kdb.h
+++ b/daemons/ipa-kdb/ipa_kdb.h
@@ -180,6 +180,8 @@ krb5_error_code ipadb_get_principal(krb5_context kcontext,
unsigned int flags,
krb5_db_entry **entry);
void ipadb_free_principal(krb5_context kcontext, krb5_db_entry *entry);
+/* Helper function for DAL API 6.1 or later */
+void ipadb_free_principal_e_data(krb5_context kcontext, krb5_octet *e_data);
krb5_error_code ipadb_put_principal(krb5_context kcontext,
krb5_db_entry *entry,
char **db_args);