summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorJeffrey Clark <dude@zaplabs.com>2014-01-10 17:20:14 -0600
committerAndrew Bartlett <abartlet@samba.org>2014-01-21 08:30:36 +1300
commit368208069e33a6d9b78a90f7326d5ac1bdd204f7 (patch)
tree43ccd4f63b26279a98bcc0be6c79ce7e3c9e8816 /source4
parent1db4d383c1921e4c5b6e9ea4b63e035c363bce30 (diff)
downloadsamba-368208069e33a6d9b78a90f7326d5ac1bdd204f7.tar.gz
samba-368208069e33a6d9b78a90f7326d5ac1bdd204f7.tar.xz
samba-368208069e33a6d9b78a90f7326d5ac1bdd204f7.zip
Support for Heimdal's unified krb5 and hdb plugin system.
Fixes exportkeytab and a kdc crash when building against heimdal master. Bug-Debian: http://bugs.debian.org/732342 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/hdb-samba4-plugin.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/kdc/hdb-samba4-plugin.c b/source4/kdc/hdb-samba4-plugin.c
index 9135df8f78e..cc38a60152a 100644
--- a/source4/kdc/hdb-samba4-plugin.c
+++ b/source4/kdc/hdb-samba4-plugin.c
@@ -70,6 +70,18 @@ static krb5_error_code hdb_samba4_create(krb5_context context, struct HDB **db,
return EINVAL;
}
+#if HDB_INTERFACE_VERSION >= 8
+static krb5_error_code hdb_samba4_init(krb5_context context, void **ctx)
+{
+ *ctx = NULL;
+ return 0;
+}
+
+static void hdb_samba4_fini(void *ctx)
+{
+}
+#endif
+
/* Only used in the hdb-backed keytab code
* for a keytab of 'samba4&<address>' or samba4, to find
* kpasswd's key in the main DB, and to
@@ -79,6 +91,10 @@ static krb5_error_code hdb_samba4_create(krb5_context context, struct HDB **db,
*/
struct hdb_method hdb_samba4_interface = {
HDB_INTERFACE_VERSION,
+#if HDB_INTERFACE_VERSION >= 8
+ .init = hdb_samba4_init,
+ .fini = hdb_samba4_fini,
+#endif
.prefix = "samba4",
.create = hdb_samba4_create
};