[Pkg-samba-maint] r2578 - trunk/samba/debian/patches

vorlon at alioth.debian.org vorlon at alioth.debian.org
Sun Feb 15 20:04:28 UTC 2009


Author: vorlon
Date: 2009-02-15 20:04:27 +0000 (Sun, 15 Feb 2009)
New Revision: 2578

Removed:
   trunk/samba/debian/patches/bug_500129_upstream_5953.patch
   trunk/samba/debian/patches/bug_509101_upstream_5904.patch
   trunk/samba/debian/patches/documentation-links-debian.patch
   trunk/samba/debian/patches/documentation-links.patch
   trunk/samba/debian/patches/fhs-assignpaths.patch.old
   trunk/samba/debian/patches/smbd-prevent-access-to-root-filesystem-when-connect.patch
Log:
remove patches that aren't needed for 3.3.0

Deleted: trunk/samba/debian/patches/bug_500129_upstream_5953.patch
===================================================================
--- trunk/samba/debian/patches/bug_500129_upstream_5953.patch	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/bug_500129_upstream_5953.patch	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,259 +0,0 @@
-Goal: Fix segfault whan accessign some NAS devices running old versions of Samba
-
-Fixes: #500129
-
-Status wrt upstream: Fixed in 3.2.6
-
-Author: Kai Blin <kai at samba.org> and Volker Lendecke <vl at samba.org>
-
-Note: This bug was a regression in Samba 3.2 and may affect etch->lenny
-      upgrades, introducing regressions. See also Launchpad bug #264943
-      (Ubuntu Hardy->Intrepid regression)
-
-Index: samba-3.2.5/source/lib/system.c
-===================================================================
---- samba-3.2.5.orig/source/lib/system.c
-+++ samba-3.2.5/source/lib/system.c
-@@ -142,6 +142,20 @@
- }
- 
- /*******************************************************************
-+A writev wrapper that will deal with EINTR.
-+********************************************************************/
-+
-+ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt)
-+{
-+	ssize_t ret;
-+
-+	do {
-+		ret = writev(fd, iov, iovcnt);
-+	} while (ret == -1 && errno == EINTR);
-+	return ret;
-+}
-+
-+/*******************************************************************
- A pread wrapper that will deal with EINTR and 64-bit file offsets.
- ********************************************************************/
- 
-Index: samba-3.2.5/source/lib/util_sock.c
-===================================================================
---- samba-3.2.5.orig/source/lib/util_sock.c
-+++ samba-3.2.5/source/lib/util_sock.c
-@@ -1037,40 +1037,109 @@
- }
- 
- /****************************************************************************
-- Write data to a fd.
-+ Write all data from an iov array
- ****************************************************************************/
- 
--ssize_t write_data(int fd, const char *buffer, size_t N)
-+ssize_t write_data_iov(int fd, const struct iovec *orig_iov, int iovcnt)
- {
--	size_t total=0;
--	ssize_t ret;
--	char addr[INET6_ADDRSTRLEN];
-+	int i;
-+	size_t to_send;
-+	ssize_t thistime;
-+	size_t sent;
-+	struct iovec *iov_copy, *iov;
-+
-+	to_send = 0;
-+	for (i=0; i<iovcnt; i++) {
-+		to_send += orig_iov[i].iov_len;
-+	}
-+
-+	thistime = sys_writev(fd, orig_iov, iovcnt);
-+	if ((thistime <= 0) || (thistime == to_send)) {
-+		return thistime;
-+	}
-+	sent = thistime;
- 
--	while (total < N) {
--		ret = sys_write(fd,buffer + total,N - total);
-+	/*
-+	 * We could not send everything in one call. Make a copy of iov that
-+	 * we can mess with. We keep a copy of the array start in iov_copy for
-+	 * the TALLOC_FREE, because we're going to modify iov later on,
-+	 * discarding elements.
-+	 */
- 
--		if (ret == -1) {
--			if (fd == get_client_fd()) {
--				/* Try and give an error message saying
--				 * what client failed. */
--				DEBUG(0,("write_data: write failure in "
--					"writing to client %s. Error %s\n",
--					get_peer_addr(fd,addr,sizeof(addr)),
--					strerror(errno) ));
--			} else {
--				DEBUG(0,("write_data: write failure. "
--					"Error = %s\n", strerror(errno) ));
-+	iov_copy = (struct iovec *)TALLOC_MEMDUP(
-+		talloc_tos(), orig_iov, sizeof(struct iovec) * iovcnt);
-+
-+	if (iov_copy == NULL) {
-+		errno = ENOMEM;
-+		return -1;
-+	}
-+	iov = iov_copy;
-+
-+	while (sent < to_send) {
-+		/*
-+		 * We have to discard "thistime" bytes from the beginning
-+		 * iov array, "thistime" contains the number of bytes sent
-+		 * via writev last.
-+		 */
-+		while (thistime > 0) {
-+			if (thistime < iov[0].iov_len) {
-+				char *new_base =
-+					(char *)iov[0].iov_base + thistime;
-+				iov[0].iov_base = new_base;
-+				iov[0].iov_len -= thistime;
-+				break;
- 			}
--			return -1;
-+			thistime -= iov[0].iov_len;
-+			iov += 1;
-+			iovcnt -= 1;
- 		}
- 
--		if (ret == 0) {
--			return total;
-+		thistime = sys_writev(fd, iov, iovcnt);
-+		if (thistime <= 0) {
-+			break;
- 		}
-+		sent += thistime;
-+	}
-+
-+	TALLOC_FREE(iov_copy);
-+	return sent;
-+}
- 
--		total += ret;
-+/****************************************************************************
-+ Write data to a fd.
-+****************************************************************************/
-+
-+/****************************************************************************
-+ Write data to a fd.
-+****************************************************************************/
-+
-+ssize_t write_data(int fd, const char *buffer, size_t N)
-+{
-+	ssize_t ret;
-+	struct iovec iov;
-+
-+	iov.iov_base = CONST_DISCARD(char *, buffer);
-+	iov.iov_len = N;
-+
-+	ret = write_data_iov(fd, &iov, 1);
-+	if (ret >= 0) {
-+		return ret;
-+	}
-+
-+	if (fd == get_client_fd()) {
-+		char addr[INET6_ADDRSTRLEN];
-+		/*
-+		 * Try and give an error message saying what client failed.
-+		 */
-+		DEBUG(0, ("write_data: write failure in writing to client %s. "
-+			  "Error %s\n", get_peer_addr(fd,addr,sizeof(addr)),
-+			  strerror(errno)));
-+	} else {
-+		DEBUG(0,("write_data: write failure. Error = %s\n",
-+			 strerror(errno) ));
- 	}
--	return (ssize_t)total;
-+
-+	return -1;
- }
- 
- /****************************************************************************
-Index: samba-3.2.5/source/libsmb/clientgen.c
-===================================================================
---- samba-3.2.5.orig/source/libsmb/clientgen.c
-+++ samba-3.2.5/source/libsmb/clientgen.c
-@@ -315,7 +315,7 @@
- 	/* First length to send is the offset to the data. */
- 	size_t len = SVAL(cli->outbuf,smb_vwv11) + 4;
- 	size_t nwritten=0;
--	ssize_t ret;
-+	struct iovec iov[2];
- 
- 	/* fd == -1 causes segfaults -- Tom (tom at ninja.nl) */
- 	if (cli->fd == -1) {
-@@ -327,33 +327,19 @@
- 		return false;
- 	}
- 
--	while (nwritten < len) {
--		ret = write_socket(cli->fd,cli->outbuf+nwritten,len - nwritten);
--		if (ret <= 0) {
--			close(cli->fd);
--			cli->fd = -1;
--			cli->smb_rw_error = SMB_WRITE_ERROR;
--			DEBUG(0,("Error writing %d bytes to client. %d (%s)\n",
--				(int)len,(int)ret, strerror(errno) ));
--			return false;
--		}
--		nwritten += ret;
--	}
-+	iov[0].iov_base = cli->outbuf;
-+	iov[0].iov_len = len;
-+	iov[1].iov_base = CONST_DISCARD(char *, p);
-+	iov[1].iov_len = extradata;
- 
--	/* Now write the extra data. */
--	nwritten=0;
--	while (nwritten < extradata) {
--		ret = write_socket(cli->fd,p+nwritten,extradata - nwritten);
--		if (ret <= 0) {
--			close(cli->fd);
--			cli->fd = -1;
--			cli->smb_rw_error = SMB_WRITE_ERROR;
--			DEBUG(0,("Error writing %d extradata "
--				"bytes to client. %d (%s)\n",
--				(int)extradata,(int)ret, strerror(errno) ));
--			return false;
--		}
--		nwritten += ret;
-+	nwritten = write_data_iov(cli->fd, iov, 2);
-+	if (nwritten < (len + extradata)) {
-+		close(cli->fd);
-+		cli->fd = -1;
-+		cli->smb_rw_error = SMB_WRITE_ERROR;
-+		DEBUG(0,("Error writing %d bytes to client. (%s)\n",
-+			 (int)(len+extradata), strerror(errno)));
-+		return false;
- 	}
- 
- 	/* Increment the mid so we can tell between responses. */
-Index: samba-3.2.5/source/libsmb/clilist.c
-===================================================================
---- samba-3.2.5.orig/source/libsmb/clilist.c
-+++ samba-3.2.5/source/libsmb/clilist.c
-@@ -79,16 +79,17 @@
- 			p += 27;
- 			p += clistr_align_in(cli, p, 0);
- 
--			/* We can safely use +1 here (which is required by OS/2)
--			 * instead of +2 as the STR_TERMINATE flag below is
-+			/* We can safely use len here (which is required by OS/2)
-+			 * and the NAS-BASIC server instead of +2 or +1 as the
-+			 * STR_TERMINATE flag below is
- 			 * actually used as the length calculation.
--			 * The len+2 is merely an upper bound.
-+			 * The len is merely an upper bound.
- 			 * Due to the explicit 2 byte null termination
- 			 * in cli_receive_trans/cli_receive_nt_trans
- 			 * we know this is safe. JRA + kukks
- 			 */
- 
--			if (p + len + 1 > pdata_end) {
-+			if (p + len > pdata_end) {
- 				return pdata_end - base;
- 			}
- 

Deleted: trunk/samba/debian/patches/bug_509101_upstream_5904.patch
===================================================================
--- trunk/samba/debian/patches/bug_509101_upstream_5904.patch	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/bug_509101_upstream_5904.patch	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,150 +0,0 @@
-Goal: Fix process crush when using gethostbyname_r in several threads
-
-Fixes: #509101, #510450
-
-Status wrt upstream: Fixed in 3.2.6
-
-Author: Jeremy Allison <jra at samba.org>
-
-Note: This bug induces web browser crashes (see #510450) and is a regression
-      for many desktop users in etch->lenny upgrades
-
-Index: samba-3.2.5/source/nsswitch/wins.c
-===================================================================
---- samba-3.2.5.orig/source/nsswitch/wins.c
-+++ samba-3.2.5/source/nsswitch/wins.c
-@@ -25,6 +25,14 @@
- #include <ns_daemon.h>
- #endif
- 
-+#if HAVE_PTHREAD_H
-+#include <pthread.h>
-+#endif
-+
-+#if HAVE_PTHREAD
-+static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
-+#endif
-+
- #ifndef INADDRSZ
- #define INADDRSZ 4
- #endif
-@@ -321,11 +329,16 @@
- _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he,
- 			  char *buffer, size_t buflen, int *h_errnop)
- {
-+	NSS_STATUS nss_status = NSS_STATUS_SUCCESS;
- 	struct in_addr *ip_list;
- 	int i, count;
- 	fstring name;
- 	size_t namelen;
- 		
-+#if HAVE_PTHREAD
-+	pthread_mutex_lock(&wins_nss_mutex);
-+#endif
-+
- 	memset(he, '\0', sizeof(*he));
- 	fstrcpy(name, hostname);
- 
-@@ -333,8 +346,10 @@
- 
- 	ip_list = lookup_byname_backend(name, &count);
- 
--	if (!ip_list)
--		return NSS_STATUS_NOTFOUND;
-+	if (!ip_list) {
-+		nss_status = NSS_STATUS_NOTFOUND;
-+		goto out;
-+	}
- 
- 	/* Copy h_name */
- 
-@@ -342,7 +357,8 @@
- 
- 	if ((he->h_name = get_static(&buffer, &buflen, namelen)) == NULL) {
- 		free(ip_list);
--		return NSS_STATUS_TRYAGAIN;
-+		nss_status = NSS_STATUS_TRYAGAIN;
-+		goto out;
- 	}
- 
- 	memcpy(he->h_name, name, namelen);
-@@ -354,20 +370,23 @@
- 
- 	if (get_static(&buffer, &buflen, i) == NULL) {
- 		free(ip_list);
--		return NSS_STATUS_TRYAGAIN;
-+		nss_status = NSS_STATUS_TRYAGAIN;
-+		goto out;
- 	}
- 
- 	if ((he->h_addr_list = (char **)get_static(
- 		     &buffer, &buflen, (count + 1) * sizeof(char *))) == NULL) {
- 		free(ip_list);
--		return NSS_STATUS_TRYAGAIN;
-+		nss_status = NSS_STATUS_TRYAGAIN;
-+		goto out;
- 	}
- 
- 	for (i = 0; i < count; i++) {
- 		if ((he->h_addr_list[i] = get_static(&buffer, &buflen,
- 						     INADDRSZ)) == NULL) {
- 			free(ip_list);
--			return NSS_STATUS_TRYAGAIN;
-+			nss_status = NSS_STATUS_TRYAGAIN;
-+			goto out;
- 		}
- 		memcpy(he->h_addr_list[i], &ip_list[i], INADDRSZ);
- 	}
-@@ -386,16 +405,27 @@
- 	if ((i = (unsigned long)(buffer) % sizeof(char*)) != 0)
- 		i = sizeof(char*) - i;
- 
--	if (get_static(&buffer, &buflen, i) == NULL)
--		return NSS_STATUS_TRYAGAIN;
-+	if (get_static(&buffer, &buflen, i) == NULL) {
-+		nss_status = NSS_STATUS_TRYAGAIN;
-+		goto out;
-+	}
- 
- 	if ((he->h_aliases = (char **)get_static(
--		     &buffer, &buflen, sizeof(char *))) == NULL)
--		return NSS_STATUS_TRYAGAIN;
-+		     &buffer, &buflen, sizeof(char *))) == NULL) {
-+		nss_status = NSS_STATUS_TRYAGAIN;
-+		goto out;
-+	}
- 
- 	he->h_aliases[0] = NULL;
- 
--	return NSS_STATUS_SUCCESS;
-+	nss_status = NSS_STATUS_SUCCESS;
-+
-+  out:
-+
-+#if HAVE_PTHREAD
-+	pthread_mutex_unlock(&wins_nss_mutex);
-+#endif
-+	return nss_status;
- }
- 
- 
-@@ -403,12 +433,15 @@
- _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he,
- 			   char *buffer, size_t buflen, int *h_errnop)
- {
-+	NSS_STATUS nss_status;
-+
- 	if(af!=AF_INET) {
- 		*h_errnop = NO_DATA;
--		return NSS_STATUS_UNAVAIL;
-+		nss_status = NSS_STATUS_UNAVAIL;
-+	} else {
-+		nss_status = _nss_wins_gethostbyname_r(
-+				name, he, buffer, buflen, h_errnop);
- 	}
--
--	return _nss_wins_gethostbyname_r(
--		name, he, buffer, buflen, h_errnop);
-+	return nss_status;
- }
- #endif

Deleted: trunk/samba/debian/patches/documentation-links-debian.patch
===================================================================
--- trunk/samba/debian/patches/documentation-links-debian.patch	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/documentation-links-debian.patch	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,21 +0,0 @@
-Goal: Fix documentation links
-
-Fixes: #508388
-
-Status wrt upstream: Debian-specific
-
-Note: 
-
-Index: samba-3.2.5/docs/htmldocs/index.html
-===================================================================
---- samba-3.2.5.orig/docs/htmldocs/index.html
-+++ samba-3.2.5/docs/htmldocs/index.html
-@@ -30,8 +30,4 @@
-  <td valign="top"><a href="manpages/index.html">Man pages</a></td>
-  <td valign="top">The Samba man pages in HTML.</td>
- </tr>
--<tr>
-- <td valign="top"><a href="../../WHATSNEW.txt">WHATSNEW</a></td>
--  <td valign="top">Samba Release Notes.</td>
--</tr>
- </table></body></html>

Deleted: trunk/samba/debian/patches/documentation-links.patch
===================================================================
--- trunk/samba/debian/patches/documentation-links.patch	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/documentation-links.patch	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,34 +0,0 @@
-Goal: Fix documentation links
-
-Fixes: #508388
-
-Status wrt upstream: Reported as #5968
-
-Note: 
-
-Index: samba-3.2.5/docs/htmldocs/index.html
-===================================================================
---- samba/docs/htmldocs/index.html	2008-11-27 16:48:42.000000000 +0100
-+++ samba.orig/docs/htmldocs/index.html	2008-12-14 08:40:14.841582235 +0100
-@@ -23,19 +23,15 @@
-  <td valign="top">This book provides example configurations, it documents key aspects of Microsoft Windows networking, provides in-depth insight into the important configuration of Samba-3, and helps to put all of these into a useful framework.</td>
- </tr>
- <tr>
-- <td valign="top"><a href="../using_samba/toc.html">Using Samba</a>, 2nd Edition</td>
-+ <td valign="top"><a href="using_samba/toc.html">Using Samba</a>, 2nd Edition</td>
-  <td valign="top"><i>Using Samba</i>, Second Edition is a comprehensive guide to Samba administration. It covers all versions of Samba from 2.0 to 2.2, including selected features from an alpha version of 3.0, as well as the SWAT graphical configuration tool. Updated for Windows 2000, ME, and XP, the book also explores Samba's new role as a primary domain controller and domain member server, its support for the use of Windows NT/2000/XP authentication and filesystem security on the host Unix system, and accessing shared files and printers from Unix clients.</td>
- </tr>
- <tr>
-- <td valign="top"><a href="manpages-3/index.html">Man pages</a></td>
-+ <td valign="top"><a href="manpages/index.html">Man pages</a></td>
-  <td valign="top">The Samba man pages in HTML.</td>
- </tr>
- <tr>
-  <td valign="top"><a href="../../WHATSNEW.txt">WHATSNEW</a></td>
-   <td valign="top">Samba Release Notes.</td>
- </tr>
--<tr>
-- <td valign="top"><a href="../../README.VENDOR">README.VENDOR</a></td>
--  <td valign="top">VENDOR specific information.</td>
--</tr>
- </table></body></html>

Deleted: trunk/samba/debian/patches/fhs-assignpaths.patch.old
===================================================================
--- trunk/samba/debian/patches/fhs-assignpaths.patch.old	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/fhs-assignpaths.patch.old	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,81 +0,0 @@
-Goal: Change install paths to better respect FHS. This needs fhs-newpaths.patch
-      to introduce new path variables and fhs-filespaths.patch to
-      associate files with these
-
-Fixes: #49011
-
-Status wrt upstream: Can remain Debian-specific if upstream doesn't want to
-                     change their default behaviour
-
-Index: samba-3.3.0pre2/source/param/loadparm.c
-===================================================================
---- samba-3.3.0pre2.orig/source/param/loadparm.c
-+++ samba-3.3.0pre2/source/param/loadparm.c
-@@ -120,6 +120,9 @@
- 	char *szAddPrinterCommand;
- 	char *szDeletePrinterCommand;
- 	char *szOs2DriverMap;
-+#ifdef FHS_COMPATIBLE
-+	char *szLockDirStub;
-+#endif
- 	char *szLockDir;
- 	char *szPidDir;
- 	char *szRootdir;
-@@ -3705,6 +3708,26 @@
- 		.enum_list	= NULL,
- 		.flags		= FLAG_ADVANCED,
- 	},
-+#ifdef FHS_COMPATIBLE
-+	{
-+		.label		= "lock directory",
-+		.type		= P_STRING,
-+		.p_class	= P_GLOBAL,
-+		.ptr		= &Globals.szLockDirStub,
-+		.special	= NULL,
-+		.enum_list	= NULL,
-+		.flags		= 0,
-+	},
-+	{
-+		.label		= "lock dir",
-+		.type		= P_STRING,
-+		.p_class	= P_GLOBAL,
-+		.ptr		= &Globals.szLockDirStub,
-+		.special	= NULL,
-+		.enum_list	= NULL,
-+		.flags		= 0,
-+	},
-+#else
- 	{
- 		.label		= "lock directory",
- 		.type		= P_STRING,
-@@ -3723,6 +3746,7 @@
- 		.enum_list	= NULL,
- 		.flags		= FLAG_HIDE,
- 	},
-+#endif
- 	{
- 		.label		= "pid directory",
- 		.type		= P_STRING,
-Index: samba-3.3.0pre2/source/m4/check_path.m4
-===================================================================
---- samba-3.3.0pre2.orig/source/m4/check_path.m4
-+++ samba-3.3.0pre2/source/m4/check_path.m4
-@@ -26,15 +26,15 @@
- pammodulesdir="${libdir}/security"
- configdir="${libdir}"
- swatdir="\${prefix}/swat"
--codepagedir="\${MODULESDIR}"
-+codepagedir="\${DATADIR}/samba"
- statedir="\${LOCKDIR}"
--cachedir="\${LOCKDIR}"
-+cachedir="\${VARDIR}/cache/samba"
- 
- AC_ARG_WITH(fhs,
- [AS_HELP_STRING([--with-fhs],[Use FHS-compliant paths (default=no)])],
- [ case "$withval" in
-   yes)
--    lockdir="\${VARDIR}/lib/samba"
-+    lockdir="\${VARDIR}/run/samba"
-     piddir="\${VARDIR}/run"
-     mandir="\${prefix}/share/man"
-     logfilebase="\${VARDIR}/log/samba"

Deleted: trunk/samba/debian/patches/smbd-prevent-access-to-root-filesystem-when-connect.patch
===================================================================
--- trunk/samba/debian/patches/smbd-prevent-access-to-root-filesystem-when-connect.patch	2009-02-14 18:53:09 UTC (rev 2577)
+++ trunk/samba/debian/patches/smbd-prevent-access-to-root-filesystem-when-connect.patch	2009-02-15 20:04:27 UTC (rev 2578)
@@ -1,25 +0,0 @@
-Goal: Fix Potential access to "/" in setups with registry shares enabled
-
-Fixes: CVE-2009-0022
-
-Status wrt upstream: Fixed in 3.2.7
-
-Author: Michael Adam <obnox at samba.org>
-
-Note: 
-
-Index: samba-3.2.5/source/smbd/service.c
-===================================================================
---- samba-3.2.5.orig/source/smbd/service.c
-+++ samba-3.2.5/source/smbd/service.c
-@@ -235,6 +235,10 @@
- 		return -1;
- 	}
- 
-+	if ((servicename == NULL) || (*servicename == '\0')) {
-+		return -1;
-+	}
-+
- 	if (strequal(servicename, GLOBAL_NAME)) {
- 		return -2;
- 	}




More information about the Pkg-samba-maint mailing list