[samba/f13/master] Fix offline authentication resolves: #618201

Guenther Deschner gd at fedoraproject.org
Wed Aug 18 13:52:47 UTC 2010


commit 5275c99c727c0153d2e501999fc4ce78c0e5e1d2
Author: Günther Deschner <gd at samba.org>
Date:   Wed Aug 18 15:48:55 2010 +0200

    Fix offline authentication
    resolves: #618201
    
    Guenther

 samba-3.5.4-offline_cache.patch |   31 +++++++++++++++++++++++++++++++
 samba.spec                      |    8 +++++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/samba-3.5.4-offline_cache.patch b/samba-3.5.4-offline_cache.patch
new file mode 100644
index 0000000..d9afa5e
--- /dev/null
+++ b/samba-3.5.4-offline_cache.patch
@@ -0,0 +1,31 @@
+From 39cb903463d8a3fcabd9e148112bf5cf81744130 Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra at samba.org>
+Date: Tue, 27 Jul 2010 01:54:01 -0700
+Subject: [PATCH] Fix bug 7590 - offline login fails because winbind deletes cache on every startup.
+
+Sync lib/tdb_validate.c with the change in current master.
+Change tdb_validate_open() to always use O_RDWR instead of O_RDONLY,
+as (from the bug report): "db_check() will always return failure for a read-only database.
+Silently, without any log output, when _tdb_lockall() fails."
+
+Jeremy.
+---
+ source3/lib/tdb_validate.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c
+index a1fb185..b4d0365 100644
+--- a/source3/lib/tdb_validate.c
++++ b/source3/lib/tdb_validate.c
+@@ -192,7 +192,7 @@ int tdb_validate_open(const char *tdb_path, tdb_validate_data_func validate_fn)
+ 
+ 	DEBUG(5, ("tdb_validate_open called for tdb '%s'\n", tdb_path));
+ 
+-	tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDONLY, 0);
++	tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDWR, 0);
+ 	if (!tdb) {
+ 		DEBUG(1, ("Error opening tdb %s\n", tdb_path));
+ 		return ret;
+-- 
+1.7.2.1
+
diff --git a/samba.spec b/samba.spec
index b152a82..a34c87d 100644
--- a/samba.spec
+++ b/samba.spec
@@ -1,4 +1,4 @@
-%define main_release 63
+%define main_release 64
 %define samba_version 3.5.4
 %define tdb_version 1.2.1
 %define talloc_version 2.0.1
@@ -45,6 +45,7 @@ Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch
 Patch107: samba-3.2.0pre1-grouppwd.patch
 Patch200: samba-3.2.5-inotify.patch
 Patch201: samba-3.5.4-winbind-schannel.patch
+Patch202: samba-3.5.4-offline_cache.patch
 
 Requires(pre): samba-common = %{epoch}:%{samba_version}-%{release}
 Requires: pam >= 0:0.64
@@ -201,6 +202,7 @@ cp %{SOURCE11} packaging/Fedora/
 %patch107 -p1 -b .grouppwd
 %patch200 -p0 -b .inotify
 %patch201 -p1 -b .winbind_schannel
+%patch202 -p1 -b .offline_cache
 
 mv %samba_source/VERSION %samba_source/VERSION.orig
 sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{samba_release}\"/' < %samba_source/VERSION.orig > %samba_source/VERSION
@@ -650,6 +652,10 @@ exit 0
 %{_datadir}/pixmaps/samba/logo-small.png
 
 %changelog
+* Wed Aug 18 2010 Guenther Deschner <gdeschner at redhat.com> - 3.5.4-64
+- Fix offline authentication
+- resolves: #618201
+
 * Tue Aug 10 2010 Guenther Deschner <gdeschner at redhat.com> - 3.5.4-63
 - Fix winbind secure channel (samlogonex)
 


More information about the scm-commits mailing list