[Pkg-samba-maint] r3190 - in branches/samba/lenny/debian: . patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Wed Dec 23 19:31:49 UTC 2009


tags 561545 pending
thanks

Author: bubulle
Date: 2009-12-23 19:31:49 +0000 (Wed, 23 Dec 2009)
New Revision: 3190

Added:
   branches/samba/lenny/debian/patches/bug_561545_upstream_6969.patch
   branches/samba/lenny/debian/patches/bug_561545_upstream_7005.patch
Modified:
   branches/samba/lenny/debian/changelog
   branches/samba/lenny/debian/patches/series
Log:
- Fix regression in name mangling.i Only short
  filenames were hashed, not long ones when using
  "mangling method = hash". Closes: #561545
- Fix mangling of file or directory names that contain
  dots. This bug was revealed when fixing #561545


Modified: branches/samba/lenny/debian/changelog
===================================================================
--- branches/samba/lenny/debian/changelog	2009-12-23 05:09:10 UTC (rev 3189)
+++ branches/samba/lenny/debian/changelog	2009-12-23 19:31:49 UTC (rev 3190)
@@ -1,3 +1,13 @@
+samba (2:3.2.5-4lenny8) UNRELEASED; urgency=low
+
+  * Fix regression in name mangling.i Only short
+    filenames were hashed, not long ones when using
+    "mangling method = hash". Closes: #561545
+  * Fix mangling of file or directory names that contain
+    dots. This bug was revealed when fixing #561545
+
+ -- Christian Perrier <bubulle at debian.org>  Wed, 23 Dec 2009 20:29:03 +0100
+
 samba (2:3.2.5-4lenny7) stable-security; urgency=high
 
   * Security update. Fixes the following issues:

Added: branches/samba/lenny/debian/patches/bug_561545_upstream_6969.patch
===================================================================
--- branches/samba/lenny/debian/patches/bug_561545_upstream_6969.patch	                        (rev 0)
+++ branches/samba/lenny/debian/patches/bug_561545_upstream_6969.patch	2009-12-23 19:31:49 UTC (rev 3190)
@@ -0,0 +1,25 @@
+Goal: Fix regression with "setting mangling method = hash"
+
+Fixes: #561545
+
+Status wrt upstream: Fixed in 3.3.10 and 3.4.4
+
+Author: Jeremy Allison <jra at samba.org>
+
+diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c
+index 69ecf77..5de69e2 100644
+--- a/source/smbd/mangle_hash.c
++++ b/source/smbd/mangle_hash.c
+@@ -613,7 +613,10 @@ static bool must_mangle(const char *name,
+ 	}
+ 	status = is_valid_name(name_ucs2, False, False);
+ 	SAFE_FREE(name_ucs2);
+-	return NT_STATUS_IS_OK(status);
++	/* We return true if we *must* mangle, so if it's
++	 * a valid name (status == OK) then we must return
++	 * false. Bug #6939. */
++	return !NT_STATUS_IS_OK(status);
+ }
+ 
+ /*****************************************************************************
+

Added: branches/samba/lenny/debian/patches/bug_561545_upstream_7005.patch
===================================================================
--- branches/samba/lenny/debian/patches/bug_561545_upstream_7005.patch	                        (rev 0)
+++ branches/samba/lenny/debian/patches/bug_561545_upstream_7005.patch	2009-12-23 19:31:49 UTC (rev 3190)
@@ -0,0 +1,38 @@
+Goal: Fix regression revealed when fixing upstream #6939.
+      Suffixes are stripped from filenames with a dot/period
+      character.
+
+Fixes: #561545
+
+Status wrt upstream: Fixed in 3.3.10 and 3.4.4
+
+Author: Jeremy Allison <jra at samba.org>
+
+diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c
+index 5de69e2..7073c3c 100644
+--- a/source/smbd/mangle_hash.c
++++ b/source/smbd/mangle_hash.c
+@@ -432,6 +432,13 @@ static void cache_mangled_name( const char mangled_name[13],
+ 		if( !s1[i] && !s2[i] ) {
+ 			/* Truncate at the '.' */
+ 			*s1 = '\0';
++			/*
++			 * DANGER WILL ROBINSON - this
++			 * is changing a const string via
++			 * an aliased pointer ! Remember to
++			 * put it back once we've used it.
++			 * JRA
++			 */
+ 			*s2 = '\0';
+ 		}
+ 	}
+@@ -443,6 +450,8 @@ static void cache_mangled_name( const char mangled_name[13],
+ 	} else {
+ 		DEBUG(5,("cache_mangled_name: Stored entry %s -> %s\n", mangled_name_key, raw_name));
+ 	}
++	/* Restore the change we made to the const string. */
++	*s2 = '.';
+ }
+ 
+ /* ************************************************************************** **
+

Modified: branches/samba/lenny/debian/patches/series
===================================================================
--- branches/samba/lenny/debian/patches/series	2009-12-23 05:09:10 UTC (rev 3189)
+++ branches/samba/lenny/debian/patches/series	2009-12-23 19:31:49 UTC (rev 3190)
@@ -37,3 +37,5 @@
 security-CVE-2009-2948-1.patch
 security-CVE-2009-2948-2.patch
 
+bug_561545_upstream_6969.patch
+bug_561545_upstream_7005.patch




More information about the Pkg-samba-maint mailing list