From 4f77cf6a2a2ae4b01c02d64ca0a8fd075310bada Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 15 Oct 2002 21:36:48 +0000 Subject: updating whatsnew and merging from SAMBA_2_2 --- WHATSNEW.txt | 30 +++++++++-- packaging/Debian/debian/changelog | 59 +++++++-------------- packaging/Debian/debian/config.cache | 10 ++++ packaging/Debian/debian/libpam-smbpass.docs | 1 + packaging/Debian/debian/patches/Makefile.in.patch | 7 ++- packaging/Debian/debian/patches/fhs.patch | 19 ++++--- packaging/Debian/debian/patches/loadparm.patch | 13 +++-- packaging/Debian/debian/patches/lpq_parse.c.patch | 6 +-- packaging/Debian/debian/patches/samba.patch | 6 +-- .../debian/patches/smbclient-xfer-speed.patch | 4 +- .../Debian/debian/patches/smbmount-nomtab.patch | 12 ++--- packaging/Debian/debian/rules | 6 +-- packaging/Debian/debian/samba-common.postinst | 7 +-- packaging/Debian/debian/samba-common.postrm | 1 + packaging/Debian/debian/samba.init | 60 ++++++++++------------ packaging/Mandrake/samba-print-pdf.sh | 2 +- packaging/Mandrake/samba2.spec.tmpl | 55 ++++++++++++++++---- packaging/Mandrake/smb.conf | 10 +++- source/include/proto.h | 2 +- source/nsswitch/winbindd_group.c | 16 +++++- source/nsswitch/winbindd_user.c | 23 ++++++++- source/param/loadparm.c | 4 -- source/passdb/passdb.c | 12 ++++- source/smbd/mangle_hash2.c | 6 +-- 24 files changed, 225 insertions(+), 146 deletions(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index b9b883f4494..846e17e6177 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,14 +1,30 @@ - WHAT'S NEW IN Samba 2.2.6rc3 - 11th October 2002 + WHAT'S NEW IN Samba 2.2.6rc4 - 15th October 2002 ================================================= This is a preview snapshot of SAMBA_2_2 cvs branch. This is a non-production release provided for testing purposes only. -The following new new smb.conf(5) options have been added in this preview -release: +New Parameters +-------------- + +Refer to the smb.conf(5) man page for complete descriptions of new parameters. * profile acls (S) + +Removed Parameters +------------------ + + * max packet (G) + * packet size (G) + + +Modified Parameters +------------------- + + * max xmit (G) + + The following options have been added to Samba's configure script --with-sendfile Enable experimental sendfile support @@ -137,12 +153,18 @@ Changes since 2.2.5 80) Default all LDAP connections to v3 with compiling with --with-ldapsam -( Changes since 2.2.6rc1 ) +( Changes since 2.2.6rc2 ) 81) Fix memory leak in smbspool 82) Fix bug in mangling code that resulted in Win9x clients not being able to execute batch files in deep, non 8.3 directory paths +( Changes since 2.2.6rc3 ) + +83) Fix infinite looping bug in winbindd_getgrent() +84) Fix crash bug on 64-bit systems (merge from HEAD) +85) Fix extended character bug when setting LanMan/NT password + ========================================= diff --git a/packaging/Debian/debian/changelog b/packaging/Debian/debian/changelog index 9548b5933c7..bf9d516b186 100644 --- a/packaging/Debian/debian/changelog +++ b/packaging/Debian/debian/changelog @@ -1,55 +1,34 @@ -samba (2.2.5-0.1debian) unstable; urgency=low +samba (2.2.6-1.woody) stable; urgency=low - * This is a locally-built version of Samba for Debian. Do not pester - the Samba Team with questions about Debian packaging. Contact the - Debian Samba maintainers instead. + * New upstream version. - -- Debian User Mon, 17 Jun 2002 23:22:36 -0400 + -- Eloy A. Paris Sun, 13 Oct 2002 02:33:32 -0400 -samba (2.2.4+2.2.5-1) unstable; urgency=low +samba (2.2.5-1.woody) stable; urgency=low - * New upstream release. - * Remove patches/parse_spoolss.patch, now included upstream. - * Fixed thinko WRT POSIX ACL support, which we "half-enabled" in - 2.2.4-1. We don't use POSIX ACL support ourselves, so we'd - appreciate reports from those using this feature so we can - be sure this works. + * Upload latest stable Samba release to woody. + - includes improved NT printing support (closes: #157406) * Fix the filename-matching algorithm used for smbtar's 'exclude' functionality. (closes: #131571) + * Remove patches/srv_spoolss_nt.patch, now included upstream. + + -- Steve Langasek Fri, 23 Aug 2002 17:20:08 -0500 + +samba (2.2.3a-8) stable; urgency=low + + * maintainer script fixes backported from sid. + * reorder postinst, so that installing samba-common from scratch loads + the debconf answers properly (closes: #151985). * Look for secrets.tdb in /var/lib/samba, and handle in the postinst. This is not really a config file, because users don't edit it. (closes: #147429) - * Doxygen fix for libsmbclient.h, thanks to Tommi Komulainen - for the patch. (closes: #144847) - - -- Eloy A. Paris Tue, 28 May 2002 11:33:51 -0400 - -samba (2.2.4-1) unstable; urgency=low - - * New upstream release (closes: #144713) - * Building with POSIX ACL support (closes: #137819) - * Include samples, exclude INSTALL from libpam-smbpass (closes: #145055) - * Compile with --with-automount, for NIS homedir support (closes: #123396) - * Add a proper 'flags' field to the mount entry we write to /etc/mtab; - fixes a display bug with mount (closes: #140397) - * Added logic to /etc/init.d/samba so a help message is printed out - when Samba is running from inetd _and_ we are not booting, i.e. the - user called the init script manually. Thanks to Francesco - Potorti for the suggestion on how to implement this. - (Closes: #139807, #140204) * samba.postinst: added logic so we don't call /etc/init.d/samba if we are running from inetd (this prevents the stupid help message to be printed during package upgrades if we are running from inetd.) - * samba.prerm: idem. - * /etc/init.d/samba: delete stale PID files after nmbd and smbd are - stopped. This prevents start-stop-daemon from printing an ugly - error message when called from '/etc/init.d/samba stop'. I prefer - this than running start-stop-daemon with --oknodo because - start-stop-daemon might print other important error messages that with - --oknodo it would otherwise not print. (Closes: #102187, #109301) - * Patch from jerry@samba.org to fix parsing of spoolss structures. + * Fixed bug in the FHS migration path that causes nmbd to read its + state from one location, but write it out to another. (closes: #154210) - -- Eloy A. Paris Thu, 23 May 2002 23:16:52 -0400 + -- Steve Langasek Sat, 13 Jul 2002 10:18:56 -0500 samba (2.2.3a-7) unstable; urgency=medium @@ -98,7 +77,7 @@ samba (2.2.3a-6) unstable; urgency=low * Bring our shipped smb.conf closer in line with the upstream defaults: don't twiddle the send/recv buffer sizes, since the Linux kernel already provides a much better default setting - (closes: #80966, #80934, #137415, #133477) + (closes: #80966, #80934, #137415, #133477) * Added libnss_wins.so to the winbind package (closes: #137201) * Updates to README.debian. diff --git a/packaging/Debian/debian/config.cache b/packaging/Debian/debian/config.cache index 8872a27b761..c0a70a5b19b 100644 --- a/packaging/Debian/debian/config.cache +++ b/packaging/Debian/debian/config.cache @@ -46,6 +46,12 @@ samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} +# POSIX ACL support not present in Linux 2.2; not allowed in the +# Debian packages, even if present on the build machine. + +ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} + + # Various basic libc/compiler stuff that it's blindingly obvious that # Linux supports (now watch me get bitten for saying that) @@ -124,6 +130,8 @@ samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} # to support transparent userland VFS. We might as well preempt # any checks for shadowed symbols that are only useful for smbwrapper. +ac_cv_func___acl=${ac_cv_func___acl=no} +ac_cv_func__acl=${ac_cv_func__acl=no} ac_cv_func___chdir=${ac_cv_func___chdir=no} ac_cv_func__chdir=${ac_cv_func__chdir=no} ac_cv_func___close=${ac_cv_func___close=no} @@ -134,6 +142,8 @@ ac_cv_func___dup=${ac_cv_func___dup=no} ac_cv_func__dup=${ac_cv_func__dup=no} ac_cv_func___dup2=${ac_cv_func___dup2=no} ac_cv_func__dup2=${ac_cv_func__dup2=no} +ac_cv_func___facl=${ac_cv_func___facl=no} +ac_cv_func__facl=${ac_cv_func__facl=no} ac_cv_func___fchdir=${ac_cv_func___fchdir=no} ac_cv_func__fchdir=${ac_cv_func__fchdir=no} ac_cv_func___fcntl=${ac_cv_func___fcntl=no} diff --git a/packaging/Debian/debian/libpam-smbpass.docs b/packaging/Debian/debian/libpam-smbpass.docs index 7d4519542f5..d84796d551b 100644 --- a/packaging/Debian/debian/libpam-smbpass.docs +++ b/packaging/Debian/debian/libpam-smbpass.docs @@ -1,3 +1,4 @@ source/pam_smbpass/CHANGELOG source/pam_smbpass/README +source/pam_smbpass/INSTALL source/pam_smbpass/TODO diff --git a/packaging/Debian/debian/patches/Makefile.in.patch b/packaging/Debian/debian/patches/Makefile.in.patch index bdc23066a28..e669c4ebada 100644 --- a/packaging/Debian/debian/patches/Makefile.in.patch +++ b/packaging/Debian/debian/patches/Makefile.in.patch @@ -1,7 +1,6 @@ -diff -uNr samba-2.2.5pre1.orig/source/Makefile.in samba-2.2.5pre1/source/Makefile.in ---- samba-2.2.5pre1.orig/source/Makefile.in Tue Jun 4 15:54:14 2002 -+++ samba-2.2.5pre1/source/Makefile.in Wed Jun 12 15:25:42 2002 -@@ -714,9 +714,10 @@ +--- samba/source/Makefile.in.orig 2002-10-13 01:43:10.000000000 -0400 ++++ samba/source/Makefile.in 2002-10-13 01:43:10.000000000 -0400 +@@ -723,9 +723,10 @@ @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir) installclientlib: diff --git a/packaging/Debian/debian/patches/fhs.patch b/packaging/Debian/debian/patches/fhs.patch index bb28990a210..17777d15f8c 100644 --- a/packaging/Debian/debian/patches/fhs.patch +++ b/packaging/Debian/debian/patches/fhs.patch @@ -1,7 +1,7 @@ diff -uNr samba-2.2.5pre1.orig/source/Makefile.in samba-2.2.5pre1/source/Makefile.in --- samba-2.2.5pre1.orig/source/Makefile.in Wed Jun 12 15:26:50 2002 +++ samba-2.2.5pre1/source/Makefile.in Wed Jun 12 15:30:29 2002 -@@ -83,7 +83,7 @@ +@@ -84,7 +84,7 @@ FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\" FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" @@ -53,9 +53,9 @@ diff -uNr samba-2.2.5pre1.orig/source/include/config.h.in samba-2.2.5pre1/source diff -uNr samba-2.2.5pre1.orig/source/include/local.h samba-2.2.5pre1/source/include/local.h --- samba-2.2.5pre1.orig/source/include/local.h Tue Jan 15 10:02:37 2002 +++ samba-2.2.5pre1/source/include/local.h Wed Jun 12 15:30:29 2002 -@@ -189,4 +189,20 @@ - /* Allocation roundup. */ - #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000 +@@ -191,4 +191,20 @@ + /* Max number of jobs per print queue. */ + #define PRINT_MAX_JOBID 10000 +/* FHS-compatible directory defines */ +#ifdef FHS_COMPATIBLE @@ -77,7 +77,7 @@ diff -uNr samba-2.2.5pre1.orig/source/include/local.h samba-2.2.5pre1/source/inc diff -uNr samba-2.2.5pre1.orig/source/lib/util.c samba-2.2.5pre1/source/lib/util.c --- samba-2.2.5pre1.orig/source/lib/util.c Mon Jun 3 21:11:11 2002 +++ samba-2.2.5pre1/source/lib/util.c Wed Jun 12 15:30:29 2002 -@@ -1860,6 +1860,46 @@ +@@ -1862,6 +1862,46 @@ return fname; } @@ -180,9 +180,8 @@ diff -uNr samba-2.2.5pre1.orig/source/nsswitch/winbindd_idmap.c samba-2.2.5pre1/ DEBUG(0, ("winbindd_idmap_init: Unable to open idmap database\n")); return False; } -diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/param/loadparm.c ---- samba-2.2.5pre1.orig/source/param/loadparm.c Thu May 30 23:13:00 2002 -+++ samba-2.2.5pre1/source/param/loadparm.c Wed Jun 12 15:30:29 2002 +--- samba-2.2.5/source/param/loadparm.c.orig Tue Jun 18 21:13:45 2002 ++++ samba-2.2.5/source/param/loadparm.c Tue Jun 18 23:24:14 2002 @@ -107,6 +107,9 @@ char *szAddPrinterCommand; char *szDeletePrinterCommand; @@ -193,7 +192,7 @@ diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/pa char *szLockDir; char *szPidDir; char *szRootdir; -@@ -1025,8 +1028,13 @@ +@@ -1046,8 +1046,13 @@ {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_DOS_STRING}, {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_DOS_STRING}, @@ -210,7 +209,7 @@ diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/pa diff -uNr samba-2.2.5pre1.orig/source/printing/nt_printing.c samba-2.2.5pre1/source/printing/nt_printing.c --- samba-2.2.5pre1.orig/source/printing/nt_printing.c Thu Jun 6 08:15:02 2002 +++ samba-2.2.5pre1/source/printing/nt_printing.c Wed Jun 12 15:30:29 2002 -@@ -263,24 +263,24 @@ +@@ -262,24 +262,24 @@ if (tdb_drivers && tdb_printers && tdb_forms && local_pid == sys_getpid()) return True; diff --git a/packaging/Debian/debian/patches/loadparm.patch b/packaging/Debian/debian/patches/loadparm.patch index ccca48793fc..d8b7ab00c2f 100644 --- a/packaging/Debian/debian/patches/loadparm.patch +++ b/packaging/Debian/debian/patches/loadparm.patch @@ -1,7 +1,6 @@ -diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/param/loadparm.c ---- samba-2.2.5pre1.orig/source/param/loadparm.c Wed Jun 12 15:42:59 2002 -+++ samba-2.2.5pre1/source/param/loadparm.c Wed Jun 12 15:43:10 2002 -@@ -1128,26 +1128,26 @@ +--- samba-2.2.5/source/param/loadparm.c.orig Tue Jun 18 23:15:07 2002 ++++ samba-2.2.5/source/param/loadparm.c Tue Jun 18 23:15:07 2002 +@@ -1149,26 +1149,26 @@ case PRINT_AIX: case PRINT_LPRNT: case PRINT_LPROS2: @@ -38,7 +37,7 @@ diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/pa break; case PRINT_CUPS: -@@ -1163,19 +1163,19 @@ +@@ -1184,19 +1184,19 @@ string_set(&Globals.szPrintcapname, "cups"); #else string_set(&sDefault.szLpqcommand, @@ -65,7 +64,7 @@ diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/pa string_set(&Globals.szPrintcapname, "lpstat"); #endif /* HAVE_CUPS */ break; -@@ -1492,7 +1492,10 @@ +@@ -1515,7 +1515,10 @@ else StrnCpy(ret, s, len); @@ -75,5 +74,5 @@ diff -uNr samba-2.2.5pre1.orig/source/param/loadparm.c samba-2.2.5pre1/source/pa + StrnCpy(ret, s, len); + } - standard_sub_basic(ret); + standard_sub_basic(ret, len + 100); return (ret); diff --git a/packaging/Debian/debian/patches/lpq_parse.c.patch b/packaging/Debian/debian/patches/lpq_parse.c.patch index 37c9dc557d7..5e8d0cc1f0e 100644 --- a/packaging/Debian/debian/patches/lpq_parse.c.patch +++ b/packaging/Debian/debian/patches/lpq_parse.c.patch @@ -1,6 +1,6 @@ ---- samba-2.2.4/source/printing/lpq_parse.c.orig Wed May 1 23:14:51 2002 -+++ samba-2.2.4/source/printing/lpq_parse.c Thu May 2 00:18:30 2002 -@@ -263,6 +263,9 @@ +--- samba/source/printing/lpq_parse.c.orig 2002-07-24 09:22:49.000000000 -0400 ++++ samba/source/printing/lpq_parse.c 2002-10-13 01:43:10.000000000 -0400 +@@ -265,6 +265,9 @@ buf->status = LPQ_PAUSED; } diff --git a/packaging/Debian/debian/patches/samba.patch b/packaging/Debian/debian/patches/samba.patch index 8321307a782..e7dd4d8813e 100644 --- a/packaging/Debian/debian/patches/samba.patch +++ b/packaging/Debian/debian/patches/samba.patch @@ -133,9 +133,9 @@ become_daemon(); ---- samba-2.2.4/source/smbd/service.c.orig Wed May 1 23:15:10 2002 -+++ samba-2.2.4/source/smbd/service.c Thu May 2 00:20:44 2002 -@@ -713,6 +713,14 @@ +--- samba/source/smbd/service.c.orig 2002-10-12 11:54:24.000000000 -0400 ++++ samba/source/smbd/service.c 2002-10-13 01:43:10.000000000 -0400 +@@ -698,6 +698,14 @@ smbrun(cmd,NULL); } diff --git a/packaging/Debian/debian/patches/smbclient-xfer-speed.patch b/packaging/Debian/debian/patches/smbclient-xfer-speed.patch index adfce3ab90b..bbadda33870 100644 --- a/packaging/Debian/debian/patches/smbclient-xfer-speed.patch +++ b/packaging/Debian/debian/patches/smbclient-xfer-speed.patch @@ -1,5 +1,5 @@ ---- samba-2.2.4/source/client/client.c.orig Wed May 1 23:13:57 2002 -+++ samba-2.2.4/source/client/client.c Thu May 2 00:34:16 2002 +--- samba-2.2.2.cvs20020120/source/client/client.c.orig Wed Jan 23 23:32:44 2002 ++++ samba-2.2.2.cvs20020120/source/client/client.c Wed Jan 23 23:33:50 2002 @@ -91,10 +91,10 @@ extern file_info def_finfo; diff --git a/packaging/Debian/debian/patches/smbmount-nomtab.patch b/packaging/Debian/debian/patches/smbmount-nomtab.patch index 233356bd9ff..1cc45b68187 100644 --- a/packaging/Debian/debian/patches/smbmount-nomtab.patch +++ b/packaging/Debian/debian/patches/smbmount-nomtab.patch @@ -1,6 +1,5 @@ -diff -uNr samba-2.2.5pre1.orig/source/client/smbmnt.c samba-2.2.5pre1/source/client/smbmnt.c ---- samba-2.2.5pre1.orig/source/client/smbmnt.c Wed Jun 12 15:50:00 2002 -+++ samba-2.2.5pre1/source/client/smbmnt.c Wed Jun 12 15:50:04 2002 +--- samba-2.2.3a/source/client/smbmnt.c.orig Tue Apr 2 09:58:18 2002 ++++ samba-2.2.3a/source/client/smbmnt.c Tue Apr 2 09:58:24 2002 @@ -28,6 +28,7 @@ static uid_t mount_uid; static gid_t mount_gid; @@ -36,7 +35,7 @@ diff -uNr samba-2.2.5pre1.orig/source/client/smbmnt.c samba-2.2.5pre1/source/cli case 'r': mount_ro = 1; break; -@@ -274,36 +279,38 @@ +@@ -271,36 +276,38 @@ return -1; } @@ -102,9 +101,8 @@ diff -uNr samba-2.2.5pre1.orig/source/client/smbmnt.c samba-2.2.5pre1/source/cli return 0; } -diff -uNr samba-2.2.5pre1.orig/source/client/smbmount.c samba-2.2.5pre1/source/client/smbmount.c ---- samba-2.2.5pre1.orig/source/client/smbmount.c Wed Jun 12 15:46:02 2002 -+++ samba-2.2.5pre1/source/client/smbmount.c Wed Jun 12 15:50:04 2002 +--- samba/source/client/smbmount.c.orig 2002-10-13 01:34:58.000000000 -0400 ++++ samba/source/client/smbmount.c 2002-10-13 01:34:59.000000000 -0400 @@ -50,6 +50,7 @@ static int mount_ro; static unsigned mount_fmask; diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian/rules index db04766b9b7..d844a902ca2 100755 --- a/packaging/Debian/debian/rules +++ b/packaging/Debian/debian/rules @@ -4,6 +4,7 @@ # solve build problems) introduced in Samba 2.2.1a-5. These # modification were made by Steve Langasek . # +# $Id: rules,v 1.2.2.6 2002/10/15 21:36:46 jerry Exp $ # # Uncomment this to turn on verbose mode. @@ -75,8 +76,7 @@ configure-stamp: --with-pam_smbpass \ --with-libsmbclient \ --with-winbind \ - --with-msdfs \ - --with-automount) + --with-msdfs) touch configure-stamp @@ -178,7 +178,7 @@ install: build cp debian/smb.conf $(DESTDIR)/usr/share/samba/ cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba - # This is to comply with policy (the symlink that ldconfig would + # This is to comply with policy (the symlink that ldconfig would # produce must exist in the package). /sbin/ldconfig -n $(DESTDIR)/usr/lib/ diff --git a/packaging/Debian/debian/samba-common.postinst b/packaging/Debian/debian/samba-common.postinst index 54b5679932e..261684d61fb 100644 --- a/packaging/Debian/debian/samba-common.postinst +++ b/packaging/Debian/debian/samba-common.postinst @@ -1,18 +1,19 @@ #!/bin/sh # +# $Id: samba-common.postinst,v 1.1.4.4 2002/10/15 21:36:46 jerry Exp $ # set -e +# Do debconf stuff here +. /usr/share/debconf/confmodule + # We need a default smb.conf file. If one doesn't exist we put in place # one that has some basic defaults. if [ ! -e /etc/samba/smb.conf ]; then cp -a /usr/share/samba/smb.conf /etc/samba/ fi -# Do debconf stuff here -. /usr/share/debconf/confmodule - # ------------------------- Debconf questions start --------------------- # Is the user configuring with debconf, or he/she prefers swat/manual diff --git a/packaging/Debian/debian/samba-common.postrm b/packaging/Debian/debian/samba-common.postrm index 8a4b6d3d55e..b5451ee65a2 100644 --- a/packaging/Debian/debian/samba-common.postrm +++ b/packaging/Debian/debian/samba-common.postrm @@ -1,5 +1,6 @@ #!/bin/sh # +# $Id: samba-common.postrm,v 1.2.2.6 2002/10/15 21:36:46 jerry Exp $ # if [ "$1" = purge ]; then diff --git a/packaging/Debian/debian/samba.init b/packaging/Debian/debian/samba.init index 00b8dcbb100..b05abae866e 100644 --- a/packaging/Debian/debian/samba.init +++ b/packaging/Debian/debian/samba.init @@ -2,6 +2,7 @@ # # Start/stops the Samba daemons (nmbd and smbd). # +# $Id: samba.init,v 1.2.2.6 2002/10/15 21:36:46 jerry Exp $ # # Defaults @@ -18,18 +19,14 @@ unset TMPDIR # If Samba is running from inetd then there is nothing to do if [ "$RUN_MODE" = "inetd" ]; then - # INIT_VERSION is defined for scripts than run directly from init... - if [ "$INIT_VERSION" = "" ]; then - cat < /dev/null - then - # Stale PID file (nmbd was succesfully stopped), - # remove it (should be removed by nmbd itself IMHO.) - rm -f $NMBDPID - fi - echo -n "nmbd " + echo -n " smbd" start-stop-daemon --stop --quiet --pidfile $SMBDPID - # Wait a little and remove stale PID file - sleep 1 - if [ -f $SMBDPID ] && ! ps h `cat $SMBDPID` > /dev/null - then - # Stale PID file (nmbd was succesfully stopped), - # remove it (should be removed by smbd itself IMHO.) - rm -f $SMBDPID - fi - echo "smbd." + echo "." ;; reload) echo -n "Reloading /etc/samba/smb.conf (smbd only)" @@ -81,9 +63,19 @@ case "$1" in echo "." ;; restart|force-reload) - $0 stop - sleep 1 - $0 start + echo -n "Restarting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --stop --quiet --pidfile $NMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + echo -n " smbd" + start-stop-daemon --stop --quiet --pidfile $SMBDPID + sleep 2 + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + + echo "." ;; *) echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" diff --git a/packaging/Mandrake/samba-print-pdf.sh b/packaging/Mandrake/samba-print-pdf.sh index 5c744f0a83d..3d88f9fb885 100644 --- a/packaging/Mandrake/samba-print-pdf.sh +++ b/packaging/Mandrake/samba-print-pdf.sh @@ -33,7 +33,7 @@ fi WIN_OUTPUT="$3\\`basename $OUTPUT`" # create the PDF: -$PS2PDF $OPTOINS $INPUT $OUTPUT.pdf >/dev/null 2>&1 +$PS2PDF $OPTIONS $INPUT $OUTPUT.pdf >/dev/null 2>&1 # Generate a message to send to the user, and deal with the original file: MESSAGE=$(echo "Your PDF file has been created as $WIN_OUTPUT.pdf\n") diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl index 42bb495cbc3..f7d8131b98d 100644 --- a/packaging/Mandrake/samba2.spec.tmpl +++ b/packaging/Mandrake/samba2.spec.tmpl @@ -1,5 +1,5 @@ %define ver 2.2.5 -%define rel 17mdk +%define rel 21mdk %define vscanver 0.2.5c # 2.2.4 and 1 replace by samba-team at release @@ -13,11 +13,11 @@ %define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi) %define have_prelease %(if [ "%prelease" = `echo "prelease" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi) -# We might have a prerelease: -%define have_pre %(echo %pversion|awk '{p=0} /pre/ {p=1} {print p}') +# We might have a alpha-/beta-/pre-/rc-release: +%define have_pre %(echo %pversion|awk '{p=0} /[a-z,A-Z][a-z,A-Z]/ {p=1} {print p}') %if %have_pre -%define pre_ver %(echo %pversion|sed -e 's/pre[0-9]//') -%define pre_pre %(echo %pversion|sed -e 's/[0-9].[0-9].[0-9]//') +%define pre_ver %(perl -e '$name="%pversion"; print ($name =~ /(.*?)[a-z]/);') +%define pre_pre %(echo %pversion|sed -e 's/%pre_ver//g') %endif @@ -155,7 +155,7 @@ Source3: samba.xinetd Source4: swat_48.xpm.bz2 Source5: swat_32.xpm.bz2 Source6: swat_16.xpm.bz2 -Source7: README.samba-%{version}-%{release} +Source7: README.%{name}-mandrake-rpm %if %build_vscan Source8: samba-vscan-%{vscanver}.tar.bz2 %endif @@ -178,9 +178,16 @@ Patch32: samba-2.2.5-winbind-init.patch.bz2 Patch33: samba-2.2.5-pam-password.patch.bz2 Patch34: samba-2.2.5-win2k_copy_bug.patch.bz2 Patch35: samba-2.2.5-samba-ldap-include-conf.patch.bz2 +Patch36: samba-2.2.6-smb.conf.patch.bz2 +Patch37: samba-2.2.6-smbumount_lazy.patch.bz2 %else # Version specific patches: upcoming version %endif +# Limbo patches (applied to prereleases, but not preleases, ie destined for +# samba CVS) +%if %have_pversion && %have_pre +Patch36: samba-2.2.6-smb.conf.patch.bz2 +%endif Requires: pam >= 0.64, samba-common = %{version} BuildRequires: pam-devel autoconf readline-devel %if %build_acl @@ -229,7 +236,7 @@ docs directory for implementation details. %if %build_non_default WARNING: This RPM was built with command-line options. Please -see README.samba-%{version}-%{release} in the documentation for +see README.%{name}-mandrake-rpm in the documentation for more information. %endif @@ -505,8 +512,10 @@ echo "$RPM_EXTRA_OPTIONS" echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7} echo "an identical rpm, you need to supply the following options">>%{SOURCE7} echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7} +echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} %else echo "This rpm was built with default options">%{SOURCE7} +echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7} %endif %if %build_vscan @@ -522,7 +531,6 @@ echo "This rpm was built with default options">%{SOURCE7} %patch12 -p1 -b .buildroot %patch17 -p1 %patch18 -p1 -b .gp-reloc-fix - # Version specific patches: current version %if !%have_pversion echo "Applying patches for current version: %{ver}" @@ -535,11 +543,19 @@ echo "Applying patches for current version: %{ver}" %patch33 -p1 %patch34 -p1 %patch35 -p1 +%patch36 -p1 +%patch37 -p1 %else # Version specific patches: upcoming version echo "Applying patches for new versions: %{pversion}" %endif +# Limbo patches +%if %have_pversion && %have_pre +echo "Appling patches which should only be applied to prereleases" +%patch36 -p1 +%endif + cp %{SOURCE7} . # Make a copy of examples so that we have a clean one for doc: @@ -1121,7 +1137,7 @@ fi %defattr(-,root,root) %doc README COPYING Manifest Read-Manifest-Now %doc WHATSNEW.txt Roadmap -%doc README.samba-%{version}-%{release} +%doc README.%{name}-mandrake-rpm %doc docs %doc examples %doc swat/README @@ -1282,6 +1298,27 @@ fi %endif %changelog +* Thu Oct 10 2002 Buchan Milne 2.2.5-21mdk +- Put docs back (aka rpm sucks, builds cleanly when doc fails) +- 2.2.6-1.0.rc2.3mdk + +* Thu Oct 10 2002 Buchan Milne 2.2.5-20mdk +- Fix typo in print-pdf script +- Make spec resistant to arbitrary pre/alpha/rc/beta/iamnotfinishedyet strings + in version +- Stop filling CVS with READMEs (use README.samba-mandrake-rpm instead) +- Make example profiles share writeable by default, and add auto-creation + example (smb.conf) +- Make ps printing example remove printed files by default (smb.conf) +- Fix ntlogon example (smb.conf) + +* Thu Oct 10 2002 Sylvestre Taburet 2.2.5-19mdk +- almost 2.26 (rc2)! + +* Mon Oct 07 2002 Sylvestre Taburet 2.2.5-18mdk +- add lazy umount patch for smbumount to allow smbumount to handle + broken connection. (36) (-- ) + * Thu Sep 05 2002 Sylvestre Taburet 2.2.5-17mdk - changed localhost entry in /etc/xinetd.d/swat to 127.0.0.1 for resolving issue. diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf index f68d48cb4b3..c450490bb0c 100644 --- a/packaging/Mandrake/smb.conf +++ b/packaging/Mandrake/smb.conf @@ -324,7 +324,7 @@ #Uncomment the following 2 lines if you would like your login scripts to #be created dynamically by ntlogon (check that you have it in the correct #location (the default of the ntlogon rpm available in contribs) -;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon +;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon/ ;root postexec = rm -f /var/lib/samba/netlogon/%U.bat # Un-comment the following to provide a specific roving profile share @@ -333,6 +333,12 @@ ; path = /var/lib/samba/profiles ; browseable = no ; guest ok = yes +; writable = yes +# This script can be enabled to create profile directories on the fly +# You may want to turn off guest acces if you enable this, as it +# hasn't been thoroughly tested. +; root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \ +; then mkdir -pm700 $PROFILE; chown %u $PROFILE;fi # NOTE: If you have a CUPS print system there is no need to @@ -355,7 +361,7 @@ # print command: see above for details. # ===================================== print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers. -; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients). +; print command = lpr-cups -P %p %s -r # using cups own drivers (use generic PostScript on clients). # The following two commands are the samba defaults for printing=cups # change them only if you need different options: ; lpq command = lpq -P %p diff --git a/source/include/proto.h b/source/include/proto.h index 31c4fb73c1a..1de8e4d5fb1 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -2323,7 +2323,7 @@ BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, char *workstations); BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, char *munged_dial); BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, uint8 *pwd); BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd); -BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, char *plaintext); +BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, const char *plaintext); BOOL pdb_set_unknown_3 (SAM_ACCOUNT *sampass, uint32 unkn); BOOL pdb_set_unknown_5 (SAM_ACCOUNT *sampass, uint32 unkn); BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn); diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index 126a99763bc..68c94659ad2 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -505,10 +505,22 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) ent->sam_entry_index, ent->num_sam_entries)); if (ent->num_sam_entries == ent->sam_entry_index) { + struct getent_state *next_ent; + + /* is this the beginning ( == 0 ) or the end ? */ + + if ( ent->sam_entry_index > 0 ) { + DEBUG(10, ("end of getgrent: freeing state info for domain %s\n", ent->domain_name)); + SAFE_FREE(ent->sam_entries); + next_ent = ent->next; + DLIST_REMOVE(state->getgrent_state, ent); + SAFE_FREE(ent); + ent = next_ent; + } - while(ent && !get_sam_group_entries(ent, NULL)) { - struct getent_state *next_ent; + /* find the next domain's group entries */ + while(ent && !get_sam_group_entries(ent, NULL)) { DEBUG(10, ("freeing state info for domain %s\n", ent->domain_name)); /* Free state information for this domain */ diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c index 420a12b5473..d5eb1c379d2 100644 --- a/source/nsswitch/winbindd_user.c +++ b/source/nsswitch/winbindd_user.c @@ -458,9 +458,30 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state) /* Do we need to fetch another chunk of users? */ if (ent->num_sam_entries == ent->sam_entry_index) { + struct getent_state *next_ent; + + /* is this the beginning ( == 0 ) or the end ? */ + + /* + * for some reason this check is not needed here, but is + * in winbindd_getgrent(). I'm putting it in but ifdef'd + * out for posterity --jerry + */ +#if 0 /* NOT NEEDED APPARENTLY */ + + if ( ent->sam_entry_index > 0 ) { + DEBUG(10, ("end of getpwent: freeing state info for domain %s\n", ent->domain_name)); + SAFE_FREE(ent->sam_entries); + next_ent = ent->next; + DLIST_REMOVE(state->getgrent_state, ent); + SAFE_FREE(ent); + ent = next_ent; + } +#endif /* NOT NEEDED APPARENTLY */ + + /* find the next domain's group entries */ while(ent && !get_sam_user_entries(ent)) { - struct getent_state *next_ent; /* Free state information for this domain */ diff --git a/source/param/loadparm.c b/source/param/loadparm.c index ed205a84855..b7be1053b7a 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -181,7 +181,6 @@ typedef struct int max_xmit; int max_mux; int max_open_files; - int max_packet; int pwordlevel; int unamelevel; int deadtime; @@ -870,8 +869,6 @@ static struct parm_struct parm_table[] = { {"max xmit", P_INTEGER, P_GLOBAL, &Globals.max_xmit, NULL, NULL, 0}, {"name resolve order", P_STRING, P_GLOBAL, &Globals.szNameResolveOrder, NULL, NULL, 0}, - {"max packet", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, - {"packet size", P_INTEGER, P_GLOBAL, &Globals.max_packet, NULL, NULL, 0}, {"max ttl", P_INTEGER, P_GLOBAL, &Globals.max_ttl, NULL, NULL, 0}, {"max wins ttl", P_INTEGER, P_GLOBAL, &Globals.max_wins_ttl, NULL, NULL, 0}, {"min wins ttl", P_INTEGER, P_GLOBAL, &Globals.min_wins_ttl, NULL, NULL, 0}, @@ -1317,7 +1314,6 @@ static void init_globals(void) Globals.bLoadPrinters = True; Globals.bUseRhosts = False; - Globals.max_packet = 65535; Globals.mangled_stack = 50; Globals.max_xmit = 65535; Globals.max_mux = 50; /* This is *needed* for profile support. */ diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index a79522d5e58..517a82b94fb 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -866,6 +866,9 @@ void copy_sam_passwd(SAM_ACCOUNT *to, const SAM_ACCOUNT *from) by _api_samr_create_user() in rpc_server/srv_samr.c --jerry + + FIXME ! The new password is in UNIX character set. Must be + changed to DOS codepage before hashing. *************************************************************/ BOOL local_password_change(char *user_name, int local_flags, @@ -1660,17 +1663,22 @@ BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd) /********************************************************************* Set the user's PLAINTEXT password. Used as an interface to the above. + NB. The plaintext is in UNIX character set. Must be converted to DOS + codepage. ********************************************************************/ -BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, char *plaintext) +BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, const char *plaintext) { uchar new_lanman_p16[16]; uchar new_nt_p16[16]; + fstring dos_plaintext; if (!sampass || !plaintext) return False; - nt_lm_owf_gen (plaintext, new_nt_p16, new_lanman_p16); + fstrcpy(dos_plaintext, unix_to_dos_static(plaintext)); + + nt_lm_owf_gen (dos_plaintext, new_nt_p16, new_lanman_p16); if (!pdb_set_nt_passwd (sampass, new_nt_p16)) return False; diff --git a/source/smbd/mangle_hash2.c b/source/smbd/mangle_hash2.c index a48981dddd4..447118a6b1a 100644 --- a/source/smbd/mangle_hash2.c +++ b/source/smbd/mangle_hash2.c @@ -141,14 +141,12 @@ static BOOL cache_init(void) { if (prefix_cache) return True; - prefix_cache = malloc(sizeof(char *) * MANGLE_CACHE_SIZE); + prefix_cache = calloc(MANGLE_CACHE_SIZE, sizeof(char *)); if (!prefix_cache) return False; - prefix_cache_hashes = malloc(sizeof(u32) * MANGLE_CACHE_SIZE); + prefix_cache_hashes = calloc(MANGLE_CACHE_SIZE, sizeof(u32)); if (!prefix_cache_hashes) return False; - memset(prefix_cache, 0, sizeof(char *) * MANGLE_CACHE_SIZE); - memset(prefix_cache_hashes, 0, sizeof(char *) * MANGLE_CACHE_SIZE); return True; } -- cgit v1.2.1