[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated - build_3.2.8_ctdb.57-49-ga213401

Michael Adam obnox at samba.org
Wed Apr 1 14:51:21 GMT 2009


The branch, v3-2-ctdb has been updated
       via  a213401cca8aadc65585183fdaac588b0c015023 (commit)
       via  a73a076a21ce2199f6b1418ff2d46546961c7362 (commit)
       via  00c2b03cba3d2eb43a33e6c3de242de3eecaa07d (commit)
       via  95d0cd8c11897c4182236f7137040d644a684366 (commit)
       via  23d05eb1675ad8ae3c5ec6dd1cfb85025755e724 (commit)
       via  06452f801ccc716c965420b56a7f159c6e77a060 (commit)
      from  cd591b396eeaee4d8ca5afbdc59b80d7ca496968 (commit)

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


- Log -----------------------------------------------------------------
commit a213401cca8aadc65585183fdaac588b0c015023
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Apr 1 13:42:32 2009 +0200

    WHATSNEW: Rewording.
    
    Karolin

commit a73a076a21ce2199f6b1418ff2d46546961c7362
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Apr 1 13:32:07 2009 +0200

    VERSION: Raise version number up to 3.2.10.
    
    Karolin

commit 00c2b03cba3d2eb43a33e6c3de242de3eecaa07d
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Apr 1 13:31:23 2009 +0200

    WHATSNEW: Prepare WHATSNEW for 3.2.10.
    
    A release a day... ;-)
    
    Karolin

commit 95d0cd8c11897c4182236f7137040d644a684366
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 1 12:23:07 2009 +0200

    s3: fix the fix for bug #6195 - dont let smbd child processes panic
    
    This patch makes sure the original and temporary TDBs are closed
    _before_ the rename. Originally, the open TDB was renamed, and so
    the name passdb.tdb.tmp stayed around in the db context. Hence
    upon client connect, the smbd children died because reinit_after_fork()
    calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
    existed no longer...
    
    Michael

commit 23d05eb1675ad8ae3c5ec6dd1cfb85025755e724
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 31 18:29:30 2009 -0700

    Tidy up some convert_string_internal error cases, found by Andrew Bartlett.
    Jeremy.

commit 06452f801ccc716c965420b56a7f159c6e77a060
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Mar 31 16:12:30 2009 +0200

    WHATSNEW: Fix announcement.
    
    Karolin

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

Summary of changes:
 WHATSNEW.txt            |  176 +++--------------------------------------------
 source/VERSION          |    2 +-
 source/lib/charcnv.c    |   25 +++++--
 source/passdb/pdb_tdb.c |   18 ++++-
 4 files changed, 47 insertions(+), 174 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index d2c7893..e7a0fa5 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,182 +1,28 @@
-                   =============================
-                   Release Notes for Samba 3.2.9
-			  March 31, 2009
-                   =============================
+                   ==============================
+                   Release Notes for Samba 3.2.10
+			    April 1, 2009
+                   ==============================
 
 
 This is a maintenance release of the Samba 3.2 series.
 
