--- /dev/null
+From 33cb7ed204136a4459cf71a6adc8711b0a554f7a Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@samba.org>
+Date: Tue, 23 Oct 2012 14:07:38 +0200
+Subject: [PATCH] BUG 9321: Fix winbind offline logon support.
+
+We store the current time in the cache entry but we never read it in
+wcache_fetch_creds(). So the first entry we try to fetch is a hash16,
+which always fails cause we have a time entry first.
+
+The read of the time value has been removed with
+21528da9cd12a4f5c3792a482a5d18fe946a6f7a.
+
+Signed-off-by: Andreas Schneider <asn@samba.org>
+---
+ source3/winbindd/winbindd_cache.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
+index 2c9dd4a..1e3ab2d 100644
+--- a/source3/winbindd/winbindd_cache.c
++++ b/source3/winbindd/winbindd_cache.c
+@@ -1397,8 +1397,6 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
+
+ dump_data_pw("nt_pass", nt_pass, NT_HASH_LEN);
+
+- centry_put_time(centry, time(NULL));
+-
+ /* Create a salt and then salt the hash. */
+ generate_random_buffer(cred_salt, NT_HASH_LEN);
+ E_md5hash(cred_salt, nt_pass, salted_hash);
+--
+1.7.12.3
+
-%define main_release 162
+%define main_release 163
%define samba_version 4.0.0
%define talloc_version 2.0.7
%define tdb_version 1.2.10
%define tevent_version 0.9.17
%define ldb_version 1.1.12
-%define pre_release rc3
+%define pre_release rc4
%define samba_release %{main_release}%{?dist}.%{pre_release}
Patch0: samba-4.0.0rc4-request_aes_krb_keys.patch
Patch1: samba-4.0.0rc4-add_aes_enctypes_to_krb5_conf.patch
+Patch2: samba-4.0.0rc5-fix_winbind_offline_logon.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%patch0 -p1 -b .request_aes_krb_keys
%patch1 -p1 -b .add_aes_enctypes_to_krb5_conf
+%patch2 -p1 -b .winbind_offline_logon
%build
%global _talloc_lib ,talloc,pytalloc,pytalloc-util
%{_mandir}/man7/winbind_krb5_locator.7*
%changelog
+* Tue Oct 30 2012 - Andreas Schneider <asn@redhat.com> - 2:4.0.0-163.rc4
+- Update to Samba 4.0.0rc4.
+
* Mon Oct 29 2012 - Andreas Schneider <asn@redhat.com> - 2:4.0.0-162.rc3
- resolves: #870630 - Fix scriptlets interpeting a comment as argument.