diff -Nru samba-3.4.3/debian/changelog samba-3.4.3/debian/changelog --- samba-3.4.3/debian/changelog 2010-01-02 21:49:26.000000000 +0000 +++ samba-3.4.3/debian/changelog 2010-01-19 18:42:30.000000000 +0000 @@ -1,3 +1,14 @@ +samba (2:3.4.3-2ubuntu2) lucid; urgency=low + + * debian/rules, debian/samba.if-up: allow "NetworkManager" as a recognized address + family... it's obviously /not/ an address family, but it's what gets + sent when using NM, so we'll cope for now. (LP: #462169). Taken from karmic-proposed. + * debian/control: Recommend keyutils for smbfs (LP: #493565) + * debian/patches/series, debian/patches/fix-too-many-open-files.patch: Windows 7 needs + the Windows server open file handle number of 16384 handles. (LP: #462172) + + -- Chuck Short Tue, 19 Jan 2010 12:54:46 -0500 + samba (2:3.4.3-2ubuntu1) lucid; urgency=low * Merge from debian testing. Remaining changes: diff -Nru samba-3.4.3/debian/control samba-3.4.3/debian/control --- samba-3.4.3/debian/control 2009-12-28 05:01:59.000000000 +0000 +++ samba-3.4.3/debian/control 2010-01-19 18:24:49.000000000 +0000 @@ -139,7 +139,8 @@ Priority: optional Architecture: any Depends: netbase (>= 2.02), samba-common (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Suggests: smbclient, keyutils +Recommends: keyutils +Suggests: smbclient Replaces: smbfsx Description: Samba file system utilities Samba is an implementation of the SMB/CIFS protocol for Unix systems, diff -Nru samba-3.4.3/debian/patches/fix-too-many-open-files.patch samba-3.4.3/debian/patches/fix-too-many-open-files.patch --- samba-3.4.3/debian/patches/fix-too-many-open-files.patch 1970-01-01 01:00:00.000000000 +0100 +++ samba-3.4.3/debian/patches/fix-too-many-open-files.patch 2010-01-19 18:41:04.000000000 +0000 @@ -0,0 +1,80 @@ +diff -Naurp samba-3.4.3.orig/source3/include/local.h samba-3.4.3/source3/include/local.h +--- samba-3.4.3.orig/source3/include/local.h 2009-10-29 03:47:16.000000000 -0400 ++++ samba-3.4.3/source3/include/local.h 2010-01-19 13:40:30.516297386 -0500 +@@ -56,7 +56,25 @@ + #define SYSLOG_FACILITY LOG_DAEMON + #endif + +-/* ++/* ++ * Fudgefactor required for open tdb's, etc. ++ */ ++ ++#ifndef MAX_OPEN_FUDGEFACTOR ++#define MAX_OPEN_FUDGEFACTOR 20 ++#endif ++ ++/* ++ * Minimum number of open files needed for Windows7 to ++ * work correctly. A little conservative but better that ++ * than run out of fd's. ++ */ ++ ++#ifndef MIN_OPEN_FILES_WINDOWS ++#define MIN_OPEN_FILES_WINDOWS 16384 ++#endif ++ ++/* + * Default number of maximum open files per smbd. This is + * also limited by the maximum available file descriptors + * per process and can also be set in smb.conf as "max open files" +@@ -64,9 +82,9 @@ + */ + + #ifndef MAX_OPEN_FILES +-#define MAX_OPEN_FILES 10000 ++#define MAX_OPEN_FILES (MIN_OPEN_FILES_WINDOWS + MAX_OPEN_FUDGEFACTOR) + #endif +- ++ + #define WORDMAX 0xFFFF + + /* the maximum password length before we declare a likely attack */ +diff -Naurp samba-3.4.3.orig/source3/param/loadparm.c samba-3.4.3/source3/param/loadparm.c +--- samba-3.4.3.orig/source3/param/loadparm.c 2009-10-29 03:47:16.000000000 -0400 ++++ samba-3.4.3/source3/param/loadparm.c 2010-01-19 13:40:30.516297386 -0500 +@@ -4692,6 +4692,22 @@ static int max_open_files(void) + #endif + #endif + ++ if (sysctl_max < MIN_OPEN_FILES_WINDOWS) { ++ DEBUG(2,("max_open_files: sysctl_max (%d) below " ++ "minimum Windows limit (%d)\n", ++ sysctl_max, ++ MIN_OPEN_FILES_WINDOWS)); ++ sysctl_max = MIN_OPEN_FILES_WINDOWS; ++ } ++ ++ if (rlimit_max < MIN_OPEN_FILES_WINDOWS) { ++ DEBUG(2,("rlimit_max: rlimit_max (%d) below " ++ "minimum Windows limit (%d)\n", ++ rlimit_max, ++ MIN_OPEN_FILES_WINDOWS)); ++ rlimit_max = MIN_OPEN_FILES_WINDOWS; ++ } ++ + return MIN(sysctl_max, rlimit_max); + } + +diff -Naurp samba-3.4.3.orig/source3/smbd/files.c samba-3.4.3/source3/smbd/files.c +--- samba-3.4.3.orig/source3/smbd/files.c 2009-10-29 03:47:16.000000000 -0400 ++++ samba-3.4.3/source3/smbd/files.c 2010-01-19 13:40:30.516297386 -0500 +@@ -155,8 +155,6 @@ void file_close_pid(uint16 smbpid, int v + Initialise file structures. + ****************************************************************************/ + +-#define MAX_OPEN_FUDGEFACTOR 20 +- + void file_init(void) + { + int request_max_open_files = lp_max_open_files(); diff -Nru samba-3.4.3/debian/patches/series samba-3.4.3/debian/patches/series --- samba-3.4.3/debian/patches/series 2009-12-31 23:07:53.000000000 +0000 +++ samba-3.4.3/debian/patches/series 2010-01-19 18:41:24.000000000 +0000 @@ -15,3 +15,4 @@ external-talloc-support.patch autoconf.patch debian-changes-2:3.4.3-2ubuntu1 +fix-too-many-open-files.patch diff -Nru samba-3.4.3/debian/rules samba-3.4.3/debian/rules --- samba-3.4.3/debian/rules 2009-12-31 22:58:21.000000000 +0000 +++ samba-3.4.3/debian/rules 2010-01-19 18:05:22.000000000 +0000 @@ -136,6 +136,7 @@ mkdir -p $(DESTDIR)/usr/lib/cups/backend $(DESTDIR)/usr/share/samba \ $(DESTDIR)/etc/pam.d $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d \ $(DESTDIR)/etc/ufw/applications.d + $(MAKE) -C source3 install DESTDIR=$(DESTDIR) @@ -195,6 +196,8 @@ # correct place by dh_movefiles. cp debian/gdbcommands $(DESTDIR)/etc/samba/ install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba + mkdir -p $(DESTDIR)/etc/network/if-up.d + install -o root -g root debian/samba.if-up $(DESTDIR)/etc/network/if-up.d/samba dh_movefiles dh_installpam --name=samba diff -Nru samba-3.4.3/debian/samba.if-up samba-3.4.3/debian/samba.if-up --- samba-3.4.3/debian/samba.if-up 1970-01-01 01:00:00.000000000 +0100 +++ samba-3.4.3/debian/samba.if-up 2010-01-19 18:04:22.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh +# Try to bring nmbd up when an interface comes up, if smbd is already running. + +# Don't bother to do anything for lo. +if [ "$IFACE" = lo ]; then + exit 0 +fi + +# Only run from ifup. +if [ "$MODE" != start ]; then + exit 0 +fi + +# Samba only cares about inet and inet6. Get thee gone, strange people +# still using ipx. +case $ADDRFAM in + inet|inet6|NetworkManager) + ;; + *) + exit 0 + ;; +esac + +status=$(/etc/init.d/samba status) + +# Really only necessary to do anything if nmbd is not already running +if echo "$status" | grep -q 'smbd is running' \ + && ! echo "$status" | grep -q 'nmbd is running' +then + /etc/init.d/samba start +fi + +exit 0