-Major enhancements included in Samba 3.2.9 are:
-
-  o Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb
-    correctly (bug #6195).
-  o Fix guest authentication in setups with "security = share" and
-    "guest ok = yes" when Winbind is running.
-  o Fix corruptions of source path in tar mode of smbclient (bug #6161).
-
-
-The original security announcement for this and past advisories can
-be found http://www.samba.org/samba/security/
+In Samba 3.2.9, there is an issue while migrating passdb.tdb files from older
+Samba versions (e.g. 3.2.8). That causes panics of smbd child processes until
+the parent smbd is restarted once after converting the passdb.tdb file. This
+issue is fixed in Samba 3.2.10.
 
+Sorry for the inconveniences!
 
 ######################################################################
 Changes
 #######
 
-Changes since 3.2.8
+Changes since 3.2.9
 -------------------
 
 
 o   Michael Adam <obnox at samba.org>
-    * Add script fill-templates.
-    * Make update-pkginfo callable from any directory.
-
-
-o   Jeremy Allison <jra at samba.org>
-    * BUG 6099: Samba returns incurrate capabilities list.
-    * BUG 6133: Cannot delete non-ACL files on Solaris/ZFS/NFSv4 ACL
-      filesystem.
-    * BUG 6161: smbclient corrupts source path in tar mode.
-    * BUG 6195: Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb
-      correctly.
-    * BUG 6196: Unable to serve files with colons to Linux CIFS/VFS client.
-    * BUG 6224: nmbd waits 5 minutes at startup before checking if it needs to
-      run elections.
-    * Correctly use chroot().
-    * Parameterize in local.h the MAX_RPC_DATA_SIZE, and ensure
-      that "offered" read from the rpc packet in spoolss is under
-      that size.
-    * Fix Coverity ID 602.
-    * Backport the semantics of when to delete alternate data streams on a file
-      truncate.
-    * Allow set attributes on a stream fnum to be redirected to the base
-      filename.
-    * Fix use of streams modules with CIFSFS client.
-    * Fix more POSIX path lstat calls.
-    * Allow DFS client paths to work when POSIX pathnames have been
-      selected.
-    * Try and fix the build farm RAW-STREAMS errors.
-    * Ensure files starting with multiple dots are hidden.
-
-
-o   Steven Danneman <steven.danneman at isilon.com>
-    * Fix guest auth when Winbind is running.
-
-
-o   Günther Deschner <gd at samba.org>
-    * BUG 6102: NetQueryDisplayInformation could return wrong information.
-    * BUG 6193: Avoid messing with sync_context in fetch_database_to_ldif().
-    * Fix memleak in get_remote_printer_publishing_data().
-    * Add pidl in order to be able to regenerate librpc functions.
-    * Fix Coverity IDs 722, 762.
-
-
-o   Steve French <smfrench at gmail.com>
-    * cifs mount fix for handling -V parameter.
-    * Fix guest mounts.
-
-
-o   Holger Hetterich <hhetter at novell.com>
-    * Enable total anonymization in vfs_smb_traffic_analyzer.
-
-
-o   Björn Jacke <bj at sernet.de>
-    * Enable IPv6 support for NetBSD and FreeBSD.
-    * Prefer gssapi header files from subdirectory.
-    * Fix build on old Heimdal based systems.
-    * Use parentheses in if condition to make negation clear.
-
-
-o   Günter Kukkukk <linux at kukkukk.com>
-    * Don't try and delete a default ACL from a file.
-
-
-o   Jeff Layton <jlayton at redhat.com>
-    * Initialize rc to 0 in main.
-
-
-o   Volker Lendecke <vl at sernet.de>
-    * BUG 6100: Complete fix.
-    * BUG 6130: Don't crash in winbindd_rpc lookup_groupmem() on unmapped
-      members.
-    * BUG 6097: Fix smbd segfault.
-    * Fix remotely adding a share via MMC.
-    * Fix resume handle for _samr_EnumDomainGroups.
-    * Fix Coverity IDs 742, 744, 745, 879, 880.
-    * Fix a buffer handling bug when adding lots of registry keys.
-    * Fix a O(n^2) algorithm in regdb_fetch_keys().
-    * Fix an uninitialized variable warning.
-    * Fix a valgrind error / segfault in dns_register_smbd().
-    * Don't log NDR_PRINT_DEBUG at level 0, this always ends up in syslog.
-    * Fix a malloc/talloc mismatch when cli_initialise() fails.
-    * Fix a valgrind error.
-    * Fix two memleaks in the encryption code.
-    * Fix gcc 4.4 compile warning.
-    * Fix a scary "fill_share_mode_lock failed" message.
-
-
-o   Derrell Lipman <derrell at dworkin.(none)>
-    * BUG 6228: Fix SMBC_open_ctx failure due to path resolve failure doesn't
-      set errno.
-
-
-o   Stefan Metzmacher <metze at samba.org
-    * BUG 6100: Implement _netr_LogonGetCapabilities() with
-      NT_STATUS_NOT_IMPLEMENTED.
-    * Add S-1-22-X-Y sids to the local token.
-    * Add idl for netr_LogonGetCapabilities().
-    * Fix the build on SLES8.
-    * Fix smb signing for fragmented trans/trans2/nttrans requests.
-
-
-o   Glenn Machin <gmachin at sandia.gov>
-    * Don't miss an absolute pathname as a kerberos keytab path.
-
-
-o   Shirish Pargaonkar <shirishpargaonkar at gmail.com>
-    * Clean-up entries in /etc/mtab after unmount.
-    * Add fakemount (-f) and nomtab (-n) flags to mount.cifs.
-
-
-o   Ted Percival <ted.percival at quest.com>
-    * Fix a crash during name resolution when log level >= 10 and libc
-      segfaults if printf is passed NULL for a "%s" arg (e.g. Solaris).
-
-
-o   Tim Prouty <tprouty at samba.org>
-    * Fix SMB_VFS_RECVFILE/SENDFILE macros.
-    * Parse_packet can return NULL which is then dereferenced in
-      match_mailslot_name.
-
-
-o   Dan Sledz <dsledz at isilon.com>
-    * Fix double free caused by incorrect talloc_steal usage.
-
-
-o   Aravind Srinivasan <aravind.srinivasan at isilon.com>
-    * Have nmbd check all available interfaces for WINS before failing.
-
-
-o   Miguel Suarez <Miguel.Suarez at stratus.com>
-    * BUG 6085: Fix build of vfs_default on systems without utime support.
-
-
-o   Yasuma Takeda <yasuma at osstech.co.jp>
-    * BUG 5920: The length of the memcpy was calculated wrong.
-    * BUG 6098: Fix the ads_find_dc() with "security = domain" when the DNS
-      server is invalid.
-
-
-o   Andrew Tridgell <tridge at samba.org>
-    * Fix a bug in message handling for code the change notify code.
-
-
-o   Jelmer Vernooij <jelmer at samba.org>
-    * Properly cast array length in print functions.
-
-
-o   Bo Yang <boyang at novell.com>
-    * Initialize the id_map status in idmap_ldap to avoid surprise.
+    * BUG #6195: Don't let smbd child processes panic.
 
 
 ######################################################################
diff --git a/source/VERSION b/source/VERSION
index b6f32b1..28b1e56 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=2
-SAMBA_VERSION_RELEASE=9
+SAMBA_VERSION_RELEASE=10
 
 ########################################################
 # Bug fix releases use a letter for the patch revision #
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index e51c33d..a4f3276 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -242,7 +242,7 @@ static size_t convert_string_internal(charset_t from, charset_t to,
 					DEBUG(3,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
 				if (allow_bad_conv)
 					goto use_as_is;
-				break;
+				return (size_t)-1;
 			case E2BIG:
 				reason="No more room"; 
 				if (!conv_silent) {
@@ -263,11 +263,12 @@ static size_t convert_string_internal(charset_t from, charset_t to,
 					DEBUG(3,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
 				if (allow_bad_conv)
 					goto use_as_is;
-				break;
+				
+				return (size_t)-1;
 			default:
 				if (!conv_silent)
 					DEBUG(0,("convert_string_internal: Conversion error: %s(%s)\n",reason,inbuf));
-				break;
+				return (size_t)-1;
 		}
 		/* smb_panic(reason); */
 	}
@@ -412,7 +413,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}
@@ -448,7 +453,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}
@@ -484,7 +493,11 @@ size_t convert_string(charset_t from, charset_t to,
 #ifdef BROKEN_UNICODE_COMPOSE_CHARACTERS
 				goto general_case;
 #else
-				return retval + convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				size_t ret = convert_string_internal(from, to, p, slen, q, dlen, allow_bad_conv);
+				if (ret == (size_t)-1) {
+					return ret;
+				}
+				return retval + ret;
 #endif
 			}
 		}
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c
index acd2fea..73e5476 100644
--- a/source/passdb/pdb_tdb.c
+++ b/source/passdb/pdb_tdb.c
@@ -880,6 +880,11 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
 		smb_panic("tdbsam_convert_backup: orig commit failed\n");
 	}
 
+	/* be sure to close the DBs _before_ renaming the file */
+
+	TALLOC_FREE(orig_db);
+	TALLOC_FREE(tmp_db);
+
 	/* This is safe from other users as we know we're
  	 * under a mutex here. */
 
@@ -892,13 +897,22 @@ static bool tdbsam_convert_backup(const char *dbname, struct db_context **pp_db)
 	}
 
 	TALLOC_FREE(frame);
-	TALLOC_FREE(orig_db);
+
+	/* re-open the converted TDB */
+
+	orig_db = db_open_trans(NULL, dbname, 0,
+				TDB_DEFAULT, O_CREAT|O_RDWR, 0600);
+	if (orig_db == NULL) {
+		DEBUG(0, ("tdbsam_convert_backup: Failed to re-open "
+			  "converted passdb TDB [%s]\n", dbname));
+		return false;
+	}
 
 	DEBUG(1, ("tdbsam_convert_backup: updated %s file.\n",
 		dbname ));
 
 	/* Replace the global db pointer. */
-	*pp_db = tmp_db;
+	*pp_db = orig_db;
 	return true;
 
   cancel:


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list