---- samba-4.2.0/source4/kdc/kdc.c.org 2015-03-25 20:54:14.299705890 +0100
-+++ samba-4.2.0/source4/kdc/kdc.c 2015-03-25 20:54:34.780191919 +0100
-@@ -967,9 +967,9 @@
+--- samba-4.5.6/source4/kdc/kdc-heimdal.c.orig 2017-03-13 17:48:51.591429490 +0100
++++ samba-4.5.6/source4/kdc/kdc-heimdal.c 2017-03-13 19:10:54.528039946 +0100
+@@ -373,9 +373,9 @@
* The old behavior in the _kdc_get_preferred_key()
* function is use_strongest_server_key=TRUE.
*/
-- kdc->config->as_use_strongest_session_key = false;
-+ kdc->config->tgt_use_strongest_session_key = false;
- kdc->config->preauth_use_strongest_session_key = false;
-- kdc->config->tgs_use_strongest_session_key = false;
-+ kdc->config->svc_use_strongest_session_key = false;
- kdc->config->use_strongest_server_key = true;
+- kdc_config->as_use_strongest_session_key = false;
++ kdc_config->tgt_use_strongest_session_key = false;
+ kdc_config->preauth_use_strongest_session_key = false;
+- kdc_config->tgs_use_strongest_session_key = false;
++ kdc_config->svc_use_strongest_session_key = false;
+ kdc_config->use_strongest_server_key = true;
/* Register hdb-samba4 hooks for use as a keytab */
+--- samba-4.5.6/source4/kdc/hdb-samba4-plugin.c.orig 2016-08-11 09:51:05.000000000 +0200
++++ samba-4.5.6/source4/kdc/hdb-samba4-plugin.c 2017-03-13 20:50:38.124638290 +0100
+@@ -72,7 +72,7 @@
+ return EINVAL;
+ }
+
+-#if (HDB_INTERFACE_VERSION != 8 && HDB_INTERFACE_VERSION != 7)
++#if (HDB_INTERFACE_VERSION < 8 || HDB_INTERFACE_VERSION > 9)
+ #error "Unsupported Heimdal HDB version"
+ #endif
+
+--- samba-4.5.6/source4/kdc/sdb_to_hdb.c.orig 2016-08-11 09:51:05.000000000 +0200
++++ samba-4.5.6/source4/kdc/sdb_to_hdb.c 2017-03-13 21:20:28.297951181 +0100
+@@ -51,7 +51,11 @@
+ h->allow_kerberos4 = s->allow_kerberos4;
+ h->allow_digest = s->allow_digest;
+ h->locked_out = s->locked_out;
++#if HDB_INTERFACE_VERSION < 9
+ h->_unused18 = s->_unused18;
++#else
++ h->require_pwchange = s->_unused18;
++#endif
+ h->_unused19 = s->_unused19;
+ h->_unused20 = s->_unused20;
+ h->_unused21 = s->_unused21;
%bcond_without avahi # Avahi support
%bcond_without dmapi # DMAPI support
%bcond_without systemd # systemd integration
-%bcond_with system_heimdal # Use system Heimdal libraries (broken in samba 4.4.x)
+%bcond_with system_heimdal # Use system Heimdal libraries [was broken in samba 4.4.x + heimdal 1.5.x]
%bcond_without system_libs # system libraries (talloc,tdb,tevent,ldb,ntdb)
%bcond_without ctdb_pcp # Performance Co-Pilot support for CTDB
# turn on when https://bugzilla.samba.org/show_bug.cgi?id=11764 is fixed
%bcond_with replace
%if %{with system_libs}
-%define ldb_ver 1.1.26
+%define ldb_ver 1.1.27
%define ntdb_ver 1.0
-%define talloc_ver 2:2.1.6
-%define tdb_ver 2:1.3.9
-%define tevent_ver 0.9.28
+%define talloc_ver 2:2.1.8
+%define tdb_ver 2:1.3.10
+%define tevent_ver 0.9.29
%endif
# dmapi-devel forces largefile/64bit stuff that isn't detected properly
+# -- what is the exact problem? samba 4.5.6 builds with DMAPI on i686
%ifarch %{ix86}
%undefine with_dmapi
%endif
%{__sed} -i -e 's|#!/usr/bin/env python|#!/usr/bin/python|' source4/scripting/bin/samba*
%{__sed} -i -e 's|#!/usr/bin/env perl|#!/usr/bin/perl|' pidl/pidl
+%if %{with system_heimdal}
+%{__mv} source4/heimdal_build/krb5-types{,-smb}.h
+%endif
+
%build
LDFLAGS="${LDFLAGS:-%rpmldflags}" \
CFLAGS="${CFLAGS:-%rpmcflags}" \
%attr(755,root,root) %{_libdir}/samba/bind9/dlz_bind9_11.so
%dir %{_libdir}/samba/gensec
%attr(755,root,root) %{_libdir}/samba/gensec/krb5.so
+%if %{with system_heimdal}
+%dir %{_libdir}/samba/hdb
+%attr(755,root,root) %{_libdir}/samba/hdb/hdb_samba4.so
+%endif
%dir %{_libdir}/samba/ldb
%attr(755,root,root) %{_libdir}/samba/ldb/aclread.so
%attr(755,root,root) %{_libdir}/samba/ldb/acl.so