[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-9-6-g1b91512

Karolin Seeger kseeger at samba.org
Wed Apr 1 11:51:36 GMT 2009


The branch, v3-2-stable has been updated
       via  1b9151271f45a3d95e4aefbe11eb5f737f7c542f (commit)
       via  c18625cd6457709c25d99449a4161d2b99d22d03 (commit)
       via  ed9a6e1223af7829615cfd7ee1b67ad8694ee224 (commit)
       via  476f2e1f68effbfef8c2281e125c12df75929527 (commit)
       via  af0163fdfc774f3a032610aadbc1203a770970dc (commit)
      from  ebd468e96843d64f5078624764c230328d69197c (commit)

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


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

    WHATSNEW: Rewording.
    
    Karolin
    (cherry picked from commit c572b19ffcff201f9b8ad0af3bf5434dfe5d06bf)

commit c18625cd6457709c25d99449a4161d2b99d22d03
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
    (cherry picked from commit 887420a30dbb178f29ee9313f2c19dd1b3c3c5e9)

commit ed9a6e1223af7829615cfd7ee1b67ad8694ee224
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
    (cherry picked from commit c9bee29bed290777a4ab32ffe2ed88029a3a6348)

commit 476f2e1f68effbfef8c2281e125c12df75929527
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.
    (cherry picked from commit 3797ddb3acc713cc200114e9e27dfb3901e5cdf1)

commit af0163fdfc774f3a032610aadbc1203a770970dc
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
    (cherry picked from commit 1ab40fbca806f1136dd1d65edd688beb5ec592c7)

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

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


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 27f9070..e7a0fa5 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,178 +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).
+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 5847926..13dea23 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 f8fd11d..154ee62 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 Shared Repository


More information about the samba-cvs mailing list