summaryrefslogtreecommitdiffstats
path: root/source4/kdc/hdb-samba4-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/kdc/hdb-samba4-plugin.c')
-rw-r--r--source4/kdc/hdb-samba4-plugin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/kdc/hdb-samba4-plugin.c b/source4/kdc/hdb-samba4-plugin.c
index cc38a60152..6f76124995 100644
--- a/source4/kdc/hdb-samba4-plugin.c
+++ b/source4/kdc/hdb-samba4-plugin.c
@@ -60,6 +60,8 @@ static krb5_error_code hdb_samba4_create(krb5_context context, struct HDB **db,
if (NT_STATUS_IS_OK(nt_status)) {
return 0;
+ } else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_ERROR_DS_INCOMPATIBLE_VERSION)) {
+ return EINVAL;
} else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_CANT_ACCESS_DOMAIN_INFO)) {
krb5_set_error_message(context, EINVAL, "Failed to open Samba4 LDB at %s", lpcfg_private_path(base_ctx, base_ctx->lp_ctx, "sam.ldb"));
@@ -70,6 +72,10 @@ static krb5_error_code hdb_samba4_create(krb5_context context, struct HDB **db,
return EINVAL;
}
+#if (HDB_INTERFACE_VERSION != 8 && HDB_INTERFACE_VERSION != 7)
+#error "Unsupported Heimdal HDB version"
+#endif
+
#if HDB_INTERFACE_VERSION >= 8
static krb5_error_code hdb_samba4_init(krb5_context context, void **ctx)
{