[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1441-ge4f46d5

Volker Lendecke vl at samba.org
Wed Jan 16 20:15:48 GMT 2008


The branch, v3-2-test has been updated
       via  e4f46d527411c54e8f26c05033b744c751810c32 (commit)
       via  4f95c58040f46f343f55f9a5db2655a5e3b62c00 (commit)
       via  ab8ff39fd51929aae2f4088ca5b1d67e5cb7099e (commit)
      from  dcb7fb2c0d8e4b798b36e8caf480d198f3e08d00 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit e4f46d527411c54e8f26c05033b744c751810c32
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 16 21:18:26 2008 +0100

    Don't try ftruncate when the tdb is opened read-only
    
    Tridge, Jeremy, please check!
    
    Thanks,
    
    Volker

commit 4f95c58040f46f343f55f9a5db2655a5e3b62c00
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 16 21:04:52 2008 +0100

    Next try to fix the max dead record calculation

commit ab8ff39fd51929aae2f4088ca5b1d67e5cb7099e
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 16 20:34:45 2008 +0100

    default to tdbsam instead of smbpasswd

-----------------------------------------------------------------------

Summary of changes:
 source/lib/tdb/common/open.c |    3 ++-
 source/param/loadparm.c      |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/tdb/common/open.c b/source/lib/tdb/common/open.c
index 94140a4..b19e4ce 100644
--- a/source/lib/tdb/common/open.c
+++ b/source/lib/tdb/common/open.c
@@ -179,7 +179,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
 		tdb->page_size = 0x2000;
 	}
 
-	tdb->max_dead_records = (open_flags & TDB_VOLATILE) ? 5 : 0;
+	tdb->max_dead_records = (tdb_flags & TDB_VOLATILE) ? 5 : 0;
 
 	if ((open_flags & O_ACCMODE) == O_WRONLY) {
 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
@@ -227,6 +227,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
 
 	/* we need to zero database if we are the only one with it open */
 	if ((tdb_flags & TDB_CLEAR_IF_FIRST) &&
+	    (!tdb->read_only) &&
 	    (locked = (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK, 0, 1) == 0))) {
 		open_flags |= O_CREAT;
 		if (ftruncate(tdb->fd, 0) == -1) {
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 0d3fbbf..a6529a6 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -1625,7 +1625,7 @@ static void init_globals(bool first_time_only)
 	   a large number of sites (tridge) */
 	Globals.bHostnameLookups = False;
 
-	string_set(&Globals.szPassdbBackend, "smbpasswd");
+	string_set(&Globals.szPassdbBackend, "tdbsam");
 	string_set(&Globals.szLdapSuffix, "");
 	string_set(&Globals.szLdapMachineSuffix, "");
 	string_set(&Globals.szLdapUserSuffix, "");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list