diff options
author | Gerald Carter <jerry@samba.org> | 2004-05-24 15:24:19 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-05-24 15:24:19 +0000 |
commit | be04052043296dd434bd89c8519d32c44a928984 (patch) | |
tree | 1d1660dd1df57e12fb3ffc1ac2f5221e0fcf9010 | |
parent | 47b01c2f1867f5107fa0b80eba69241a837861da (diff) | |
parent | e9be798ec89f1584ff08047563a3d5c4aedd9615 (diff) | |
download | samba-be04052043296dd434bd89c8519d32c44a928984.tar.gz samba-be04052043296dd434bd89c8519d32c44a928984.tar.xz samba-be04052043296dd434bd89c8519d32c44a928984.zip |
r843: first rounds of sync's for 3.0.5pre1
222 files changed, 9070 insertions, 663 deletions
diff --git a/examples/printing/smbprint b/examples/printing/smbprint index e2bbdc2f16e..3d4b53f850a 100755 --- a/examples/printing/smbprint +++ b/examples/printing/smbprint @@ -124,6 +124,12 @@ if [ ! -O $logdir ]; then debug="" fi +touch $debugfile +if [ -h $debugfile ]; then + echo "$debugful is a symlink. Turning off debugging!" + debug="" +fi + ## ## We should be safe at this point to create the log file ## without fear of a symlink attack -- move on to more script work. diff --git a/packaging/Debian/debian/README.build b/packaging/Debian/debian-stable/README.build index 0a11a1f6ea6..0a11a1f6ea6 100644 --- a/packaging/Debian/debian/README.build +++ b/packaging/Debian/debian-stable/README.build diff --git a/packaging/Debian/debian-stable/README.build-upstream b/packaging/Debian/debian-stable/README.build-upstream new file mode 100644 index 00000000000..24d2c1c93c6 --- /dev/null +++ b/packaging/Debian/debian-stable/README.build-upstream @@ -0,0 +1,78 @@ +Building Samba Packages for Debian GNU/Linux +-------------------------------------------- + +Building Debian packages is not as hard as some people might think. +The following instructions will allow you to build your own Samba +Debian packages. These instructions and the files in packaging/Debian/ +are current as of Samba 3.0.0, and allow you to build Debian packages +for Debian unstable (so you need some development packages available +only in Debian unstable.) If you are using something newer than 3.0.0 +you might want to try to follow the instructions to see if patches +apply cleanly. If some patches don't apply cleanly please e-mail +samba@packages.debian.org since we might have fixed patches that we have +not yet integrated into upstream Samba. + +We try to maintain as much compatibility with previous releases +of Debian as possible, so it is possible that the files in +packaging/Debian/ can also be used to build Samba Debian packages for +other Debian releases. However, sometimes this is just not possible +because we need to use stuff that is only available on Debian unstable. + +Instructions +------------ + +If you want to build Samba packages for Debian and you just want to use +upstream sources, i.e. you don't want to wait for us to put official +packages out, or you want packages for a Debian version for which we +don't provide deb's, or you don't want to use official packages, or +you want to add --this-cool-switch to configure, or whatever, follow +these instructions: + +0) Make sure you have the following packages installed (in addition +to the normal Debian development packages -- dpkg-dev, libc6-dev, +devscripts, etc.): + + autoconf + debhelper + libpam0g-dev + libreadline4-dev + libcupsys2-dev + acl-dev, libacl1 + libkrb5-dev + libldap2-dev + python2.2-dev + + Notes regarding the packages required to build Samba Debian packages: + + * The libcupsys2-dev is not available in Debian Potato (Debian 2.2). + That's fine; the configure script won't detect CUPS support and the + resulting binaries won't support CUPS. + + * The list above is current as of samba-3.0.0rc2, but it can get + out of date. The best way to check what packages are required to + build the samba packages on Debian is to look for the Build-Depends: + field in the file debian/control. + +1) cd samba[-<version>]. For example, "cd samba-3.0.0rc2". +2) cp -a packaging/Debian/debian/ debian + It's important that you copy instead of symlink because the build + tools in Potato have a problem that prevents the build to work with + a symlink. +3) dch -i (this is completely optional - only do it if you understand + Debian version numbers! Don't complain later if you can't upgrade + to official versions of the Samba packages for Debian.) + - Edit the changelog and make sure the version is right. For example, + for Samba 3.0.0beta3, the version number should something like + 3.0.0beta3-0.1. +4) Run 'debian/rules binary'. + - It is better that you prefix the above command with 'fakeroot'. + If you have problems you might try building as root. +5) That's it. Your new packages should be in ../. Install with dpkg. + +Please e-mail samba@packages.debian.org with comments, questions or +suggestions. Please talk to us and not to the Samba Team. They have +better things to do and know nothing about the Debian packaging system. + +Eloy A. Paris <peloy@debian.org> +Steve Langasek <vorlon@debian.org> + diff --git a/packaging/Debian/debian-stable/README.debian b/packaging/Debian/debian-stable/README.debian new file mode 100644 index 00000000000..5ea80e32ae5 --- /dev/null +++ b/packaging/Debian/debian-stable/README.debian @@ -0,0 +1,183 @@ +0. Samba Team Notes: +This package is targeted at the current stable release of debian distribution +(woody) running on a 2.4.x kernel. +This package has been made by Simo Sorce on behalf of the Samba Team. +Do not use Debian BTS to report bugs, it's not a debian project package. +Thanks to Eloy Paris and Steve "Vorlon" Langasek for the work they've done +and continue to do on debian unstable packages. That made me possible to +build up debian packages for the Team. + + +ATTENTION: This package works correctly only with recent 2.4.x kernels due to +deep optimizations that samba uses when compiled on such kernels. + + +Original README.Debian foolows. +----------------------------------------------------------------------------- + +Samba for Debian +---------------- + +This package was built by Eloy Paris <peloy@debian.org> and Steve Langasek +<vorlon@debian.org>, current maintainers of the Samba packages for Debian, +based on previous work from Bruce Perens <Bruce@Pixar.com>, Andrew +Howell <andrew@it.com.au>, Klee Dienes <klee@debian.org> and Michael +Meskes <meskes@topsystem.de>, all previous maintainers of the packages +samba and sambades (merged together for longer than we can remember.) + +Contents of this README file: + +1. Notes +2. Upgrading from Samba 2.2 +3. Packages Generated from the Samba Sources +4. Support for NT Domains +5. Reporting bugs + + +1. Notes +-------- + +- As of Samba 2.0.6-1, the Debian version of Samba is compiled with + Pluggable Authentication Modules (PAM) support. PAM support was + discontinued during the libc5 -> libc6 migration process and I never + brought it back until 2.0.6-1. + +- The smbfs package does not support the 2.0.x Linux kernels anymore. + This has been the case since the very first packages of the CVS sources + that eventually became Samba 2.2. To use the smbfs package you need to + run a 2.2.x kernel or later. + +- Starting with the Debian packages for Samba 2.2, the Samba log files (for + nmbd and smbd) have been moved to a new location: /var/log/samba/. The + files also have new names: log.nmbd and log.smbd. The old files + (/var/log/{nmb,smb} were moved to the new location. + + +2. Upgrading from Samba 2.2 +--------------------------- + +Samba 3.0 provides greatly improved support for modern Windows systems, +including support for Unicode and LDAP. In the process, Samba 3.0 +necessarily also breaks backward compatiblity with past releases. These +issues are documented herein; if you are aware of other problems related +to upgrading from Samba 2.2, please let us know at +<samba@packages.debian.org>. + +Samba and LDAP +-------------- +Starting with Samba 2.999+3.0cvs20020723-1 we are building Samba with +LDAP support. However, the LDAP schema for Samba 3.0 differs +substantially from the schema used by many sites with Samba 2.2 (not +enabled in the Debian packages). If upgrading from an LDAP-enabled 2.2, +you will need to run the convertSambaAccount script found in +/usr/share/doc/samba-doc/examples/LDAP. A copy of the schema itself can +also be found at /usr/share/doc/samba-doc/examples/LDAP/samba.schema. + +Character Sets +-------------- +Samba 3.0 introduces support for negotiating Unicode (UCS-2LE) with +Windows clients. Owing to the close similarity between Windows and Unix +NLS charsets, in the past, many users were able to pass filenames +containing non-ASCII characters between clients and servers without +configuring Samba to know what character set was in use. Now, Samba +must be able to convert Unix filenames to Unicode before sending to the +client, so Samba must know what character set the filenames are being +converted from. If you will be sharing files with non-ASCII names, and +the filenames are not encoded with UTF-8, you will need to tell Samba +which character set to use with the 'unix charset' option. + +If you had previously specified 'character set' and 'client code page' +options under 2.2, these settings should be automatically converted for +you. + + +3. Packages Generated from the Samba Sources +-------------------------------------------- + +Currently, the Samba sources produce the following binary packages: + +samba: A LanManager like file and printer server for Unix. +samba-common: Samba common files used by both the server and the client. +smbclient: A LanManager like simple client for Unix. +swat: Samba Web Administration Tool +samba-doc: Samba documentation. +smbfs: Mount and umount commands for the smbfs (works with 2.2.x and + above kernels, not with 2.0.x kernels.) +libpam-smbpass: pluggable authentication module for SMB password + database. +libsmbclient: Shared library that allows applications to talk to SMB servers. +libsmbclient-dev: libsmbclient shared libraries. +winbind: Service to resolve user and group information from a Windows NT + server. +python2.2-samba: Python bindings that allow access to various aspects of + Samba. + +Please note that the package smbwrapper (a shared library that provides +SMB client services that existed between Samba 2.0.0-1 and Samba-2.0.5a-4 +does not exist any more. The reason is that starting with Samba 2.0.6-1, that +code does not even compile, and the upstream author (Andrew Tridgell) +recommended to disable the compilation of smbwrapper until some issues +with glibc2.1 get cleared out (the problem is with glibc, not with Samba +itself). + + +4. Support for NT Domains +------------------------- + +Samba 2.2 includes preliminary support for NT domains. A Samba server +can now be part of a Windows NT domain whose Primary Domain Controller +is a Windows NT server. This feature is supposed to be stable although I +haven't tried it myself. Read the documentation in the samba-doc package +for help on how to do this (hint: "security = domain" in the smb.conf +file). + +Samba 2.2 has also experimental support for Primary Domain +Controller. This means that a Samba server can act now as a PDC. There +are no special flags needed to compile Samba with NT domain PDC +support. Please read the NTDOM PDC FAQ at www.samba.org (Documentation +section). + +Please note that NT domain PDC support is far from complete and is still +experimental. + + +5. Reporting Bugs +----------------- + +**** NOTE: This package is distributed by the Samba Team based on Debian + packages, please submit bus to https://bugzilla.samba.org instead **** + +If you believe you have found a bug please make sure the possible bug +also exists in the latest version of Samba that is available for the +unstable Debian distribution. If you are running Debian stable this +means that you will probably have to build your own packages. And if the +problem does not exist in the latest version of Samba we have packaged it +means that you will have to run the version of Samba you built yourself +since it is not easy to upload new packages to the stable distribution, +unless they fix critical security problems. + +If you can reproduce the problem in the latest version of Samba then +it is likely to be a real bug. Your best shot is to search the Samba +mailing lists to see if it is something that has already been reported +and fixed - if it is a simple fix we can add the patch to our packages +without waiting for a new Samba release. + +If you decide that your problem deserves to be submitted to the Debian +Bug Tracking System (BTS) we expect you to be responsive if we request +more information. If we request more information and do not receive +any in a reasonable time frame expect to see your bug closed without +explanation - we can't fix bugs we can't reproduce, and most of the +time we need more information to be able to reproduce them. + +When submitting a bug to the Debian BTS please include the version of +the Debian package you are using as well as the Debian distribution you +are using. Think _twice_ about the severity you assign to the bug: we +are _very_ sensitive about bug severities; the fact that it doesn't +work for you doesn't mean that the severity must be such that it holds +a major Debian release. In fact, that it doesn't work for you it +doesn't mean that it doesn't work for others. So again: think _twice_. + + +Eloy A. Paris <peloy@debian.org> +Steve Langasek <vorlon@debian.org> + diff --git a/packaging/Debian/debian/TODO b/packaging/Debian/debian-stable/TODO index 5883f72a92b..5883f72a92b 100644 --- a/packaging/Debian/debian/TODO +++ b/packaging/Debian/debian-stable/TODO diff --git a/packaging/Debian/debian-stable/changelog b/packaging/Debian/debian-stable/changelog new file mode 100644 index 00000000000..ee4b7200ea0 --- /dev/null +++ b/packaging/Debian/debian-stable/changelog @@ -0,0 +1,2323 @@ +samba (3.0.4-1) stable; urgency=low + + * samba 3.0.4 release + * some more fixes in packaging + * fixes wrong patch for fhs compatible paths + + -- Simo Sorce <idra@samba.org> Tue, 11 May 2004 11:55:00 +0100 + +samba (3.0.3-1) stable; urgency=low + + * samba 3.0.3 release + * some more fixes in packaging + + -- Simo Sorce <idra@samba.org> Wed, 05 May 2004 03:19:00 +0100 + +samba (3.0.2a-1) stable; urgency=low + + * samba 3.0.2a release + * use original source and patch agains it + + -- Simo Sorce <idra@samba.org> Sun, 15 Feb 2004 18:36:00 +0100 + +samba (3.0.2-1) stable; urgency=low + + * samba 3.0.2 release + * fix piddir in fhs.patch to match the init scripts + + -- Simo Sorce <idra@samba.org> Tue, 10 Feb 2004 16:24:00 +0100 + +samba (3.0.1-3) stable; urgency=low + + * Make sure we install *.dat unicode tables files + * Make sure we have the correct pam file for woody + * Fix interactive menu configuration + + -- Simo Sorce <idra@samba.org> Fri, 19 Dec 2003 13:13:00 +0100 + +samba (3.0.1-2) stable; urgency=low + + * Make sure we distribute also ntlm_auth + + -- Simo Sorce <idra@samba.org> Fri, 19 Dec 2003 13:13:00 +0100 + +samba (3.0.1-1) stable; urgency=low + + * Samba Team Release + * NOTE: this package works correctly only on recent 2.4.x kernels + + -- Simo Sorce <idra@samba.org> Fri, 19 Dec 2003 13:13:00 +0100 + +samba (3.0.0-2) unstable; urgency=low + + * Samba Team Release 2 + * Fixes woody dependencies problem with acl and attr packages + + -- Simo Sorce <idra@samba.org> Thu, 28 Sep 2003 12:42:00 +0200 + +samba (3.0.0-1) unstable; urgency=low + + * Samba Team Release + + -- Simo Sorce <idra@samba.org> Thu, 25 Sep 2003 00:26:00 +0200 + +samba (3.0.0beta2+3.0.0rc4-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Sat, 13 Sep 2003 08:47:56 -0400 + +samba (3.0.0beta2+3.0.0rc3-1) unstable; urgency=low + + * New upstream release. Last Release Candidate according to the + Samba Team. Samba 3.0.0 is around the corner, in a week or so. + - Fixes use of non-PIC code in nss shared libraries (closes: #208773) + - 'unix password sync' option now runs the unix password program as + root again (closes: #209739). + * One-line patch to make packages buildable with distcc (closes: #210227) + + -- Eloy A. Paris <peloy@debian.org> Tue, 9 Sep 2003 07:57:16 -0400 + +samba (3.0.0beta2+3.0.0rc2-1) unstable; urgency=low + + * New upstream release. + * Incorporate Dutch debconf translations; thanks to Bart Cornelis + <cobaco@linux.be>. (closes: #207824) + * Link against libgnutls7 instead of libgnutls5. (closes: #208151) + + -- Eloy A. Paris <peloy@debian.org> Tue, 2 Sep 2003 21:37:13 -0400 + +samba (3.0.0beta2+3.0.0rc1-1) unstable; urgency=low + + * New upstream version (skipped samba 3.0.0beta3 due to time + constraints.) This ugly version number will go away when the final + Samba 3.0.0 is released. + * Drag new unpackaged tools into the packages: smbcquotas (smbclient), + vfs modules (samba), smbtree(1) manpage (smbclient), tdbbackup(8) + manpage (samba). (closes: #151158) + * Switch to DH_COMPAT level 4: + - no explicit conffile listings needed + - the postinst for libsmbclient is now completely autogenerated + - use the default init script handling (with support for + invoke-rc.d) in debhelper, instead of the currently buggy upgrade + path (closes: #185439) + - add support for ${misc:Depends} in control for those packages with + init scripts + * Add versioned dependency on libpam-runtime and change + /etc/pam.d/samba to use the new common PAM config blocks. + * New python2.3-samba package (old python2.2-samba is no more.) + (closes: #206171) + + -- Eloy A. Paris <peloy@debian.org> Mon, 25 Aug 2003 17:05:14 -0400 + +samba (3.0.0beta2-1) unstable; urgency=low + + * New upstream release + - The smb.conf(5) manpage documents config options again + (closes: #197963). + - Handling of winbind/idmap has been restructured; domain members + should be able to map domain accounts to local accounts again + (closes: #196815). + - Use the locale charset for 'display charset' by default + (closes: #194406). + - Fix for segfault in smbclient when using the -b option + (closes: #196833). + - Handle an empty 'passdb backend' list gracefully (closes: #193946). + * Don't set 'display charset' anymore on upgrade, since this is now + grabbed from the locale by default -- a much better option. + * Removed time.c.patch which is now in the upstream sources. + * Update FHS patch for two new tdb files (netsamlogon_cache.tdb, + privilege.tdb). + * Remove python-linker.patch, since the Kerberos package has been + fixed to no longer use rpath + * Remove configure.patch: the hppa glibc bug this was added for is + long since fixed, and upstream isn't interested in supporting this + kludge. + * Update references to missing documentation in sample smb.conf file + (closes: #187632). + * Fix handling of krb5 link line, building on a patch from Stefan + Metzmacher <metze@metzemix.de>. + * Add patch so smbclient's tar support works with popt + (closes: #194921). + + -- Steve Langasek <vorlon@debian.org> Wed, 2 Jul 2003 20:59:09 -0500 + +samba (3.0.0beta1-2) unstable; urgency=low + + * Update build-deps to libacl1-dev (>= 2.2.11-1), libacl1 (>= 2.2.11-1) + to make sure we get the right shlib dependencies (closes: #193149). + * Update the dhcp config hooks so they're suitable for sourcing (i.e., + don't call "exit") (closes: #196477). + * Bring package into line with current policy by adding support for + the DEB_BUILD_OPTIONS flag, and enabling debugging symbols (-gstabs) + by default + * Make sure libpam-smbpass is a self-contained DSO. + * Fix a typo in samba-common.dhcp that caused us to spuriously rewrite + the server list. + * Fix python install script to ignore -Wl linker flags, as seen in the + output from the latest krb5-config. + * Add LDAP and Unicode information about upgrading from 2.2 to + README.debian. + * Remove dangerous and confusing browse options from the default + smb.conf (closes: #198804). + * Reorder smb.conf options for clearer grouping, and clarify the + comments. + * Add a default [print$] share to the sample smb.conf, and create the + necessary tree under /var/lib/samba/printers. (closes: #168173) + * s/winbind/idmap/ in smb.conf, since the option names have changed. + * Fix the patch for postexec handling, so that we chdir("/") at the + right time. + + -- Steve Langasek <vorlon@debian.org> Thu, 12 Jun 2003 15:02:00 -0500 + +samba (3.0.0beta1-1) unstable; urgency=low + + * New upstream version. + - fix for empty browselist bug (closes: #194553) + - fix for tab completion segfault in smbclient (closes: #194776) + - Samba now works as a domain member again without segfaulting + (closes: #194134, #194394, #194775) + - WinXP machines can join a Samba-controlled domain again + (closes: #195362) + * Build-depend on python-dev >= 2.2 instead of on just python-dev + (without version). + * Added Vorlon'n patch to source/lib/time.c to fix #194075. + (closes: #194075) + + -- Eloy A. Paris <peloy@debian.org> Sun, 8 Jun 2003 22:26:43 -0400 + +samba (2.999+3.0.alpha24-3) unstable; urgency=low + + * Make sure Samba DSOs are compiled with -fPIC. (closes: #194324) + * Rebuild against pristine Kerberos libs, to squelch warnings about + versioned symbols. (closes: #194431, #194396) + + -- Steve Langasek <vorlon@debian.org> Thu, 22 May 2003 15:32:00 -0500 + +samba (2.999+3.0.alpha24-2) unstable; urgency=low + + * Fixed description of the smbfs package. (closes: #194183) + * Negate the sense of the unixsam check when upgrading. (closes: #194234) + + -- Steve Langasek <vorlon@debian.org> Wed, 21 May 2003 12:21:53 -0400 + +samba (2.999+3.0.alpha24-1) unstable; urgency=low + + * New upstream version. (closes: #189354) + + -- Eloy A. Paris <peloy@debian.org> Tue, 20 May 2003 13:55:57 -0400 + +samba (2.999+3.0.alpha23-5) unstable; urgency=low + + * Move the python package from section "net" to section "python". + * Make sure we use PIC code for python on all platforms. + * French translation of an additional debconf template, courtesy of + Christian Perrier <bubulle@debian.org>. (closes: #188832) + * Updated Brazilian Portuguese translation from André LuÃs Lopes + <andrelop@ig.com.br>. + * s/unixsam/guest/ everywhere, since the unixsam backend is now + deprecated. (closes: #190095) + * Create our temp config file as /etc/samba/smb.conf.dpkg-tmp; not + only does using /tmp violate SELinux policies, it introduces the + possibility of data loss during the final copy if /tmp is a separate + filesystem. (closes: #189823) + * Pull in fix for SWAT, so that logins work again + (closes: #188255, #192077). + * Move passdb.tdb into /var/lib/samba, since it's not user-editable. + * Make sure with don't ship any .cvsignore files. + * Don't ship examples for python2.2-samba and samba-doc in an + "examples" directory inside another "examples" directory. + + -- Eloy A. Paris <peloy@debian.org> Tue, 6 May 2003 12:05:46 -0400 + +samba (2.999+3.0.alpha23-4) unstable; urgency=low + + * Instead of s/LPT1:/LPT:/, we need to do s/LPT:/LPT1:/ -- now all + non-RPC printing clients are working again. + * Change shlibs to 0 instead of 0.1. The library already in the + archive is using this soname, and there are no packages depending + on libsmbclient, so skip changing the package name for now. + (closes: #188661) + + -- Steve Langasek <vorlon@debian.org> Fri, 11 Apr 2003 14:42:00 -0500 + +samba (2.999+3.0.alpha23-3) unstable; urgency=low + + * Put the Samba Python modules in /usr/lib/python2.2/site-packages/, + not in /usr/lib/python2.2/lib-dynload/. + + -- Eloy A. Paris <peloy@debian.org> Wed, 9 Apr 2003 19:49:25 -0400 + +samba (2.999+3.0.alpha23-2) unstable; urgency=low + + * New package python2.2-samba that includes the Python modules + included in the Samba sources. Feedback on these modules and the new + package is welcome, as we (Debian Samba maintainers) don't use them. + (closes: #170731, #173322) + * Move libsmbclient-dev from section "devel" to "libdevel". + * Fix panic action script to give a sensible error message instead of + an empty backtrace when we don't have permission to attach to the + process. (closes: #188164) + * Fix libpam-smbpass so that it really does something. (closes: #178245) + * Apply patch to fix printing-related segfaults. (closes: #188076) + + -- Eloy A. Paris <peloy@debian.org> Sun, 6 Apr 2003 21:40:33 -0400 + +samba (2.999+3.0.alpha23-1) unstable; urgency=high + + * new upstream release, includes security fix for DSA-262 + * tweak the debconf templates to avoid references to specific + front-ends (closes: #183718) + + -- Steve Langasek <vorlon@debian.org> Sun, 9 Mar 2003 14:58:00 -0600 + +samba (2.999+3.0.alpha21-5) unstable; urgency=low + + * touch up the package descriptions a little bit (caps, punctuation) + * remove addtosmbpass, which snuck back in when we weren't looking + * reverse the position of the wins server tag, after looking more + closely at the code (closes: #183061) + * fix a glitch in the Spanish .po that rendered it invalid, plus a typo + * updated Brazilian Portuguese templates (closes: #183295) + * fix a typo in upstream manpage (s/shave/share/) (closes: #180546) + * run sed before we run sed, to deal with crazybad special chars + in the workgroup name (!) (closes: #176717) + + -- Steve Langasek <vorlon@debian.org> Sat, 1 Mar 2003 15:14:00 -0600 + +samba (2.999+3.0.alpha21-4) unstable; urgency=low + + * add scripts to samba-common to grab the netbios-name-servers options + if we're running a DHCP client (closes: #38413) + * major rearrangement of build scripts: install target now operates on + debian/tmp, not debian/samba, so we can see when new files are + added and decide where to put them; several files that should have + been in samba-common but were in samba (for the above reason) -- + smbcacls, -- have been moved, with a replaces: added. + * Fix rc script so that whitespace is consistent between inetd and + daemon modes (closes: #174677). + * smbclient -M must always connect to port 139, because port 445 + doesn't support messaging and we can't do the port 135 stuff yet + (closes: #175292, #167859). + * Import the diff from upstream CVS, which has fixed a few bugs + (closes: #178219, #177583, #181467, #181487, #181603, #175864). + Remove a few patches of ours which are now superseded. + * Add po-debconf support to the tree, for better i18n. + * Install the libsmbclient.so symlink in the libsmbclient-dev package, + per policy (closes: #181466). + + -- Steve Langasek <vorlon@debian.org> Fri, 27 Dec 2002 00:37:00 -0600 + +samba (2.999+3.0.alpha21-3) unstable; urgency=low + + * Drop --with-ldapsam from the configure options, since this no longer + means what we thought it did. Revert patch for changing the 'passdb + backend' defaults. + * Add patch from CVS HEAD to fix pdbedit segfault; postinst script + should work better now. (Closes: #173936) + + -- Steve Langasek <vorlon@debian.org> Sun, 22 Dec 2002 13:29:00 -0600 + +samba (2.999+3.0.alpha21-2) unstable; urgency=low + + * add CONFIGDIR to the set of directories exported in the install + target, so we don't try to write to /etc/ on the autobuilders. + * Reset the default 'passdb backend' value to something sensible, so + that we don't unnecessarily break upgrading systems (closes: #173731). + + -- Steve Langasek <vorlon@debian.org> Fri, 20 Dec 2002 09:13:00 -0600 + +samba (2.999+3.0.alpha21-1) unstable; urgency=low + + * new upstream release, many patches now incorporated upstream + + -- Steve Langasek <vorlon@debian.org> Mon, 16 Dec 2002 23:39:00 -0600 + +samba (2.999+3.0.alpha20-4) unstable; urgency=low + + * Remove obsolete comments about non-existant LDAP support in the + Debian Samba packages. (Closes: #165035) + * Apply patch for segfault in pam_smbpass when using the unixsam + backend. + * Drop support for nmbd in inetd, since it's not supported by + upstream and is reported to cause problems (closes: #23243, #137726, + 165037). + * Clarify example printing configs in smb.conf (closes: #168174). + * Make sure nmbd still responds to SIGTERM if it has no interfaces to + listen on (closes: #168079). + * Fix to get samba working again on 64-bit archs, after a + pointer<->int size mismatch bug. Already fixed in upstream CVS. + * Merge fix from CVS for broken libsmbclient.h references to internal + structures (closes: #162956). + * Add a default 'panic action' for Samba that will give us genuinely + useful debugging information after a crash. + * Fixed correct patch to example configurations in the libpam-smbpass + packages (closes: #169350). + * acl-dev is not in sid anymore; Build-Depend on libacl1-dev instead + (closes: #169682). + * Only ask the user for permission to edit if there's a chance of us + damaging something. + + -- Steve Langasek <vorlon@debian.org> Mon, 18 Nov 2002 19:53:00 -0500 + +samba (2.999+3.0.alpha20-3) unstable; urgency=low + + * Make sure smbstatus behavior is sane when Samba *has* been started, + as well as when it has not (closes: #164179). Thank to Robbert Kouprie + <robbert@radium.jvb.tudelft.nl> for this patch. + * Not using 'killall' in any of the maintainer scripts (the last one + remaining was winbind.logrotate.) We now just use 'kill' to send + a SIGHUP to a specific PID (which is stored in a file in + /var/run/samba.) + * Do not depend on procps because we're not using killall anymore. + + -- Eloy A. Paris <peloy@debian.org> Tue, 15 Oct 2002 22:15:57 -0400 + +samba (2.999+3.0.alpha20-2) unstable; urgency=low + + * fix an off-by-one error in smbd/lanman.c, which should shut off the + flood of log messages (closes: #157432) + * add a --config-cache option to the configure invocation, since + autoconf 2.5 doesn't load config.cache by default (closes: #163504) + + -- Steve Langasek <vorlon@debian.org> Sat, 5 Oct 2002 01:40:00 -0500 + +samba (2.999+3.0.alpha20-1) unstable; urgency=low + + * new upstream release + - non-primary groups appear to work again (closes: #161271) + * the official beginning of the upstream 3.0 branch + * exit without error from smbstatus when no connections have + been seen yet (closes: #161489) + + -- Steve Langasek <vorlon@debian.org> Wed, 2 Oct 2002 19:02:00 -0500 + +samba (2.999+3.0cvs20020906-1) unstable; urgency=low + + * CVS update + - domain authentication works again (closes: #158698) + * Factor out common code in samba-common.config + * Handle character set settings in smb.conf on upgrade + (closes: #153913, #158770) + * Don't use killall in logrotate script; there are better ways + (closes: #160076) + * Ignore value of 'hostname lookups' for hosts allow/hosts deny + (closes: #154376) + + -- Steve Langasek <vorlon@debian.org> Sat, 7 Sep 2002 11:46:00 -0500 + +samba (2.999+3.0cvs20020829-1) unstable; urgency=low + + * CVS update. + * Move the smb.conf manpage to the samba-common package (closes: #159572) + + -- Steve Langasek <vorlon@debian.org> Thu, 29 Aug 2002 17:53:25 -0500 + +samba (2.999+3.0cvs20020827-1) unstable; urgency=low + + * CVS update. (Closes: #158508) + * Part 1 of 3 of the library separation patch that Vorlon wrote has + gone upstream - removed the patch from our patches/ directory. + * Debconf note to warn users that their smb.conf will be re-written + and changed if they use Swat to maintain it. (Closes: #158479) + * Fixed typo in samba.prerm. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Aug 2002 15:23:23 -0400 + +samba (2.999+3.0cvs20020825-2) unstable; urgency=low + + * scale back the tdbsam migration support, because of undesirable + side-effects; now always defaults to 'no'. + * strip out hyperactive library dependencies that are only needed by + smbd (closes: #155156). + * nuke any broken registry.tdb files left by previous CVS snapshots. + * support rolling back the smbpasswd->tdbsam conversion on downgrade, + since many people are likely to need to downgrade for a while. + * remove postrm handling of legacy directories, and add handling of + current ones. + + -- Steve Langasek <vorlon@debian.org> Sun, 28 Jul 2002 09:44:24 -0500 + +samba (2.999+3.0cvs20020825-1) unstable; urgency=low + + * CVS update. These packages are based on Samba 3.0alpha19 + any + code commited after 3.0alpha19 was released. + + -- Eloy A. Paris <peloy@debian.org> Sun, 25 Aug 2002 14:56:46 -0400 + +samba (2.999+3.0cvs20020723-1) unstable; urgency=medium + + * remove spurious line from samba.config + * migrate from smbpasswd to tdbsam + * re-add the pdbedit util and manpage + * compile in ldapsam support (closes: #146935) + * add PRIVATEDIR to the list of vars we override for the install + target, so Samba doesn't try to create /etc/samba (closes: #153746). + * fix makefile handling of LOGBASEDIR, so that logs always end up in + the right place (closes: 153727). + * 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) + * Make sure nmbd is always looking for wins.tdb in the same place. + + -- Steve Langasek <vorlon@debian.org> Fri, 19 Jul 2002 21:38:54 -0500 + +samba (2.99.cvs.20020713-1) unstable; urgency=low + + * first attempt for 3.0pre. + * only post a debconf note about moving logfiles if we're upgrading + from a version that had the logfiles in the old location + (closes: #152924). + + -- Steve Langasek <vorlon@debian.org> Sat, 13 Jul 2002 12:54:25 -0500 + +samba (2.2.5-2) unstable; urgency=low + + * No longer ship make_printerdef, which is deprecated. (closes: #63059) + * Clean up some empty directories from the samba package. + * Add call to dh_installinit for winbind rc.x symlinks (closes: #151860). + * Clean up per-package documentation lists, to reduce clutter + (closes: #147638). + * Make sure we don't ship pdbedit's man page since we are still using + smbpasswd passwords. (closes: #152208) + * move libnss_wins.so to libnss_wins.so.2, where glibc expects to find + it (closes: #148586). + * reorder postinst, so that installing samba-common from scratch loads + the debconf answers properly (closes: #151985). + * add lintian overrides for winbind, to eliminate some noise. + * rename pam_smbpass changelog to comply with policy. + + -- Steve Langasek <vorlon@debian.org> Sun, 23 Jun 2002 22:45:04 -0500 + +samba (2.2.5-1) unstable; urgency=low + + * New upstream release. + + -- Eloy A. Paris <peloy@debian.org> Sun, 9 Jun 2002 15:49:21 -0400 + +samba (2.2.4+2.2.5pre1-1) experimental; urgency=low + + * Getting ready for Samba 2.2.5. + * 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. + * Fix the filename-matching algorithm used for smbtar's 'exclude' + functionality. (closes: #131571) + * 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 + <Tommi.Komulainen@iki.fi> for the patch. (closes: #144847) + + -- Eloy A. Paris <peloy@debian.org> 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 <pot@gnu.org> 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. + + -- Eloy A. Paris <peloy@debian.org> Thu, 23 May 2002 23:16:52 -0400 + +samba (2.2.3a-7) unstable; urgency=medium + + * More README.debian updates. + * Neutralize the smb.conf 'lock dir' directive, which doesn't mean + what the FHS says it should, and causes us no end of grief. + (Closes: #122299) + * LPRng-handling patch so that jobs printed to recent versions of + LPRng show up properly as 'done' instead of 'paused' in the Windows + print queue. Thanks to Jaroslav Serdula <serdula_jaroslav@vse.sk> + for this patch. (Closes: #139458) + * Applied patch from Urban Widmark <urban@teststation.com> + (smbfs upstream maintainer) to add a '-n' option to smbmount + that does the same as mount's '-n'. (Closes: #139590) + * Minor tweak to unpatch-source so we unpatch sources in the + reverse order we patched them. + * Don't depend on grep in samba.prerm to determine if Samba was + running before the upgrade starts. + * Tweak the wording of debconf templates. + * Incorporate debconf translations for French, Spanish and Portuguese; + thanks to Carlos Valdivia Yagüe <valyag@hotpop.com> (es), + Andre Luis Lopes <andrelop@ig.com.br> (pt_BR), and Philippe + Batailler and Denis Barbier <barbier@debian.org> (fr). + (closes: #142657, #142659, #141551, #141699, #141682) + * Fixed symlinks in the swat package so the point to /usr/share/doc/ + instead of /usr/doc/. Added note to the description of the + swat packages that says that samba-doc must be installed for + the on-line documentation to work. Thanks to Torne Wuff + <torne@wolfpuppy.org.uk>. (Closes: #95437) + * 'dh_installinit -n' gives us no initscript handling -- we need to + handle all starting and stopping of daemons ourselves, which wasn't + happening in the {pre,post}rm scripts. + * Vary the priority of the debconf question "Do you want to generate + /etc/samba/smbpassd?" depending on whether the file already exists. + File exists -> priority 'medium', file does not exist -> priority + 'low'. Changed priorities of all other questions from 'high' to 'medium'. + + -- Steve Langasek <vorlon@debian.org> Sat, 20 Apr 2002 17:48:27 -0400 + +samba (2.2.3a-6) unstable; urgency=low + + * Call db_stop as soon as we're done with debconf in the postinst, to + avoid hanging bugs (closes: #137813) + * Ony call 'update-inetd --add' on first installation, just as we only + call 'update-inetd --remove' on package purge. + * 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) + * Added libnss_wins.so to the winbind package (closes: #137201) + * Updates to README.debian. + + -- Eloy A. Paris <peloy@debian.org> Tue, 12 Mar 2002 10:57:40 -0500 + +samba (2.2.3a-5) unstable; urgency=low + + * Having multiple workgroup lines in your smb.conf, though wacky, is + perfectly valid. Account for this in samba-common.config. + (closes: #137157) + + -- Steve Langasek <vorlon@debian.org> Sun, 10 Mar 2002 21:52:51 -0600 + +samba (2.2.3a-4) unstable; urgency=low + + * Fixed typo in samba.postinst. Cosmetic fixes there as well. + * Fix to improper usage of /usr/bin/tr in samba-common config script + (closes: #137744) + + -- Steve Langasek <vorlon@debian.org> Sat, 9 Mar 2002 14:14:02 -0500 + +samba (2.2.3a-3) unstable; urgency=medium + + * Make sure /etc/init.d/samba is executable before calling it + in the postinst. Quickly checked all other maintainer scripts + to make sure we are not calling an init script if it is not + executable. (closes: #137321) + * Fix up maintainer scripts to detect if samba was not running before + an upgrade. (closes: #33520, #130534) + * Make sure /etc/samba/ is included in the samba-common package. + Closes: #137157 + + -- Steve Langasek <vorlon@debian.org> Fri, 8 Mar 2002 11:13:21 -0500 + +samba (2.2.3a-2) unstable; urgency=low + + * merge in debconf support: + - Moved all smb.conf-related questions to samba-common (smb.conf + is part of the samba-common package, not the samba package.) + - smb.conf is not a samba-common conffile anymore since it is + being managed by debconf. It is ABSOLUTELY necessary to make + sure /etc/samba/smb.conf _NEVER_ gets overwritten by changes + made via debconf. In other words, any changes made by the user + should be honored by the debconf interface. + - samba.postinst now moves old log files from /var/log/ to + /var/log/samba/. There's a Debconf note that informs the user + the log files are stored now in a new location. + - debian/control: + + Make samba depend on debconf. + - New file debian/samba.templates. + - New file debian/samba.config. + - Re-worked debian/samba.postinst. + + Got rid of all /etc/samba/debian_config sillyness. + - remove /usr/sbin/sambaconfig; "dpkg-reconfigure samba" replaces + it. + - Removed debian/samba.prerm. + - Cleaned up /etc/init.d/samba. + + Added infrastructure for debconf. + + Got rid of all /etc/samba/debian_config sillyness. + + Got rid of /etc/samba/smbpasswd conversion stuff for + compatibility with versions of Samba < 2.0.0final-2. + (closes: #127959, #34408, #113594) + * make samba.postinst ignore the absence of /var/log/{s,n}mb*; + makes for a clean upgrade path. + * Building with MSDFS support (closes: #116793) + + -- Steve Langasek <vorlon@debian.org> Tue, 5 Mar 2002 14:14:33 -0600 + +samba (2.2.3a-1) unstable; urgency=low + + * New upstream version (closes: #135001) + * Potato builds were failing because debian/rules was not creating + debian/winbind/etc/logrotate.d/. A user having problems creating + Potato packages brought this to my attention. dh_installlogrotate + takes care of creating the directory for us, that's why we didn't + notice. + * Removed code that converts /etc/samba/smbpasswd from an ancient + format to the new format of Samba 2.0.0 and later. + Closes: #134375 - samba: postinst failed due to missing + /usr/bin/convert_smbpasswd. + * Re-organized FHS migration code in samba.postinst. Make sure we + don't fail when we move files that don't exist. + Closes: #133813 - samba: Install failed. + * Adding docs. to the libpam-smbpass package. + * Remove man pages for findsmb because we are not providing this + script. + Closes: #134181 - findsmb referenced, but not included. + * Removed replace.patch because it is now present upstream. + * Added patch from Jerry Carter to fix a problem when saving + document preferences for printing from NT clients. + * The real winbindd daemon is a forked process so we can't use + --make-pidfile when calling start-stop-daemon. Fixed + /etc/init.d/winbind to work around the issue. Thanks to + Lin Li <linl@xandros.com> for the patience and for reporting + the problems. Hopefully I got it right this time. + + -- Eloy A. Paris <peloy@debian.org> Wed, 20 Feb 2002 18:39:03 -0500 + +samba (2.2.3-6) unstable; urgency=low + + * Make sure there are actual files in /var/state/samba before trying + to move them (Closes: #133534, #133510). + * Fix up the 2.2.3 makefile so that pam_smbpass builds correctly + again. + + -- Steve Langasek <vorlon@debian.org> Tue, 12 Feb 2002 09:19:29 -0600 + +samba (2.2.3-5) unstable; urgency=low + + * Whoops, missed a spot on the samba.postinst -- will fail badly if + /var/state/samba/ no longer exists. Better get this fix into the + next upload. ;) (Closes: #133088) + * Regenerate configure only if it is older than configure.in. + * Fix smbd handling of network neighborhood lists, which was missed + in the FHS conversion (Closes: #133091) + + -- Eloy A. Paris <peloy@debian.org> Sat, 9 Feb 2002 16:37:57 -0500 + +samba (2.2.3-4) unstable; urgency=low + + * FHS cleanup; files in /var are now properly sorted according to + their nature. (Closes: #102101) + * Remove patches to source/configure, since we now call autoconf to + regenerate this file cleanly. + * lintian fixes: + - Create winbind.conffiles and add /etc/logrotate.d/winbind and + /etc/init.d/winbind to it. + - Use a relative symlink for /usr/lib/cups/backend/smb. + - Removal of a .cvsignore file in the samba-doc package. + * winbind.init fixes: + - Corrected name of the pid file (Steve) + - Make start-stop-daemon create a pid file for winbindd since it + does not create one on his own. + * #DEBHELPER# is not needed in samba.postinst because we are adding + manually everything that debhelper adds automatically. In fact, + since we are calling update-rc.d without standard paramaters I + think we can't use #DEBHELPER#. + * Fix fatal syntax error in samba.prerm. + + -- Steve Langasek <vorlon@debian.org> Thu, 7 Feb 2002 13:12:08 -0500 + +samba (2.2.3-3) unstable; urgency=low + + * work on lintian-cleanness in the package (wrong permissions, + maintainer scripts in need of debhelpering) + * /lib/security/pam_smbpass.so is now being included in the + libpam-smbpass package only, and not in both the libpam-smbpass and + samba packages (which was the case prior to 2.2.3-3.) + * Instead of making our patch scripts executable in the rules file + we run them through /bin/sh. + * New 'winbind' package that has all the winbind stuff that was in the + samba package in 2.2.3-2 and before. + * Added replace.patch: patch from Jeremy Allison to fix problems when + replacing or overwriting files in a Samba share. Patch was sent to + the samba mailing list. + + -- Eloy A. Paris <peloy@debian.org> Tue, 5 Feb 2002 21:12:48 -0500 + +samba (2.2.3-2) unstable; urgency=low + + * add support to debian/scripts/{patch-source,unpatch-source} for + automatic updating and cleaning of <version.h>. This was a request + from the Samba Team: they wanted us to clearly mark our packages + so it is always known a user is running Samba with (possibly) + Debian-specific patches. + * Change init.d killscript link to K19samba, so we stop before autofs + (closes: 117327) + * Make our patch scripts executable in the rules file -- dpkg won't do + this for us (closes: #132415). + + -- Steve Langasek <vorlon@debian.org> Mon, 4 Feb 2002 09:51:00 -0600 + +samba (2.2.3-1) unstable; urgency=low + + * New upstream release (closes: #131228). + * Restructured build system that provides DBS-like separation of + patches + * Fix typo in smbfs description (closes: #116209). + * Use killall -q in logrotate.d script, to avoid spurious cron + emails (closes: #130100). + + -- Steve Langasek <vorlon@debian.org> Sat, 2 Feb 2002 19:56:18 -0500 + +samba (2.2.2-12) unstable; urgency=high + + * (Steve) Patch for source/client/client.c. + Closes: #86438 smbclient: Transfering several GB causes the average + speed to be messed up. + * Uploading with urgency=high to expedite the move from unstable + to testing because of the security problem fixed in -11. + + -- Eloy A. Paris <peloy@debian.org> Fri, 25 Jan 2002 22:31:12 -0500 + +samba (2.2.2-11) unstable; urgency=low + + * Building with --with-libsmbclient. We have created two new + packages: libsmbclient and libsmbclient-dev. Hopefully this + will help some people that want to add the capability of + speaking SMB to their applications. + Closes: #117132 - libsmbclient support library? + * (Steve) Make swat do the right thing when reading (parsing) + the saved preferences in smb.conf. + Closes: #55617 swat mutilates the linpopup message command. + * Updated README.Debian. Updated descriptions in debian/control. + * Remembered to bump up version number in source/include/version.h + (need to automate this or else I'll keep forgetting.) + * (Steve) one liner for source/web/diagnose.c. + Closes: #106976 - smbd/nmbd not running message with swat/linuxconf. + * Added '|| true' to the post-rotate script so logrotate doesn't + fail if either nmbd or smbd is not running. + Closes: #127897 - /etc/logrotate.d/samba fails if there is no smbd process. + * Fixed incorrect file locations in swat's man page and added a + Debian-specific note to /usr/share/doc/swat/README. + Closes: #71586 swat: needs documentation fixes for debian. + * smbmount in the smbfs package does not have the setuid bit set. + Apparently, smbmount uses libsmb without checking the environment. + Thanks to Christian Jaeger <christian.jaeger@sl.ethz.ch> for + finding the local root exploit. + * Applied old patch from Jerry) Carter" <jerry@samba.org> to correct + the following two problems in Samba 2.2.2: + - %U and %G could not be used in services names + in smb.conf. + - %G would fail to be expanded in an "include = ..." + line. + + -- Eloy A. Paris <peloy@debian.org> Sat, 19 Jan 2002 21:35:26 -0500 + +samba (2.2.2-10) unstable; urgency=low + + * (Steve) Add missing manual pages. + Closes: Bug#128928: missing manpages in smbfs. + + -- Eloy A. Paris <peloy@debian.org> Sun, 13 Jan 2002 14:39:55 -0500 + +samba (2.2.2-9) unstable; urgency=low + + * (Steve) Fix broken URL's in HTML docs. + Closes: Bug#17741: bad links in html docs (at last!!!) + + -- Eloy A. Paris <peloy@debian.org> Fri, 11 Jan 2002 13:37:07 -0500 + +samba (2.2.2-8) unstable; urgency=low + + * Added "Replaces: samba (<= 2.2.2-5)" to the smbclient section in + debian/control so rpcclient.1, which was in samba-2.2.2-5, does not + cause problems now that it is part of smbclient (>= 2.2.2-6). Closes: + Closes: Bug#128684: error upgrading smbclient in sid. + + -- Eloy A. Paris <peloy@debian.org> Fri, 11 Jan 2002 11:42:40 -0500 + +samba (2.2.2-7) unstable; urgency=low + + * (Steve) Patch to make behavior honor what the docs. say about "hosts allow" + taking precedence over "hosts deny". + Closes: Bug#49249: swat: error with host deny ?! + + -- Eloy A. Paris <peloy@debian.org> Thu, 10 Jan 2002 12:36:58 -0500 + +samba (2.2.2-6) unstable; urgency=low + + * (Steve) Adds manpage for rpcclient to the proper file, + removes smbtorture from the distro because this tool isn't intended for + widespread consumption. + Closes: #63057 - no manual page for smbtorture. + * (Steve) Removed -gnu from the configure arguments (--build, --host) in + debian/rules so config.sub is able to properly create the host and target + tuples. + + -- Eloy A. Paris <peloy@debian.org> Wed, 9 Jan 2002 14:39:51 -0500 + +samba (2.2.2-5) unstable; urgency=low + + * Fixes from vorlon: + * Use /usr/bin/pager instead of more. + Closes: #125603: smbclient violates pager policy. + * Make /etc/logrotate.d/samba a conffile, send smbd and nmbd + a SIGHUP to have the log files reopened, fixes to + /etc/logrotate.d/samba. + Closes: #127897: log file rotation. + Closes: #118277: /etc/logrotate.d/samba not listed in conffiles. + * s/covert/convert/. + Closes: #121653 probable typo in install message. + + -- Eloy A. Paris <peloy@debian.org> Sun, 6 Jan 2002 03:14:58 -0500 + +samba (2.2.2-4) unstable; urgency=low + + * Applied patch from Steve to work around problem in glibc that affects the + HPPA architecure. The patch detects the error condition at configure time + and compiles without LFS support if necessary. + Closes: Bug#126763: samba completely broken on hppa. + * Including unicode_map.1251. + Closes: Bug#126719: samba-common: unicode_map.1251 missing. + * Updated smbd daemon version to match Debian package version. + Closes: Bug#127199: Package version and smbd daemon version don't match. + + -- Eloy A. Paris <peloy@debian.org> Mon, 31 Dec 2001 14:32:47 -0500 + +samba (2.2.2-3) unstable; urgency=low + + * Added some spaces in package description in debian/control. + Closes: #120730 - missing spaces in package description for nice + alignment. + * Spelling fixes. + Closes: #125328, #125329, #125330, #125367, #125365, #125403. + * Steve Langasek <vorlon@debian.org> is the co-maintainer of the Debian + Samba packages!!! Added him to the uploaders field in debian/control. + + -- Eloy A. Paris <peloy@debian.org> Tue, 18 Dec 2001 00:54:25 -0500 + +samba (2.2.2-2) unstable; urgency=low + + * Backed out changes to source/filename.c per Andrew Tridgell's request. + This changes were introduced in 2.2.1a-7 as an attempt to fix #47493. + Tridge found out that they break smbd. + * Changed version number in source/includes/version.h so it is clear that + this is a version of Samba packaged for Debian. This is another request from + Tridge and will help the Samba Team to get bogus bug reports. + * Added Samba-HOWTO-Collection.pdf and other README files to the + /usr/share/doc/<package>/ directories. + * Installing libnss_winbind.so and pam_winbind.so. + Closes: #116790: nss and pam modules for winbind missing. + * Removed user-emacs-settings from changelog. + + -- Eloy A. Paris <peloy@debian.org> Mon, 29 Oct 2001 19:16:26 -0500 + +samba (2.2.2-1) unstable; urgency=low + + * New upstream version. + * Temporary fix for #113763 (Steve Langasek) + * Quick hack to avoid smbmount reveal password length. Please note + that even with this hack there is a small window when password is + completely visible with 'ps aux'. There are other methods that should + be used to automate mounting of SMB shares. + Closes: #112195: smbmount-2.2.x reveals password length. + * Applied patch from Steve Langasek <vorlon@debian.org> to prevent + forcing use of setresuid() in Sparc. + Closes: #112779: samba build forces use of setresuid, which causes + smbd to fail on Sparc. + + -- Eloy A. Paris <peloy@debian.org> Mon, 15 Oct 2001 10:26:10 -0400 + +samba (2.2.1a-9) unstable; urgency=low + + * Replaced $(LD) with $(CC) all the way through source/Makefile. + Closes: #111036: ld shouldn't be used to link shlibs. + * s/\/bin\/mail/\/usr\/bin\/mail/ in smb.conf's man page (HTML and + sgml as well.) + Closes: #110963: smb.conf: mail should be /usr/bin/mail. + * Documented better smbclient's -W behavior. Patch from Steve + Langasek. + Closes: #53672: smbclient: -W flag is interpreted as domain, not + workgroup. + + -- Eloy A. Paris <peloy@debian.org> Tue, 4 Sep 2001 23:10:41 -0400 + +samba (2.2.1a-8) unstable; urgency=low + + * Set some reasonable default perms for the samba logdir (again, + thanks to vorlon :-) + Closes: #72529: insecure permissions on log files. + + -- Eloy A. Paris <peloy@debian.org> Sun, 26 Aug 2001 15:40:47 -0400 + +samba (2.2.1a-7) unstable; urgency=low + + * Another attempt at fixing #47493. Patch from Steve Langasek + <vorlon@netexpress.net>. Let's keep our fingers crossed Steve! + + -- Eloy A. Paris <peloy@debian.org> Sun, 26 Aug 2001 13:37:06 -0400 + +samba (2.2.1a-6) unstable; urgency=low + + * Backed out fix to #47493 introduced in 2.2.1a-4 as it is causing + smbd to die with signal 11 under some unidentified situations. + Closes: #109774: Latest debian version breaks printer driver download. + Closes: #109946: not all files appear in samba-exported directories. + * Another patch from Steve Langasek. This one adds quotes around + printer names for print systems it's reasonable for Debian to + support. Together with the patch in #29957 (see changelog for + 2.2.1a-4), this should take care of the problems with multi-word + printer names in Samba. + + -- Eloy A. Paris <peloy@debian.org> Fri, 24 Aug 2001 21:12:27 -0400 + +samba (2.2.1a-5) unstable; urgency=low + + * Important changes that affect how Samba is built on Debian + machines are implemented in this release. All of this changes + were suggested by the energetic Steve Langasek <vorlon@debian.org>, + and his arguments were so sound and reasonable that I decided + to implement them. Here's Steve's original changelog: + + * Fix up the build system to avoid needing to run configure + as root to answer questions we already know the answers to. + * In the process, make surprising progress towards being able to + cross-compile the samba packages. + + -- Eloy A. Paris <peloy@debian.org> Fri, 24 Aug 2001 01:08:06 -0400 + +samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. + Closes: #109317: smbfs: mistype in smbmount manpage. + * Included symlink to smbspool to better support CUPS printing. + Closes: #109509: include symlink for cups samba support. + * Applied patch from Steve Langasek <vorlon@netexpress.net> to + fix bug #29957. + Closes: #29957: samba strips trailing " from strings in smb.conf. + * First attempt at fixing #47493. Another patch from Steve "I want + a bug-free Samba" Langasek. + Closes: #47493: Samba doesn't handle ':' in dir names right. + + -- Eloy A. Paris <peloy@debian.org> Tue, 21 Aug 2001 23:26:38 -0400 + +samba (2.2.1a-3) unstable; urgency=low + + * Steve Langasek <vorlon@netexpress.net> has been hard at work in + the last few days looking at the long list of open bugs filed + against the Samba packages. I don't know how to thank him. It's been + a pleasure working with Steve, and all the fixes, patches, etc. in + this release come from him. The bug list is greatly reduced thanks + to Steve's efforts. + * Steve's additions/modifications/patches/etc. are: + - New package that (libpam-smbpass) provides pam_smbpass. Before, this + was provided in another package but now the sources are part of + the Samba sources so we can start providing it from here. + Closes: #107043 - pam_smbpass now present in Samba source, + should be built from there + - Patch to source/smbd/service.c that allows admins to call + /bin/umount from the root postexec of a Samba share. + Closes: #40561 - samba pre/postexec commands do not work. + - Clear TMPDIR before starting smbd in /etc/init.d/samba. + Closes: #51295 - Problems with Samba and TMPDIR. + - Correction to documentation of "guest only". + Closes #38282 - "guest only" share still requires a password. + * Applied patch from Santiago Vila <sanvila@unex.es> to convert + /usr/sbin/mksmbpasswd from a shell script into a real awk script. + Sorry it took so long, Santiago; I hadn't realized you even + provided a patch :-) + Closes: #77891 - mksmbpasswd could be a real awk script. + * Updated description of the smbfs and smbclient packages. Also have + each package recommend the other. + Closes: #108650: Should suggest or recommend smbfs. + + -- Eloy A. Paris <peloy@debian.org> Mon, 13 Aug 2001 22:21:55 -0400 + +samba (2.2.1a-2) unstable; urgency=low + + * Build-depends: depend on debhelper (>=2.0.103). + Closes: #105795: Build-Depends are wrong. + * Run samba's preinst and postinst scripts without -e so failed commands + do not abort installation. + Closes: #106384: postinstall crashes abnormally. (And really closes + #104471.) + + -- Eloy A. Paris <peloy@debian.org> Thu, 26 Jul 2001 00:30:37 -0400 + +samba (2.2.1a-1) unstable; urgency=low + + * New upstream version. + * Make sure samba's postinst script exits with a zero status. + Closes: #104471: Samba postinst problem. + + -- Eloy A. Paris <peloy@debian.org> Thu, 12 Jul 2001 21:55:21 -0400 + +samba (2.2.1-1) unstable; urgency=low + + * New upstream version. + Closes: #103339: config.guess and config.sub update required. + Closes: #98518: Samba 2.2 can't act as PDC for NT4/W2K due to + incompatibility with PAM. + Closes: #97447: nmbd crashes due to bugs in DAVE 2.5.2. + Closes: #95777: Samba 2.2 is unable to join or authenticate against + Samba 2.2 PDC domain. + Closes: #68842: samba should use PAM for password changing (I + haven't personally tried this one, but it's been + advertised this works.) + Closes: #102506: PAM account checking fails. + Closes: #102518: Complains about unknown paramter "obey pam + restrictions" + Closes: #94774: Build failure on PARISC machines. + * Moved away from /etc/cron.weekly/samba for log file rotation. + Now using logrotate. + Closes: #95548: typo in /etc/cron.weekly/samba. + Closes: #74951: nmbd does not rename its log file. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris <peloy@debian.org> Wed, 11 Jul 2001 00:44:14 -0400 + +samba (2.2.0.final.a-1) unstable; urgency=high + + * New upstream version (contains security fix from DSA-065-1.) + Closes: #97241: samba 2.2.0 fails to process hostnames in + "hosts allow" config line. + * Removed Debian-specific addtosmbpass.8 man page since this script + is not longer provided upstream. Users should use the smbpasswd + program instead. + Closes: #98365: addtosmbpass is missing from 2.2.0.final-2. + * Updated sample /etc/samba/smb.conf to reflect the recent changes + affecting handling of PAM authentication. Also updated + /etc/pam.d/samba. + + -- Eloy A. Paris <peloy@debian.org> Sun, 24 Jun 2001 11:11:59 -0400 + +samba (2.2.0.final-2) unstable; urgency=low + + * Added libcupsys2-dev to Build-Depends. + * Samba depends now (again) on netbase so update-inetd is always + available for the Samba maintainer scripts. + Closes: #86063: Fails to uninstall if inetd is not installed. + * Updated source/config.{sub,guess} so ARM built doesn't fail. + Closes: #94480: config.sub out of date; can't build on arm. + Closes: #85801: config.sub/guess out of date. + * Not using brace expansion, i.e. {foo,bar} in any of the maintainers + scripts nor in debian/rules. + Closes: #88007: samba postrm has is not POSIX sh compliant. + + -- Eloy A. Paris <peloy@debian.org> Sat, 21 Apr 2001 17:27:18 -0400 + +samba (2.2.0.final-1) unstable; urgency=low + + * New upstream release. Lots of new things. See WHATSNEW.txt. + * Goofy version number because of my stupidity when assigning version + numbers to the CVS packages I have been uploading to experimental. + Will be fixed when 2.2.1 is released. I've no doubts a 2.2.1 release + will follow soon. + + -- Eloy A. Paris <peloy@debian.org> Tue, 17 Apr 2001 22:58:14 -0400 + +samba (2.2.0.cvs20010416-1) experimental; urgency=low + + * CVS update. + + -- Eloy A. Paris <peloy@debian.org> Mon, 16 Apr 2001 21:25:15 -0400 + +samba (2.2.0.cvs20010410-1) experimental; urgency=low + + * CVS update. + * Added libreadline4-dev to Build-Depends. + + -- Eloy A. Paris <peloy@debian.org> Tue, 10 Apr 2001 16:53:45 -0400 + +samba (2.2.0.cvs20010407-1) experimental; urgency=low + + * CVS update. Includes what is in 2.2.0alpha3. + + -- Eloy A. Paris <peloy@debian.org> Sat, 7 Apr 2001 16:00:33 -0400 + +samba (2.2.0.cvs20010316-1) experimental; urgency=low + + * Started working on Samba 2.2.0. Using the SAMBA_2_2_0 branch + from Samba CVS. + * Not compiling rpctorture as it has compile errors. Change in + debian/rules. + * Removed Linux kernel 2.0.x and smbfs compatibility baggage. Now + the smbfs does not support 2.0.x kernels; a kernel > 2.2.x is + needed to use smbfs. Updated debian/control, debian/rules and + README.Debian to reflect this change. + * Added to swat a versioned dependency on samba (so a user is forced to + install a new version of swat each time a new version of samba is + installed.) + + -- Eloy A. Paris <peloy@debian.org> Sun, 18 Mar 2001 14:21:14 -0500 + +samba (2.0.7-5) unstable; urgency=medium + + * Transition from suidmanager to dpkg-statoverride. + + -- Eloy A. Paris <peloy@debian.org> Thu, 18 Jan 2001 23:51:56 -0500 + +samba (2.0.7-4) unstable; urgency=medium + + * Applied Urban Widmark <urban@teststation.com> fixes to smbmount. Urban + is the maintainer of the smbfs in the kernel and of the userland + utilities. + * Links to HTML documents are correct now. + Closes: #69439: swat: Broken help file symlinks + Closes: #72615: samba-doc directory changed: removed htmldocs from path + Closes: #75847: swat: Wrong symlink + Closes: #66857: Wrong links to html documents. + Closes: #77912: misplaced documentation symlinks for swat + * Building Samba with CUPS support. For this I reverted the change to + source/configure.in that I did in 2.0.7-3 and re-ran autoconf. + Closes: #59038: samba: not compiled with cups support. + * Fix against previous known/unknown user time difference patch to swat + (make username / password lookups take the same time.) Remove CGI + logging code in Swat. + Closes: #76341 - Security holes in swat + * Updated Build-depends. + * Updated debian/copyright to refer to the correct location of the GPL. + * debian/rules: changed DESTDIR to `pwd`/debian/samba (was + `pwd`/debian/tmp.) + * debian/rules: added '--sourcedir=debian/samba' to dh_movefiles (for some + strange reason dh_installdirs is not creating debian/tmp/ so I needed + to tweak everything to install stuff in debian/samba rather than in + debian/tmp.) + * debian/control: changed section of samba-docs to 'doc' (was 'docs') + * Using relative symlinks in /usr/share/samba/swat/ (changed debian/rules + and source/scripts/installswat.sh.) + * Fixed (by tweaking debian/rules) + /usr/bin/{smbmnt,smbumount-2.*,smbmount-2.*} to be suid. + * Added "Provides: samba-client" to smbclient's section in control. + Closes: #71143: smbclient: Smbclient should provide samba-client. + * Fix for desired_access being zero in map_share_mode() (patch to + source/smbd/nttrans.c.) Thanks to Gary Wilson + <wilsong@sergievsky.cpmc.columbia.edu> for bringing this patch to my + attention. + * Hacked source/lib/util_sec.c so smbd works fine in both 2.0.x and + 2.2.x kernels even when the build is done in a system running + a 2.2.x kernel. + Closes: #78858: samba-common: samba2.0.7 needs kernel 2.2.x but + doesnt depend on it. + Closes: #72758: README.Debian should comment on 2.0.x kernels. + Closes: #56935: Samba 2.0.6 and Kernel 2.0.x. + Closes: #58126: Samba 2.0.6 and Kernel 2.0.x -- more info. + Closes: #60580: samba: failed to set gid. + Closes: #64280: Samba panics, can't set gid. + Closes: #66816: Must deal with brokenness under 2.0.x. + Closes: #67682: potatoe samba 2.0.7-3 out of order, 2.0.5a-1 OK. + Closes: #69735: PANIC: failed to set gid + Closes: #66122: "smbclient -L localhost -U%" returns with "tree + connect failed: code 0". + Closes: #57637: Samba says tree connect error. + Closes: #58015: potato samba wins support is broken. + * Fixed comments in sample smb.conf to point to the correct location. + Closes: #69578: comments in smb.conf points to wrong path. + * Move codepages from /etc/samba/codepages/ to + /usr/share/samba/codepages/. + Closes: #63813: samba; codepages should go in /usr/lib. + * Moved /var/samba/ to /var/state/samba/. + Closes: #49011: samba package not FHS compliant. + * Hacked source/configure.in (and re-ran autoconf) so yp_get_default_domain() + is found. + Closes: #44558: netgroup support missing in samba 2.0.5a-1. + * /etc/init.d/samba was calling start-stop-daemon with both --pidfile and + --exec. Got rid of --exec so --pidfile works. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Jan 2001 00:15:57 -0500 + +samba (2.0.7-3) frozen unstable; urgency=high + + * Release manager: this closes a RC bug. + * Commented out the section in source/configure.in that auto-detects + CUPS support and then ran autoconf to generate a new configure + script. This was done to prevent machines that have libcupsys-dev + installed from detecting CUPS support and adding an unwanted + dependency on libcupsys. This way the whole printing system + won't break on upgrades. CUPS support should be added after + Potato is released. + Closes: #65185: samba-common: Upgrading removes printing system. + Closes: #64496: smbfs: smbfs on powerpc has a dependency on cupsys. + * Updated README.debian. + Closes: #64594: Old README.Debian in /usr/share/doc/samba. + + -- Eloy A. Paris <peloy@debian.org> Tue, 20 Jun 2000 19:16:04 -0400 + +samba (2.0.7-2) frozen unstable; urgency=high + + * Release manager: this closes RC bug #63839 that prevents Samba + to be built from source. + * Fixed a stupid typo in debian/rules that was preventing Samba + to be built from source. + Closes: #63839: samba_2.0.7-1(frozen): build error (SAMBABOOK dir) + * I forgot to mention that O'Reilly's book "Using Samba" was donated + to the Open Source community. The book was included in Samba 2.0.7 + in HTML format and is part of the Debian Samba package since + Samba 2.0.7-1. + * In Samba 2.0.7-1, the "Using Samba" book and a number of HTML help + files were supposed to be provided in both the swat and the samba-doc + packages. This duplication was a waste of space. Starting with + Samba 2.0.7-2, swat recommends samba-doc and the book and the HTML + files are included only in samba-doc, and are accessed via symlinks + from within swat. + Closes: #58810: superfluous files in swat? + * Added a 'echo "."' to /etc/init.d/samba in the reload) section. + Closes: #63394: "echo ." missing in reload section of init.d script + * Fixed typo in docs/htmldocs/using_samba/ch06_05.html. + Closes: #64344: typo "encrypted passwords" + * Cleaned up samba's postrm script so important common files aren't + deleted when samba is purged. Created a samba-common.postrm script. + Closes: #62675: purging samba removes /etc/samba/smb.conf. + Closes: #63386: samba --purge removes /etc/samba dir even though + smbclient/smbfs/samba-common packages are still installed + + -- Eloy A. Paris <peloy@debian.org> Wed, 3 May 2000 02:42:07 -0400 + +samba (2.0.7-1) frozen unstable; urgency=low + + * New upstream version. Dear Release Manager: please allow this + package to go to frozen as it contains fixes to a _lot_ of problems. + You can take a look at all the problems fixed by this release in + the official upstream announcement at + http://us1.samba.org/samba/whatsnew/samba-2.0.7.html. + * Added --with-utmp to add utmp support to smbd (this is new in Samba + 2.0.7) + * Closes: #62148 - samba not rotating filled logs. + * Closes: #56711: Samba doesn't manage well long share name (please note + that it's possible to connect to shares with names longer than + 14 characters but the share will be listed with a name truncated to + 13 characters.) + * Closes: #51752 - NT DOMAIN - NET USE * /HOME not mapping (error 67). + Closes: #50907 - logon path not working. + This is not a bug, it's just Samba doing the same thing an NT server + does. See WHATSNEW.txt and smb.conf's man page for details. + * Closes: #48497 - error executing smbsh in debian-potato. (smbwrapper + is not supported anymore.) + * Closes: #58994 swat: typo in swat description. + * Closes: #45931 - Samba dies with SIGILL on startup. (Hardware + problems, person that reported the bug never came back.) + Closes: #54398 - smbadduser fails, looks for ypcat. + * Fixed swat's man page to include Debian specific installation + instructions. There's not necessary to edit /etc/services or + /etc/inetd.conf. + (Closes: #58616 - incomplete install config && incorrect installation + instructions.) + * s/SBINDIR/\"/usr/sbin\"/g in source/web/startstop.c to prevent swat + to look for smbd and nmbd in the wrong place when requested to start or + stop smbd or nmbd. + (Closes: #55028 - swat can't start samba servers.) + * Closes: #37274: smbclient does not honour pot. (Tested and seems to be + working now.) + * Not confirmed, but should fix #56699, #62185, #56247, #52218, #43492, + #50479, #39818, #54383, #59411. + (please re-open any of this if the problem still exists - I was unable + to confirm any of this because I could never reproduce them.) + Closes: #56699 - Samba's nmbd causes random kernel oops several + times in a row. + Closes: #62185 - nmbd's forking until no more file descriptors are + available. + Closes: #56247 - session setup failed: ERRSRV - ERRbadpw. + Closes: #52218 - Either wins proxy does not work, or I don't understand + it. + Closes: #43492 - intermittent problem changing password. + Closes: #50479 - Can't access windows 2000 shares with samba. + Closes: #39818 - samba-common: Upgrading Samba from the Slink version. + Closes: #54383 - samba-common: Missing /etc/smb.conf. + Closes: #59411 - smbclient: cannot browse Win2k shares. + + -- Eloy A. Paris <peloy@debian.org> Thu, 27 Apr 2000 16:07:45 -0400 + +samba (2.0.6-5) frozen unstable; urgency=low + + * Oppsss! samba-common doesn't depend on libcupsys1 so the binaries + in this package are broken unless libcupsys1 is installed. + samba-common has a "grave" bug because of this. Instead of adding + libcupsys1 to the Depends: list of each package in debian/control + I investigated why dh_shlibs was not picking the dependency + automatically. It turns out that it's probably a bug in libcupsys1 + because the format of its shlibs file is not correct. I fixed that + file (/var/lib/dpkg/info/libcupsys1.shlibs) and now dependencies are + picked correctly. I'll talk to the libcupsys1 maintainer. + + I think the addition of CUPS support to Samba is a big change that + should not go into Frozen. So, I decided to back up the addition + of CUPS support I did in 2.0.6-4 to minimize problems. I'll add + CUPS support again when I start working on Samba for Woody. + (Closes: #59337 - samba-common has a missing dependency) + + -- Eloy A. Paris <peloy@debian.org> Wed, 1 Mar 2000 08:40:02 -0500 + +samba (2.0.6-4) frozen unstable; urgency=low + + * It seems that sometimes nmbd or smbd are not killed when upgrading. + I think it is because in samba's prerm script I was calling + start-stop-daemon with the --pidfile switch and in old versions of + Samba the nmbd and smbd daemons did not store their PIDs in a file in + /var/samba/. I changed debian/samba.prerm so the existence of the + PID files is checked before calling "start-stop-daemon --pidfile ..." + If the PID files do not exist then start-stop-daemon is called + without the --pidfile parameter. + (Closes: #58058 - upgrade from slink went badly) + * Fixed typo in description of swat package in debian/control. + * Installed libcupsys1-dev so the configure script picks up CUPS + and Samba is compiled with CUPS support. Also added libcupsys1 to + the Depends: list of package samba in debian/control. + (Closes: #59038 - samba not compiled with cups support) + * Added a small paragraph to debian/README.debian warning about possible + problems with the WINS code in Samba 2.0.6. + + -- Eloy A. Paris <peloy@debian.org> Mon, 28 Feb 2000 14:00:42 -0500 + +samba (2.0.6-3) frozen unstable; urgency=low + + * Applied patch posted by Jeremy Allison to the samba mailing list + that should take care of the internal errors reported in bug #52698 + (release-critical). Wichert: please test as I never could reproduce + it here. + (Closes: #52698 - samba gets interbal errors) + * Moved samba-docs to the 'docs' section. + (Closes: #51077 - samba-doc: wrong section) + * Added reload capability to /etc/init.d/samba (only for smbd because + nmbd does not support reloading after receiving a signal). + (Closes: #50954 - patch to add reload support to /etc/init.d/samba) + * Corrected "passwd chat" parameter in sample /etc/samba/smb.conf so + Unix password syncronization works with the passwd program currently + in Potato. Thanks to Augustin Luton <aluton@hybrigenics.fr> for + the correct chat script. + * Stole source/lib/util_sec.c from the CVS tree of what will become + Samba 2.0.7 or whatever so we can use the same binaries under + both 2.0.x and 2.2.x kernels. + (Closes: #51331 - PANIC: failed to set gid) + * smbadduser is now provided as an example and it's customized for Debian. + I am not providing this script in /usr/sbin/ because then I would need + a dependency on csh, something that I don't want to do. + (Closes: #51697, #54052) + * Fixed the short description of the smbfs package in debian/control. + (Closes: 53534 - one-line description out of date). + + -- Eloy A. Paris <peloy@debian.org> Tue, 23 Nov 1999 16:32:12 -0500 + +samba (2.0.6-2) unstable; urgency=low + + * samba-common now depends on libpam-modules (not on libpam-pwdb, which + I have been told is obsolete). I modified /etc/pam.d/samba accordingly + to reflect the change. + (Closes: Bug#50722: pam pwdb dependence?). + * The old /etc/pam.d/samba file which had references to pam_pwdb caused + smbd to die with a signal 11. The new /etc/pam.d/samba file fixes + this problem. + (Closes: #50876, #50838, #50698) + * Compiled with syslog support (use at your own risk: syslog support + is still experimental in Samba). I added the parameters "syslog = 0" + and "syslog only = no" to the sample smb.conf to avoid pestering + users that do not want Samba to log through syslog. + (Closes: Bug#50703 - syslog only option doesn't work) + * Removed the stupid code in the smbmount wrapper script that tries + to load the smbfs module if smbfs is not listed in /proc/filesystems. + (Closes: Bug#50759 - Non-root can't run smbmount if SMBFS is compiled + as a module in the kernel) + * Added /bin/mount.smb as a symlink pointing to /usr/bin/smbmount so + 'mount -t smb ...' works just as 'mount -t smbfs ...'. + (Closes: Bug#50763 - 'mount -t smb' doesn't work) + + -- Eloy A. Paris <peloy@debian.org> Sat, 20 Nov 1999 18:53:35 -0500 + +samba (2.0.6-1) unstable; urgency=low + + * Samba 2.0.6 has been released. This is the first try of the Debian + Samba packages. I know for sure that smbd won't work properly on + 2.0.x kernels because the patch that Wichert sent me does not apply + to the new source/lib/util_sec.c in Samba 2.0.6. That file was + completely re-written by Tridge. + * Updated README.Debian. + * A new client utility called smbspool appeared in Samba 2.0.6. I added + this utility to the smbclient package, although I haven't tried it yet. + * Added the symlink /sbin/mount.smbfs that points to /usr/bin/smbmount. + This is to be able to type "mouont -t smbfs ...". This symlink goes + in the smbfs package, of course. + * This new release should close the following bugs (some of these + are fixed for sure in this new upstream release, some others I could + not reproduce but I believe they are fixed if they were real bugs. + As always, please feel free to re-open the bugs if the problem is not + solved). + Closes: Bug#33240: icmp mask needs a bug workaround. + Closes: Bug#37692: samba: Has problems detecting interfaces. + Closes: Bug#38988: samba: Truly bizzare behavour from nmbd. + Closes: Bug#46432: samba-2.0.5a-2: nmbd does not appear to broadcast + properly. + Closes: Bug#44131: smbfs: no longer possible to set file and + directory-modes. + Closes: Bug#46992: smbmount-2.2.x manpage wrong. + Closes: Bug#42335: smbfs: missing options from the new 2.2.x commandline. + Closes: Bug#46605: smbmnt segfaults. + Closes: Bug#48186: smbmount. + Closes: Bug#38040: smbfs: Please add /sbin/mount.smb [included]. + Closes: Bug#47332: smbmount: could -f and -P be added back? + * Samba has been compiled with PAM support (closes: Bug#39512 - samba PAM + module). To succesfully add PAM support, I created /etc/pam.d/samba and + added this file as a conffile for the samba-common package. I also made + samba-common depend on libpam-pwdb. + * Added simple man pages for the wrapper scripts smbmount and smbmount. + (Closes: Bug#44705 - Missing smbmount man page) + * Installed libreadlineg2-dev in my system so smbclient now has a + "history" command and libreadline support :-) + * This time I did add a check to the smbmount wrapper script to see if + the kernel has support for smbfs, as suggested by Jeroen Schaap + <J.Schaap@physiology.medfac.leidenuniv.nl>. I mentioned in the changelog + for samba-2.0.5a-3 that I did this but I forgot at the end. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Nov 1999 12:08:15 -0500 + +samba (2.0.5a-5) unstable; urgency=low + + * I am sorry to report that the smbwrapper package is gone for the + moment. The reason for this is twofold: first of all, smbwrapper + is completely broken in Samba-2.0.5a (it compiles but it doesn't + run) and in the upcoming Samba-2.0.6 it doesn't even compile. Second, + when I asked Andrew Tridgell (father of Samba) about the state of + smbwrapper he told me that Ulrich Drepper (head of the glibc project) + broke on purpose the glibc stuff in which smbwrapper is based. + Consequently, Tridge recommended me to compile Samba without + support for smbwrapper. When, I have no idea. Sorry folks. Here is + the original message I received from Andrew: + + > 1) 2.0.5a's smbwrapper doesn't work under glibc2.1, and pre-2.0.6's + > smbwrapper doesn't even compile under glibc2.1. + + yep, Ulrich deliberately broke it. It won't get fixed till glibc + allows the sorts of games it plays to work again. I suggest you turn + it off in your build scripts until that gets sorted out. + + * Swat's file are now in /usr/share/samba/ instead of + /usr/lib/samba/ (bug #49011). + * Man pages now in /usr/share/man/ instead of /usr/man/ (bug #49011). + + -- Eloy A. Paris <peloy@debian.org> Tue, 2 Nov 1999 12:59:13 -0500 + +samba (2.0.5a-4) unstable; urgency=low + + * Applied patch from our fearless leader (Wichert) to fix the darn bug + that prevents Samba to work on 2.0.x kernels if it was compiled + in a system running a 2.2.x kernel. This closes #40645 (build uses + setresuid which doesn't work under 2.0.34 (does apparently under + 2.2.x) ). + * Fixed the entry that swat's postinst script adds to /etc/inetd.conf + so it is '#<off># swat\t\tstream\ttcp\tnowait.400 ...' instead of + '#<off>#swat\t\tstream\ttcp\tnowait.400 ...'. The old way caused + 'update-inetd --enable swat' to leave the entry for swat disabled. + Thanks to Dave Burchell <burchell@inetnebr.com> for finding out + this problem. This closes #48762 (swat uses non-standard syntax to + comment out inetd.conf entry). + * /usr/sbin/swat does not think anymore that the smbd daemon lives + in /usr/local/samba/bin/. To fix this I am running now source/configure + with "--prefix=/usr --exec-prefix=/usr". This closes #47716 (samba + 'swat' fails: incorrect hardwired path in the binary). + + -- Eloy A. Paris <peloy@debian.org> Sun, 31 Oct 1999 03:42:38 -0500 + +samba (2.0.5a-3) unstable; urgency=low + + * I am pretty darn busy with my MBA, I apologize for the long time it's + taking to squash bugs in the Samba packages. + * Built with debhelper v2 for FHS compliancy. Changed a couple of + things in debian/rules to accomodate for the new place for the docs. + I also had to change debian/{samba.postinst,samba.prerm,swat.postinst} + to make sure that the symlink from /usr/doc/xxx exists and points to + /usr/share/doc/xxx (the reason for this is that I am not letting + debhelper to create these scripts for me automatically). + * Built with latest libc6. + * smbfs: finally, the nasty bug that causes smbmount to die after + a while is gone thanks to Ben Tilly <Ben_Tilly@trepp.com>. + The problem was just a typo in source/client/smbmount.c. + This closes grave bug #42764 (smbmount dies) and #43341 + (smbfs-2.2.x won't function after a while). + * Fixed the smbmount wrapper script to eliminate a bashism (closes + #45202 - "wrapper scripts use $* instead of "$@") and to recognize + 2.3.x and 2.4.x kernels (closes #47688 - "smbfs: does not recognize + kernel 2.3.x"). + * Added a check to the smbmount wrapper script to see if the + kernel has support for smbfs, as suggested by Jeroen Schaap + <J.Schaap@physiology.medfac.leidenuniv.nl>. + * swat's man page is now part of the swat package, not of the samba + package. This closes #44808 (Samba has a man page for swat, but + the binary is not included). + * The interface program smbrun is not longer needed by smbd because + of the availability of execl() under Linux. Because of this, the + smbrun is not even being compiled. Since there is no need for smbrun + now, the smbrun man page was taken out of the samba package. This + closes #45266 (/usr/bin/smbrun missing). + * smbpasswd is now part of the samba-common package, and not part of + the samba package. This is to let administrators that do not want + to install a full Samba server administer passwords in remote + machines. This closes bug #42624 (smbpasswd should be included in + smbclient). This bug report also suggests that swat becomes part of + the samba package, that smbfs becomes part of the smbclient package, + and that the binary smbpasswd becomes part of the smbclient package. + I moved smbpasswd to the samba-common package but I am reluctant to + do the other things the bug report suggests. + * In order to keep dpkg happy when moving smbpasswd from the samba + package to samba-common, I had to add a "Replaces: samba (<= 2.0.5a-2)" + in the control section of the samba-common package and a + "Replaces: samba-common (<= 2.0.5a-2)" in the control section of the + samba package (in debian.control). + * Samba is now being compiled with the "--with-netatalk" option. This + closes #47480 (Could samba be compiled with the --with-netatalk option). + * All packages that depend on samba-common have a versioned dependency + now. This was accomplished by adding "(= ${Source-Version})" to the + relevant sections of debian/control. Thanks t Antti-Juhani Kaijanaho + <gaia@iki.fi> for the hint. This closes #42985 (samba should probably + have a versioned depends on samba-common). + * Made sure the file docs/textdocs/DIAGNOSIS.txt gets installed in all + the Samba packages. This closes bug #42049 (no DIAGNOSTICS.txt file). + * Added the smbadduser helper script to the samba package. This closes + #44480 (Samba doesn't come with the smbadduser program). + * Applied patch from szasz@triton.sch.bme.hu that prevents smbmount + to leave an entry in /etc/mtab for a share that could not be mounted + because of invalid user of password. The patch also allows smbumount + to unmount the share in the event that something goes wrong with the + smbmount process. This closes bug #48613 (Mount/umount problems + + patch) as well as #44130 (failed mount is still mounted). + * smbmount-2.2.x is now setuid root. This is needed for the patch + applied above to be effective. If smbmount-2.2.x is not setuid root + then an entry will be left in /etc/mtab even when the mount + fails. I had to add "usr/bin/smbmount-2.2.x" to debian/smbfs.suid + for this to work. + + -- Eloy A. Paris <peloy@debian.org> Wed, 27 Oct 1999 10:36:13 -0400 + +samba (2.0.5a-2) unstable; urgency=low + + * This version is basically the same as 2.0.5a-1 but it was compiled + on a Potato system with glibc2.1. See below the change log for 2.0.5a-1 + for more information. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jul 1999 02:25:29 -0400 + +samba (2.0.5a-1) stable; urgency=high + + * I'm back from the Honey Moon. We are pretty busy because we are moving + to Pittsburgh (from Caracas, Venezuela) in aprox. 24 hours and we still + have plenty of things to pack and to do. Samba 2.0.5 was released + while I was in the Honey Moon and it is just now (almost 3 AM) when + I have time to package it. + * Because of the security problems fixed in 2.0.5, this upload goes + to both stable and unstable (the Security Team asked for this). + * This release (2.0.5a-1) was compiled on a Slink system. 2.0.5a-2 will + be compiled on a Potato system. + * Added a "Replaces: samba (<= 1.9.18p10-7)" to the samba-common + section in debian/control (as suggested by Steve Haslam + <araqnid@debian.org>) to fix the problems that appear when upgrading + from the Samba package in Slink. Please test this as I am completely + unable to do so. This should fix bug #39818 (Upgrading Samba from the + Slink version). + * Removed the hacks to the autoconf stuff that I added to 2.0.4b-2 in + order to have defined several socket options when compiling with + Linux 2.2.x kernel headers - the fix is now upstream. + * Finally!!! smbmount was re-written (thanks Tridge :-) to use a command + line syntax similar to the one used by the old smbmount (for 2.0.x + kernels). This means that the wrapper script is no longer necessary + so I removed it. In its place there is a simple wrapper script that + calls smbmount-2.0.x or smbmount-2.2.x depending on the kernel that is + running. + * Because of the wedding, the Honey Moon, and our move to Pittsburgh, + I can't work on fixing other bugs in this release. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jul 1999 02:18:51 -0400 + +samba (2.0.4b-3) unstable; urgency=low + + * Stupid mistake: I forgot to add /usr/bin/smbumount to debian/smbfs.files + and because of this /usr/bin/smbumount was part of the samba package + instead of part of the smbfs package. + + -- Eloy A. Paris <peloy@debian.org> Thu, 1 Jul 1999 01:51:24 -0400 + +samba (2.0.4b-2) unstable; urgency=low + + * Dark (and archive maintainers): please remove from Potato the smbfsx + binary package and also the old source package for smbfs. smbfs and + smbfsx have been merged starting with this version. + * Merged the old smbfs package with Samba. Now there is only one package + for the smbfs utilities and is called "smbfs". The package smbfsx + does not exist any more and this new smbfs package must be used + for both 2.0.x and > 2.1.x kernels. + * A wrapper script was added to handle the syntax change in smbmount + in the new smbfs utilities (required for kernels > 2.1.70). The + home page for this script is http://www.wittsend.com/mhw/smbmount.html. + Please _note_ that this will change (for good) in Samba 2.0.5 :-) + * Added debian/smbumount.sh. It's another wrapper that calls smbumount-2.2.x + or smbumount-2.0.x depending on the kernel currently running. + * Not using -t for savelog in cron.weekly script. + * Recompiled without libreadlineg-dev (Samba does not seem to be using + it so unnecessary dependencies are produced). + * glibc2.1 build. + * Removed smbpasswd.8 man page from the debian/ directory because it is + now being provided upstream. + * Got rid of the ugly hack I put in source/lib/util_sock.c to have + IPTOS_LOWDELAY and IPTOS_THROUGHPUT defined. Now I patched the + autoconf stuff to #include <netinet/ip.h>. I've sent the patch to + Jeremy Allison so we have this upstream. + + -- Eloy A. Paris <peloy@debian.org> Mon, 28 Jun 1999 17:47:19 -0400 + +samba (2.0.4b-1) unstable; urgency=low + + * New upstream release. This release fixes the following Debian bugs: + #33838 (Amanda/ Samba 2.0.2 and backing up large filesystems) and + #33867 (Amanda 2.4.1 and Samba 2.0.2 and large filesystems). Jeremy + Allison released Samba 2.0.4 and found out that there were a couple + of minor bugs so he released 2.0.4a. Then he found out about more + serious bugs and released 2.0.4b. I have built this package several + times between yesterday and today because of this. Now I am releasing + the Debian packages for Samba with what I believe will be the latest + release the Samba Team will make at least in the next 4 days (Jeremy + is taking a short vacation). + * Still compiling against glibc2.0 (sorry about that :-) + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. It looks + now in /usr/lib/samba/ for this file. This fixes #32971, #32989, + #33278, #34911 and #36317. + * Made smbfsx depend on samba-common because smbfsx uses /etc/samba/smb.conf + and /etc/samba/codepages/. This fixes #33128 (smbmount complains about + missing /etc/smb.conf). + * Package swat does not depend on httpd anymore (there's no need to). + This fixes #35795 (swat requires httpd). + * Renamed smbmount-2.1.x and smbumount-2.1.x to smbmount-2.2.x and + smbumount-2.2.x. Same applies to the man pages. + * Changed minor type in smbmount's man page (changed "\"" by "\'"). This + fixes #34070 (wrong quotes in manpage). + * Used Fabrizio Polacco's <fpolacco@icenet.fi> procedure to create the + Debian package for Samba. This closes #35781 (samba has no pristine + source). + * Changes to /etc/cron.weely/samba: rotate /var/log/{nmb,smb}.old only + if the size of either is different than 0. Also, added comments at the + beginning of this script to explain how rotation of log files works in + Samba. Thanks to ujr@physik.phy.tu-dresden.de (Ulf Jaenicke-Roessler) + for the suggestions. This closes #37490 (cron.weekly script rotates not + used [sn]mb.old files). As I side effect, this should also close + #31462 (still trouble with /etc/cron.weekly/samba). + * Check for old /etc/pam.d/samba file which is not provided by this version + of the Debian Samba package but was provided in older versions. If this + file exists we delete it. We check for this in the postinst. This closes + #37356 (samba put stuff in pam.d that pam complains about) and #34312 + (libpam0g: questions during upgrade). + * Make sure the mode of /etc/samba/smbpasswd is set to 600. This is done + in the postinst script. This closes #35730 (Security problem with + /etc/samba/smbpasswd when upgrading from samba 1.9.18p8-2 to 2.0.3-1). + * I have just checked and it looks like #28748 (smbfsx doesn't "return ") + has been fixed. This might have been fixed since a long time ago. + * Long long standing bug #18488 (smbclient: internal tar is broken) is + closed in this release of Samba. The bug might have been closed for a + long long time, but I did not check for this before. + * Temporary fix to the annoying "Unknown socket option IPTOS_LOWDELAY" + message. This fixes #33698 (socket option IPTOS_LOWDELAY no longer works), + #34148 (warnings from smbd) and #35333 (samba warnings). + + -- Eloy A. Paris <peloy@debian.org> Thu, 20 May 1999 00:35:57 -0400 + +samba (2.0.3-1) unstable; urgency=low + + * New upstream version. + * Removed the convert_smbpasswd.pl program I created and put in + /usr/doc/samba/ because there's a convert_smbpasswd script in the + upstream sources that does the same thing. I modified the postinst + script to use this script instead of the one I created. + + -- Eloy A. Paris <peloy@debian.org> Sun, 28 Feb 1999 01:35:37 -0400 + +samba (2.0.2-2) unstable; urgency=low + + * Updated the README.Debian file. + * Updated the description of the samba package in the control file. + * The binaries smbmnt and smbumount-2.1.x in the smbfsx package are now + installed setuid root as they should be. This was done by doing a + a "chmod u+s" for each binary in debian/rules and by creating the + file debian/smbfsx.suid. + * Minor patch to source/client/smbumount.c to allow normal users + to umount what they have mounted (problem was a kernel vs. libc6 + size mismatch). I sent the patch upstream. + * Created debian/smbwrapper.dirs so the directory /usr/lib/samba/ is + created. + * Modified debian/rules to move smbwrapper.so from debian/tmp/usr/bin/ to + debian/smbwrapper/usr/lib/samba/. + * Hacked source/smbwrapper/smbsh.c to fix the problem + of smbsh not finding the shared library smbwrapper.so. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Feb 1999 18:11:34 -0400 + +samba (2.0.2-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Thu, 11 Feb 1999 01:35:51 -0400 + +samba (2.0.1-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Sat, 6 Feb 1999 06:51:18 -0400 + +samba (2.0.0final-4) unstable; urgency=low + + * The samba postinst made an unwarranted assumption that the file + /etc/samba/smbpasswd exists. If the file did not exist (which is + perfectly valid) the postinst will fail. This fixes #32953. + + -- Eloy A. Paris <peloy@debian.org> Fri, 5 Feb 1999 23:32:46 -0400 + +samba (2.0.0final-3) unstable; urgency=low + + * Added to debian/control a "Depends: ${shlibs:Depends}" line for the + samba-common package so dependencies for this package are set + correctly (thanks to Dark for pointing this out). + + -- Eloy A. Paris <peloy@debian.org> Thu, 4 Feb 1999 09:45:21 -0400 + +samba (2.0.0final-2) unstable; urgency=low + + * Finally!!! The first upload to unstable. Sorry for the delay folks + but I have been quite busy lately :-) Another reason for the delay + is that I wanted to ease the migration from Samba 1.9.18p10 and + before to Samba 2.0.0. I changed the location of the config. files + from /etc/ to /etc/samba/ and this made things a little bit harder. + * This package needs 2.2 kernel headers to compile (well, this is + true for the smbfsx package, all others compile fine with 2.0 kernel + headers). + * Created a preinst script for the samba package to take care of the + location migration of smb.conf (from /etc/ to /etc/samba/). The + preinst script also takes care of moving /etc/smbpasswd to its new + location (/etc/samba/). + * Created postinst and postrm scripts to add/remove an entry for swat + in /etc/inetd.conf. + * I had forgotten to install the sambaconfig script so I changed + debian/rules to install this script. + * Added a postrm script for the samba package (I had forgotten to add + this script to the new Samba packages after the migration from 1.9.18 + to 2.0.0). + * Created a small Perl script that is called from the samba postinst + to convert the smbpasswd from the old format used in version prior + to 2.0.0 to the new one used in 2.0.0 and beyond. + * The upgrade process should be automatically now. Please let me know + of any problems you encounter. + + -- Eloy A. Paris <peloy@debian.org> Sat, 23 Jan 1999 09:34:10 -0400 + +samba (2.0.0final-1) experimental; urgency=low + + * Finally!!! Samba 2.0.0 is here! I am not uploading to unstable + because I still have to work out the migration from the old + samba packages to the new ones. I also need to work more on the + new swat package. + + -- Eloy A. Paris <peloy@debian.org> Thu, 14 Jan 1999 22:40:02 -0400 + +samba (2.0.0beta5-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Tue, 5 Jan 1999 00:37:57 -0400 + +samba (2.0.0beta4-1) experimental; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Wed, 23 Dec 1998 18:37:45 -0400 + +samba (2.0.0beta3-1) experimental; urgency=low + + * New upstream version. + * I have just realized that the documentation patches (for man pages) + that I used for the 1.9.18 release are not longer necessary because + there was a major re-write of all the Samba documentation that added + the missing bits of information. So, I have just removed these minor + patches. + + -- Eloy A. Paris <peloy@debian.org> Tue, 8 Dec 1998 12:00:30 -0400 + +samba (2.0.0beta2-1) experimental; urgency=low + + * New upstream version. + * This new version fixes the potential security problem that + was posted to debian-private (using the "message command" parameter + to execute arbitrary commands from messages sent from LinPopUp). + * Changed /etc/init.d/samba to use one of the variables stored in + /etc/samba/debian_config to know how Samba is being run (from inetd or + as daemons) instead of grepping /etc/inetd.conf which may not exist + if the user is running xinetd (this fixes bug #29687 - assumes using + vanilla inetd) + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Nov 1998 23:32:03 -0400 + +samba (2.0.0beta1-1) experimental; urgency=low + + * First beta release of the samba-2.0.0 code. Before the beta I was + working with sources downloaded directly from the CVS server. This + package goes into experimental and I plan to release the new + samba to unstable as soon as it gets out of beta. + * Created several packages out of the Samba sources. They are: + samba (nmbd and smbd daemons + related programs), smbclient (FTP + like command line utility to retrieve files from SMB servers), + swat (Samba Web Administration Tool), samba-common (common files + used by samba, smbclient and swat), smbfsx (smbfs utilities for + kernels >= 2.1.70), smbwrapper and samba-doc (Samba documentation). + * Refreshed debian/samba-doc.docs so recently added docs. are + installed in the samba-doc package. New additions include man + pages in the /usr/doc/samba-doc/htmldocs/ directory. + * Deleted Debian specific nmblookup(1) man page as it is now upstream. + * Added smbtorture to smbclient package. + * Moved rpcclient from the samba package to the smbclient package. + * The Samba daemons (nmbd and smbd) now create a PID file so I changed + all calls to start-stop-daemon to use the PID file. + * Fixed debian/rules to install mksmbpasswd (fixes #27655). + * Modified /etc/init.d/samba so nmbd is started without the -a (append + to the log file instead of overwrite) switch. The new behavior of + nmbd is to NOT overwrite log files, so the -a switch can be deleted + safely. + * Moved from debstd to debhelper. + + -- Eloy A. Paris <peloy@debian.org> Thu, 1 Oct 1998 08:37:41 -0400 + +samba (1.9.18p10-5) frozen unstable; urgency=high + + * Oppsss!!! While fixing bug #26884 I introduced a bug even worse than + the one I was trying to fix: in /etc/init.d/samba I got rid of the test + that tells us whether the Samba daemons are running from inetd or as + standalone daemons. I corrected the problem by editing again + /etc/init.d/samba to uncomment the test. + * Wishlist bug #28298 (typos in samba) was fixed. + * Wishlist bug #28309 (typos in smb.conf) was fixed. + + -- Eloy A. Paris <peloy@debian.org> Wed, 28 Oct 1998 09:11:47 -0400 + +samba (1.9.18p10-4) unstable; urgency=low + + * Minor patch to debian/rules to delete *substvars instead of only + substvars when doing a "debian/rules clean" (thanks to Daniel Jacobowitz + <dmj@andrew.cmu.edu> for this). + * Small patch to source/shmem_sysv.c that eases compilation under + glibc-2.1 (thanks to Daniel <dmj@andrew.cmu.edu> for this). + + -- Eloy A. Paris <peloy@debian.org> Thu, 17 Sep 1998 15:33:49 -0400 + +samba (1.9.18p10-3) unstable; urgency=low + + * Patched smbclient again to fix minor formatting problem introduced + by Magosanyi Arpad's smbclient patch. + + -- Eloy A. Paris <peloy@debian.org> Thu, 3 Sep 1998 11:03:23 -0400 + +samba (1.9.18p10-2) unstable; urgency=low + + * Sync'ed include files for the smbfs utilities with the ones in + kernel 2.1.119. + * Added to the /usr/doc/samba/examples/ directory a new script called + wins2dns (courtesy of Jason Gunthorpe <jgg@deltatee.com>) that + generates BIND sonze files for hosts in the WINS database. + * Patched smbclient to include enhancements by Magosanyi Arpad + <mag@bunuel.tii.matav.hu> that make scripting easier. + + -- Eloy A. Paris <peloy@debian.org> Fri, 28 Aug 1998 13:34:54 -0400 + +samba (1.9.18p10-1) stable unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). I built a 1.9.18p9-1 but I + never released it because an obscure bug was found just a couple + of days before the official release, so the Samba Team stopped + the rollover of 1.9.18p9. + * Updated documentation (new files were added to the docs/ directory + that were not installed in /usr/doc/samba/). + * Fixed long standing bug #7695 (smb.conf's man page doesn't document + 'printing=lprng') - I made a couple of changes to the man page to + include references to lprng. + * Fixes bug #24930 (samba needs to suggest psmisc?). I don't think it + is necessary to make samba suggest psmisc just because the postinst + script mentions to call killall. So, I removed all references to + "killall" in the scripts. + * Fixes bug #25999 (Samba does not by default work with unix password + sync): I added the "passwd program" and "passwd chat" parameters to + the sample smb.conf to reflect the Debian environment. + + -- Eloy A. Paris <peloy@debian.org> Fri, 21 Aug 1998 08:59:18 -0400 + +samba (1.9.18p9-1) unstable; urgency=low + + * New upstream version (see /usr/doc/samba/WHATSNEW.txt for a + description of what has changed). + * Removed Jeremy Allison's patch applied to 1.9.18p8-2 because it is + now part of the new upstream version. + * Corrected small typo in addtosmbpass' man page (fixes #25629). + + -- Eloy A. Paris <peloy@debian.org> Tue, 11 Aug 1998 08:53:08 -0400 + +samba (1.9.18p8-2) frozen unstable; urgency=medium + + * Applied patch received from Jeremy Allison (Samba Team) that fixes + "grave" bug #23903 (samba maps username before authenicating with + NT password server). + * Added a "sleep 2" between "start-stop-daemon --stop" and + "start-stop-daemon --start" in /etc/init.d/samba so when this script + is called with the "restart" parameter the Samba daemons are restarted + properly. This fixes bug #24211 (init.d script doesn't restart). + * Sent start-stop-daemon output in /etc/init.d/samba to /dev/null to + avoid annoying warning messages. + * Added perfomance tune parameters to sample /etc/smb.conf (SO_SNDBUF=4096 + and SO_RCVBUF=4096 to "socket options" in /etc/smb.conf). I can't + find who sent this suggestion to me. If you are listening, drop me a + note and I'll put your name here :-) + + -- Eloy A. Paris <peloy@debian.org> Mon, 29 Jun 1998 08:45:01 -0400 + +samba (1.9.18p8-1) frozen unstable; urgency=low + + * New upstream release that fixes _lots_ of "ugly" bugs. The list of + fixed bugs is too long to include here (see /usr/doc/samba/WHATSNEW.txt). + * Fixed postinst to quote arguments to if [ arg .. ] constructs + (fixes #22881). + * Applied Jeremy Allison's patch (posted to the samba-ntdom mailing + list) that solves a problem with username maps (the Samba Team did + not catch this problem before final 1.9.18p8). + * Made /etc/init.d/samba to print out a warning when Samba is running + from inetd and the user runs /etc/init.d/samba to start|stop|restart + Samba (there's no point on doing this because inetd will start the + daemons again when there is traffic on UDP port 137-139). + + -- Eloy A. Paris <peloy@debian.org> Sat, 13 Jun 1998 00:18:25 -0400 + +samba (1.9.18p7-4) frozen unstable; urgency=medium + + * Fixes the serious problem of having the WINS name server + database getting deleted at boot time. That happened because the + WINS database was being stored under /var/lock/samba/ and all files + under /var/lock/ are deleted at boot time. The place where the WINS + database is stored was moved to /var/samba/. + + -- Eloy A. Paris <peloy@debian.org> Mon, 18 May 1998 20:24:29 -0400 + +samba (1.9.18p7-3) stable; urgency=high + + * Libc5 version for Bo (stable) that fixes the recently reported + security hole. + + -- Eloy A. Paris <peloy@debian.org> Mon, 18 May 1998 20:19:33 -0400 + +samba (1.9.18p7-2) frozen unstable; urgency=low + + * Added patches from the non-mantainer upload that make us able + to compile Samba on Alpha systems. This fixes bug #22379. + + -- Eloy A. Paris <peloy@debian.org> Wed, 13 May 1998 20:38:51 -0400 + +samba (1.9.18p7-1) frozen unstable; urgency=low + + * New upstream release (just bug fixes, no new functionality). + + -- Eloy A. Paris <peloy@debian.org> Wed, 13 May 1998 11:47:32 -0400 + +samba (1.9.18p6-2) frozen unstable; urgency=low + + * Uploaded to frozen (I forgot to upload last version to frozen + so it got installed only in unstable). + + -- Eloy A. Paris <peloy@debian.org> Tue, 12 May 1998 18:10:17 -0400 + +samba (1.9.18p6-1.1) unstable; urgency=low + + * non-maintainer upload for Alpha + * patch needed for source/quota.c (_syscall4() confusion) + + -- Paul Slootman <paul@debian.org> Tue, 12 May 1998 20:39:13 +0200 + +samba (1.9.18p6-1) unstable; urgency=low + + * New upstream release that fixes a possible buffer overflow. + This security hole was reported on BugTraq by Drago. The + previous Debian version (1.9.18p5-1) was not released because + 1.9.18p5 and 1.9.18p6 were released very closely. + + -- Eloy A. Paris <peloy@debian.org> Mon, 11 May 1998 20:28:33 -0400 + +samba (1.9.18p5-1) unstable; urgency=low + + * New upstream release (no new funcionality, just bug fixes - see + /usr/doc/samba/WHATSNEW.txt.gz). + * Backed off Debian patches that were added upstream. + + -- Eloy A. Paris <peloy@debian.org> Mon, 11 May 1998 08:43:53 -0400 + +samba (1.9.18p4-2) frozen unstable; urgency=low + + * Patched smbclient(1) man page to not reference the unsopported + -A parameter (fixes #6863). + * Changes to start nmbd with the -a option (in /etc/init.d/samba + and in the entry added to /etc/inetd.conf). + * Fixed typo in sample smb.conf (fixes #21484). + * Fixed yet another typo in sample smb.conf (fixes #21447). + + -- Eloy A. Paris <peloy@debian.org> Fri, 17 Apr 1998 22:19:23 -0400 + +samba (1.9.18p4-1) frozen unstable; urgency=low + + * New upstream version that fixes several bugs. + * New scheme for keeping track of Debian specific configuration. + This new scheme fixes bug #18624 (Samba always asks the user about + configuration options). New scheme stores Debian specific + configuration information in /etc/samba/debian_config. + * Changes to /usr/sbin/sambaconfig, prerm and postinst to support the + new configuration scheme. + * Moved required kernel 2.1.x include files inside the source tree + so I don't have to do very nasty things like creating crazy + symlinks in /usr/include to make this package compile. This + allows non-root users to build the package and fixes bug + #20104. + * Fixed address of the FSF in /usr/doc/samba/copyright (problem + reported by lintian). + * The /etc/init.d/samba script now supports the force-reload + argument, as required by the policy (problem reported by lintian). + * Added a "rm /etc/cron.weekly/samba" at the end of the postinst. + * Now the samba package can be installed even if no nmbd or smbd processes + are running. This fixes the following bugs: #8917, #9334, #10268, + #10411, #11146 and #13387. + * Provides the original README in /usr/doc/samba. This fixes bug #9693. + * Added a --no-reload option to sambaconfig to not reload Samba + after configuration. + * Created man pages for sambaconfig(8), addtosmbpass(8), + mksmbpasswd(8) and nmblookup(1). + * Corrected small typo in sample /etc/smb.conf. + * Added two new parameters to /etc/smb.conf: "preserver case" and + "short preserve case". + * "rm -Rf /var/lock/samba" in postrm when package is being purged. + * Patched upstream source (nmbd.c) to not overwrite log files when + nmbd is called with the -a parameter (fixes #17704: nmbd ignores + -a option). + * /etc/init.d/samba now starts the nmbd daemon with the -a parameter + to not overwrite log files. + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Mar 1998 21:22:03 -0400 + +samba (1.9.18p3-1) unstable; urgency=low + + * New upstream version. + * Oppsss!!! I really screwed it up (actually, debstd did). + 1.9.18p2-2 still contained man pages (smbmount and smbumount) part + of other packages. This version does have this corrected. If not, + I no longer deserve to be a Debian developer! So, this version + fixes bug #18438 and some of the bugs I claimed to fix in + 1.9.18p2-2. Oh, by the way, I fixed the problem by running debstd + with -m in debian/rules (man pages are installed by "make install" + so it's a bad idea to re-install man pages with debstd). + + -- Eloy A. Paris <peloy@debian.org> Mon, 23 Feb 1998 17:32:42 -0400 + +samba (1.9.18p2-2) unstable; urgency=low + + * Fixes bugs #18017, #17999, #17961, #17932: old 1.9.18p2-1 provided + a man page for smbmount, which conflicts with package smbfs. This + was solved by creating a multi-binary package that produces + package samba and new package smbfsx. + * Fixes bug #18000 (typo in postinst). + * Fixes bug #17958 (postinst asks obsolete question). Actually, + the question is still asked, but only if Samba is run as daemons. + * Created a multi-binary package from the Samba sources: package + samba and new package smbfsx which provides SMB mount utilities + for kernels > 2.1.70. + + -- Eloy A. Paris <peloy@debian.org> Mon, 9 Feb 1998 19:47:05 -0400 + +samba (1.9.18p2-1) unstable; urgency=low + + * New upstream version. + * Removed /etc/cron.weekly/samba because Samba does not handle well + rotation of log files (if the log file is rotated Samba will + continue to log to the rotated file, instead of the just created + one). In any case, Samba will rotate log files after an specific + file size. + + -- Eloy A. Paris <peloy@debian.org> Tue, 27 Jan 1998 22:34:27 -0400 + +samba (1.9.18p1-2) unstable; urgency=low + + * Created a multi-binary package out of the Samba sources to provide + packages samba and smbfsx (userland utilities to work with + smbfs with kernels > 2.1.x. + + -- Eloy A. Paris <peloy@debian.org> Sat, 17 Jan 1998 09:23:48 -0400 + +samba (1.9.18p1-1) unstable; urgency=low + + * New upstream version. + * Created /etc/cron.daily/samba to save a copy of /etc/smbpasswd in + /var/backups/smbpasswd.bak. + + -- Eloy A. Paris <peloy@debian.org> Wed, 14 Jan 1998 13:40:56 -0400 + +samba (1.9.18alpha14-1) unstable; urgency=low + + * New upstream version. + * Added a note to the postinst script telling the user that he/she + needs to run smbpasswd manually after creating a new /etc/smbpasswd + from /etc/passwd. + + -- Eloy A. Paris <peloy@debian.org> Tue, 23 Dec 1997 23:44:37 -0400 + +samba (1.9.18alpha13-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Tue, 16 Dec 1997 13:02:32 -0400 + +samba (1.9.18alpha12-1) unstable; urgency=low + + * New upstream version. + * Conflicts with the sambades package because the new Samba 1.9.18 + series do not depend on the DES libraries to support encrypted + passwords. + * Added parameter "encrypt passwords = yes" to /etc/smb.conf. + * Compiled with support for quotas in disk_free(). + * Home directories are now exported read only by default. + * Re-worked debian/rules. + * Re-worked sample smb.conf. + + -- Eloy A. Paris <peloy@debian.org> Thu, 4 Dec 1997 22:50:34 -0400 + +samba (1.9.17p4-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable by everybody because some Samba utilities + will fail otherwise when run by non-root users. + * Dropped PAM support while the PAM libraries are ported to libc6. + + -- Eloy A. Paris <peloy@debian.org> Tue, 21 Oct 1997 18:08:49 -0400 + +samba (1.9.17p3-1) unstable; urgency=low + + * New upstream version. + * Made /etc/smb.conf readable only by root as suggested by smbd's man page. + + -- Eloy A. Paris <peloy@debian.org> Wed, 15 Oct 1997 09:21:25 -0400 + +samba (1.9.17p2-2) unstable; urgency=low + + * Running Samba as daemons instead of from inetd. + * Removing netbios entries in /etc/inetd.conf. + + -- Eloy A. Paris <peloy@debian.org> Thu, 9 Oct 1997 23:37:25 -0400 + +samba (1.9.17p2-1) unstable; urgency=low + + * New upstream version that fixes a serious security hole. + * Removed Debian patches added in 1.9.17-1 and 1.9.17p1-1 because + these patches are now part of the upstream release. + + -- Eloy A. Paris <peloy@debian.org> Sun, 28 Sep 1997 22:54:33 -0400 + +samba (1.9.17p1-1) unstable; urgency=low + + * New upstream version. + * Defined symbol _LINUX_C_LIB_VERSION_MAJOR as 6 in includes.h to shut up + compiler warnings. + * Included rpcsvc/ypclnt.h in includes.h to shut up compiler warnings. + * Included crypt.h to have function prototype for crypt(). + * Included netinet/tcp.h to have some socket options included. + * Included netinet/ip.h to have some socket options included. + * Linking with libcrypt (LIBM='... -lcrypt'). Without including this + library smbd generates a seg. fault when authenticating users (?). + + -- Eloy A. Paris <debian.org> Wed, 10 Sep 1997 22:09:18 -0400 + +samba (1.9.17-1) unstable; urgency=low + + * New upstream version (called the "Browse Fix Release") + * Added the option --oknodo to the start-stop-daemon invocation in prerm + script. This was because the prerm was failing because start-stop-daemon + was returning an error code if no nmbd or smbd daemons were found + to kill. + * The function yp_get_default_domain(), referenced in three source + files was part of libc5 but with libc6 (glibc2) it has been moved + to libnss_nis. Since the linker was unable to find the function + I had to add LIBSM='-lnss_nis' to debian/rules. + * Added -DNO_ASMSIGNALH and -DGLIBC2 to FLAGSM in debian/rules + because compiling was failing because of conflicts with glibc2. + * Patched source/includes.h to include termios.h if GLIBC2 is defined. + + -- Eloy A. Paris <peloy@debian.org> Wed, 27 Aug 1997 08:39:32 -0400 + +samba (1.9.17alpha5-1) unstable; urgency=low + + * New upstream version. + + -- Eloy A. Paris <peloy@debian.org> Thu, 14 Aug 1997 18:05:02 -0400 + +samba (1.9.16p11-3) unstable; urgency=low + + * Fixed accidental omission of /etc/pam.d/samba. + + -- Klee Dienes <klee@debian.org> Sat, 15 Mar 1997 22:31:26 -0500 + +samba (1.9.16p11-2) unstable; urgency=low + + * Recompiled against newer PAM libraries. + * Added /etc/pam.d/samba. + + -- Klee Dienes <klee@debian.org> Sat, 8 Mar 1997 01:16:28 -0500 + +samba (1.9.16p11-1) unstable; urgency=low + + * New upstream release. + * Added PAM support. + + -- Klee Dienes <klee@debian.org> Tue, 25 Feb 1997 18:00:12 -0500 + +samba (1.9.16p9-2) unstable; urgency=low + + * minor packaging changes + + -- Klee Dienes <klee@sauron.sedona.com> Sun, 3 Nov 1996 11:45:37 -0700 + +samba (1.9.16p9-1) unstable; urgency=low + + * upgraded to new upstream version + + -- Klee Dienes <klee@sauron.sedona.com> Sat, 26 Oct 1996 21:38:20 -0700 + +1.9.16alpha10-1: + 960714 + * Removed Package_Revision from control file. + * Removed -m486 compiler option. + * Added Architecture, Section and Priority fields to control file. + * Upgraded to latest upstream version. + * Uses update-inetd now. + * Added shadow passwords support. + * Fixed Bug#1946: nmbd won't browse + +1.9.15p4-1: + 951128 + * Upgraded to latest upstream version. + * Fixed many bugs. + * Adds Master Browsing support. + * Converted to ELF. + * Fixed bug #1825 - nmbd is now killed when removing samba. + +1.9.14-1: + 950926 Andrew Howell <andrew@it.com.au> + * Upgraded to latest version. + * Fixed Bug #1139 - samba won't print + +1.9.14alpha5-1: + * Fixes killing of inetd problem in debian.postint and debian.postrm + +1.9.14alpha5-0: + 950704 Andrew Howell <andrew@it.com.au> + * Taken over samba package from Bruce Perens. + * Upgraded to newest version of samba. + +1.9.02-1: + 9-January-1994 Bruce Perens <Bruce@Pixar.com> + * Added Debian GNU/Linux package maintenance system files, and + configured for Debian systems. diff --git a/packaging/Debian/debian/config.cache b/packaging/Debian/debian-stable/config.cache index 8872a27b761..8872a27b761 100644 --- a/packaging/Debian/debian/config.cache +++ b/packaging/Debian/debian-stable/config.cache diff --git a/packaging/Debian/debian/config.cache.alpha-linux b/packaging/Debian/debian-stable/config.cache.alpha-linux index 6d171920263..6d171920263 100644 --- a/packaging/Debian/debian/config.cache.alpha-linux +++ b/packaging/Debian/debian-stable/config.cache.alpha-linux diff --git a/packaging/Debian/debian/config.cache.sparc-linux b/packaging/Debian/debian-stable/config.cache.sparc-linux index a2a21b1d3ad..a2a21b1d3ad 100644 --- a/packaging/Debian/debian/config.cache.sparc-linux +++ b/packaging/Debian/debian-stable/config.cache.sparc-linux diff --git a/packaging/Debian/debian-stable/control b/packaging/Debian/debian-stable/control new file mode 100644 index 00000000000..498a1d30da9 --- /dev/null +++ b/packaging/Debian/debian-stable/control @@ -0,0 +1,188 @@ +Source: samba +Section: net +Priority: optional +Maintainer: Simo Sorce <idra@samba.org> +Uploaders: Simo Sorce <idra@samba.org> +Build-Depends: debhelper (>= 4.0.2), libpam0g-dev, libreadline4-dev, libcupsys2-dev, autoconf, acl-dev (>= 2.0.8-1), libacl1 (>= 2.0.8-1), attr-dev (>= 2.0.7-1), libattr1 (>= 2.0.7-1), libkrb5-dev, libldap2-dev, python2.2-dev +Standards-Version: 3.5.6.1 + +Package: samba +Architecture: any +Depends: samba-common (= ${Source-Version}), netbase, logrotate, ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.72-35), libpam-modules +Replaces: samba-common (<= 3.0.0-1) +Suggests: samba-doc +Description: a LanManager-like file and printer server for Unix + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the components necessary to turn your + Debian GNU/Linux box into a powerful file and printer server. + . + Currently, the Samba Debian packages consist of the following: + . + samba - LanManager-like file and printer server for Unix. + samba-common - Samba common files used by both the server and the client. + smbclient - LanManager-like simple client for Unix. + swat - Samba Web Administration Tool + samba-doc - Samba documentation. + smbfs - Mount and umount commands for the smbfs (kernels 2.2.x and above). + libpam-smbpass - pluggable authentication module for SMB password database + libsmbclient - Shared library that allows applications to talk to SMB servers + libsmbclient-dev - libsmbclient shared libraries + winbind: Service to resolve user and group information from Windows NT servers + python2.2-samba: Python bindings that allow access to various aspects of Samba + . + It is possible to install a subset of these packages depending on + your particular needs. For example, to access other SMB servers you + should only need the smbclient and samba-common packages. + +Package: samba-common +Architecture: any +Depends: debconf, libpam-modules, ${shlibs:Depends} +Replaces: samba (<< 3.0.0-1) +Description: Samba common files used by both the server and the client + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the common files that are used by both the server + (provided in the samba package) and the client (provided in the smbclient + package). + +Package: smbclient +Architecture: any +Depends: samba-common (= ${Source-Version}), ${shlibs:Depends} +Replaces: samba (<< 3.0.0-1) +Provides: samba-client +Suggests: smbfs +Description: a LanManager-like simple client for Unix + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains some client components of the Samba suite. In + particular it includes the command line utilities smbclient, smbtar, + and smbspool. If you want to mount shares exported from Microsoft + Windows machines or a Samba server you must install the smbfs package. + +Package: swat +Architecture: any +Depends: debconf, samba (= ${Source-Version}), ${shlibs:Depends} +Recommends: samba-doc +Description: Samba Web Administration Tool + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains the components of the Samba suite that are needed + for Web administration of the Samba server. + . + Note: if you want to use the on-line documentation that is accesible + through the Swat front-end you must install the samba-doc package. + +Package: samba-doc +Section: doc +Architecture: all +Description: Samba documentation + The Samba software suite is a collection of programs that + implements the SMB protocol for unix systems, allowing you to serve + files and printers to Windows, NT, OS/2 and DOS clients. This protocol + is sometimes also referred to as the LanManager or NetBIOS protocol. + . + This package contains all the documentation that comes in the original + tarball. + +Package: smbfs +Section: otherosfs +Priority: optional +Architecture: any +Depends: netbase (>= 2.02), samba-common (= ${Source-Version}), ${shlibs:Depends} +Suggests: smbclient +Replaces: smbfsx +Conflicts: smbfsx, suidmanager (<< 0.50) +Description: mount and umount commands for the smbfs (for kernels >= than 2.2.x) + Smbfs is a filesystem which understands the SMB protocol. + This is the protocol Windows for Workgroups, Windows NT or + LAN Manager use to talk to each other. It was inspired by + samba, the program by Andrew Tridgell that turns any unix + site into a file server for DOS or Windows clients. + . + If you want to use command-line utilities like smbclient, smbtar + and/or smbspool you just need to install the smbclient package. + . + Starting with the Debian Samba packages version 2.2.0-1, the old smbfs + utilities for 2.0.x have been removed. There are no wrapper scripts + that call a specific smbmount/smbumount depending on the kernel + version. If you are using a 2.0.x kernel please upgrade or use the + latest Samba 2.0.7 Debian package. + +Package: libpam-smbpass +Section: admin +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Suggests: samba +Description: pluggable authentication module for SMB password database + This is a stackable PAM module that allows a system administrator to easily + migrate to using encrypted passwords for Samba and to keep smb passwords in + sync with unix passwords. Unlike other solutions, it does this without + requiring users to change their existing passwords or login to Samba using + cleartext passwords. + +Package: libsmbclient +Section: libs +Priority: extra +Architecture: any +Depends: ${shlibs:Depends} +Description: shared library that allows applications to talk to SMB servers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient shared library. + +Package: libsmbclient-dev +Section: libdevel +Priority: extra +Architecture: any +Depends: libsmbclient (= ${Source-Version}) +Description: libsmbclient static libraries and headers + libsmbclient allows to write applications that use the SMB protocol. + This gives applications the ability to talk to Microsoft Windows servers + and Unix servers running Samba. + . + This package contains the libsmbclient static libraries and headers + needed to build applications that use SMB services. + +Package: winbind +Section: net +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: samba (<= 3.0.0-1) +Description: service to resolve user and group information from Windows NT servers + This package provides the winbindd daemon, which provides a + service for the Name Service Switch capability that is present + in most modern C libraries (like the GNU C Library - glibc.) + . + The service provided by winbindd is called `winbind' and + can be used to resolve user and group information from a + Windows NT server. The service can also provide authentication + services via an associated PAM module. + +Package: python2.2-samba +Section: python +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, python2.2 +Description: Python bindings that allow access to various aspects of Samba + The Samba Python bindings allow you to access various aspects of Samba. + At the moment their status is "experimental" but they have been reported + to work well. + . + See /usr/share/doc/python2.2-samba/examples for a couple of examples. diff --git a/packaging/Debian/debian/copyright b/packaging/Debian/debian-stable/copyright index e74a64fa5b8..e74a64fa5b8 100644 --- a/packaging/Debian/debian/copyright +++ b/packaging/Debian/debian-stable/copyright diff --git a/packaging/Debian/debian-stable/files b/packaging/Debian/debian-stable/files new file mode 100644 index 00000000000..8821a7e7385 --- /dev/null +++ b/packaging/Debian/debian-stable/files @@ -0,0 +1,11 @@ +samba-doc_3.0.2-1_all.deb doc optional +samba_3.0.2-1_i386.deb net optional +samba-common_3.0.2-1_i386.deb net optional +smbclient_3.0.2-1_i386.deb net optional +swat_3.0.2-1_i386.deb net optional +smbfs_3.0.2-1_i386.deb otherosfs optional +libpam-smbpass_3.0.2-1_i386.deb admin extra +libsmbclient_3.0.2-1_i386.deb libs extra +libsmbclient-dev_3.0.2-1_i386.deb libdevel extra +winbind_3.0.2-1_i386.deb net optional +python2.2-samba_3.0.2-1_i386.deb python optional diff --git a/packaging/Debian/debian/gdbcommands b/packaging/Debian/debian-stable/gdbcommands index 5774b9ae311..5774b9ae311 100644 --- a/packaging/Debian/debian/gdbcommands +++ b/packaging/Debian/debian-stable/gdbcommands diff --git a/packaging/Debian/debian/libpam-smbpass.docs b/packaging/Debian/debian-stable/libpam-smbpass.docs index 89fbbf90425..89fbbf90425 100644 --- a/packaging/Debian/debian/libpam-smbpass.docs +++ b/packaging/Debian/debian-stable/libpam-smbpass.docs diff --git a/packaging/Debian/debian/libpam-smbpass.examples b/packaging/Debian/debian-stable/libpam-smbpass.examples index 48d841b2c15..48d841b2c15 100644 --- a/packaging/Debian/debian/libpam-smbpass.examples +++ b/packaging/Debian/debian-stable/libpam-smbpass.examples diff --git a/packaging/Debian/debian/libpam-smbpass.files b/packaging/Debian/debian-stable/libpam-smbpass.files index 4263df5c0f0..4263df5c0f0 100644 --- a/packaging/Debian/debian/libpam-smbpass.files +++ b/packaging/Debian/debian-stable/libpam-smbpass.files diff --git a/packaging/Debian/debian/libsmbclient-dev.examples b/packaging/Debian/debian-stable/libsmbclient-dev.examples index 2094c40b556..2094c40b556 100644 --- a/packaging/Debian/debian/libsmbclient-dev.examples +++ b/packaging/Debian/debian-stable/libsmbclient-dev.examples diff --git a/packaging/Debian/debian/libsmbclient-dev.files b/packaging/Debian/debian-stable/libsmbclient-dev.files index a52c17cfc56..a52c17cfc56 100644 --- a/packaging/Debian/debian/libsmbclient-dev.files +++ b/packaging/Debian/debian-stable/libsmbclient-dev.files diff --git a/packaging/Debian/debian/libsmbclient.files b/packaging/Debian/debian-stable/libsmbclient.files index 18b7f3b1654..18b7f3b1654 100644 --- a/packaging/Debian/debian/libsmbclient.files +++ b/packaging/Debian/debian-stable/libsmbclient.files diff --git a/packaging/Debian/debian/libsmbclient.shlibs b/packaging/Debian/debian-stable/libsmbclient.shlibs index 9c6eea200a9..9c6eea200a9 100644 --- a/packaging/Debian/debian/libsmbclient.shlibs +++ b/packaging/Debian/debian-stable/libsmbclient.shlibs diff --git a/packaging/Debian/debian/mksmbpasswd.8 b/packaging/Debian/debian-stable/mksmbpasswd.8 index 0a500102e8a..0a500102e8a 100644 --- a/packaging/Debian/debian/mksmbpasswd.8 +++ b/packaging/Debian/debian-stable/mksmbpasswd.8 diff --git a/packaging/Debian/debian/mksmbpasswd.awk b/packaging/Debian/debian-stable/mksmbpasswd.awk index a7b41a725d3..a7b41a725d3 100644 --- a/packaging/Debian/debian/mksmbpasswd.awk +++ b/packaging/Debian/debian-stable/mksmbpasswd.awk diff --git a/packaging/Debian/debian/panic-action b/packaging/Debian/debian-stable/panic-action index 13f773c1ef8..13f773c1ef8 100644 --- a/packaging/Debian/debian/panic-action +++ b/packaging/Debian/debian-stable/panic-action diff --git a/packaging/Debian/debian-stable/patches/documentation.patch b/packaging/Debian/debian-stable/patches/documentation.patch new file mode 100644 index 00000000000..b82552ef4df --- /dev/null +++ b/packaging/Debian/debian-stable/patches/documentation.patch @@ -0,0 +1,66 @@ +--- samba_3_0/docs/manpages/swat.8.orig 2003-06-06 16:16:24.000000000 -0400 ++++ samba_3_0/docs/manpages/swat.8 2003-06-06 16:25:13.000000000 -0400 +@@ -89,6 +89,13 @@ + .SH "INSTALLATION" + + .PP ++\fBDebian-specific Note\fR: all these steps have already been done for ++you. However, by default, swat is not enabled. This has been done for ++security reasons. To enable swat you need to edit /etc/inetd.conf, ++uncomment the swat entry (usually at the end of the file), and then ++restart inetd. ++ ++.PP + Swat is included as binary package with most distributions\&. The package manager in this case takes care of the installation and configuration\&. This section is only for those who have compiled swat from scratch\&. + + .PP +@@ -96,13 +103,13 @@ + + .TP 3 + \(bu +-/usr/local/samba/bin/swat ++/usr/sbin/swat + .TP + \(bu +-/usr/local/samba/swat/images/* ++/usr/share/samba/swat/images/* + .TP + \(bu +-/usr/local/samba/swat/help/* ++/usr/share/samba/swat/help/* + .LP + + .SS "Inetd Installation" +@@ -114,7 +121,7 @@ + You need to edit your \fI/etc/inetd\&.conf \fR and \fI/etc/services\fR to enable SWAT to be launched via \fBinetd\fR\&. + + .PP +-In \fI/etc/services\fR you need to add a line like this: ++In \fI/etc/services\fR you need to add a line like this (not needed for Debian): + + .PP + \fBswat 901/tcp\fR +@@ -126,10 +133,10 @@ + the choice of port number isn't really important except that it should be less than 1024 and not currently used (using a number above 1024 presents an obscure security hole depending on the implementation details of your\fBinetd\fR daemon)\&. + + .PP +-In \fI/etc/inetd\&.conf\fR you should add a line like this: ++In \fI/etc/inetd\&.conf\fR you should add a line like this (not needed for Debian since the maintainer scripts do it. You need to uncomment the line, though, because it is added commented out for security reasons): + + .PP +-\fBswat stream tcp nowait\&.400 root /usr/local/samba/bin/swat swat\fR ++\fBswat stream tcp nowait.400 root /usr/sbin/swat swat\fR + + .PP + One you have edited \fI/etc/services\fR and \fI/etc/inetd\&.conf\fR you need to send a HUP signal to inetd\&. To do this use \fBkill -1 PID \fR where PID is the process ID of the inetd daemon\&. +@@ -155,8 +162,8 @@ + + + .TP +-\fI/usr/local/samba/lib/smb\&.conf\fR +-This is the default location of the \fBsmb\&.conf\fR(5) server configuration file that swat edits\&. Other common places that systems install this file are \fI /usr/samba/lib/smb\&.conf\fR and \fI/etc/smb\&.conf \fR\&. This file describes all the services the server is to make available to clients\&. ++\fI/etc/samba/smb\&.conf\fR ++This is the default location of the \fBsmb\&.conf\fR(5) server configuration file that swat edits\&. This file describes all the services the server is to make available to clients\&. + + + .SH "WARNINGS" diff --git a/packaging/Debian/debian-stable/patches/fhs.patch b/packaging/Debian/debian-stable/patches/fhs.patch new file mode 100644 index 00000000000..df6ddec2dfc --- /dev/null +++ b/packaging/Debian/debian-stable/patches/fhs.patch @@ -0,0 +1,555 @@ +diff -uNr samba-3.0.0beta2.orig/source/Makefile.in samba-3.0.0beta2/source/Makefile.in +--- samba-3.0.0beta2.orig/source/Makefile.in 2003-07-02 23:26:46.000000000 -0500 ++++ samba-3.0.0beta2/source/Makefile.in 2003-07-02 23:19:46.000000000 -0500 +@@ -90,6 +91,13 @@ + # the directory where lock files go + LOCKDIR = @lockdir@ + ++# FHS directories; equal to LOCKDIR if not using --with-fhs ++CACHEDIR = @cachedir@ ++STATEDIR = @statedir@ ++ ++# Where to look for (and install) codepage databases. ++CODEPAGEDIR = @codepagedir@ ++ + # the directory where pid files go + PIDDIR = @piddir@ + # man pages language(s) +@@ -114,7 +122,7 @@ + PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" + PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \ + -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\" +-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" ++PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" -DCACHEDIR=\"$(CACHEDIR)\" -DSTATEDIR=\"$(STATEDIR)\" + PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS) + + # Note that all executable programs now provide for an optional executable suffix. +@@ -1203,7 +1211,7 @@ + @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS) + + installdat: installdirs +- @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir) ++ @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(CODEPAGEDIR) $(srcdir) + + installswat: installdirs + @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir) +diff -uNr samba-3.0.0beta2.orig/source/configure.in samba-3.0.0beta2/source/configure.in +--- samba-3.0.0beta2.orig/source/configure.in 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/configure.in 2003-07-02 23:19:02.000000000 -0500 +@@ -17,14 +17,18 @@ + [ --with-fhs Use FHS-compliant paths (default=no)], + [ case "$withval" in + yes) +- lockdir="\${VARDIR}/lib/samba" ++ lockdir="\${VARDIR}/run/samba" +- piddir="\${VARDIR}/run" ++ piddir="\${VARDIR}/run/samba" + mandir="\${prefix}/share/man" + logfilebase="\${VARDIR}/log/samba" + privatedir="\${CONFIGDIR}/private" + libdir="\${prefix}/lib/samba" + configdir="${sysconfdir}/samba" +- swatdir="\${DATADIR}/samba/swat" ++ swatdir="\${DATADIR}/samba/swat" ++ codepagedir="\${DATADIR}/samba" ++ statedir="\${VARDIR}/lib/samba" ++ cachedir="\${VARDIR}/cache/samba" ++ AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths]) + ;; + esac]) + +@@ -134,6 +141,9 @@ + AC_SUBST(swatdir) + AC_SUBST(bindir) + AC_SUBST(sbindir) ++AC_SUBST(codepagedir) ++AC_SUBST(statedir) ++AC_SUBST(cachedir) + + dnl Unique-to-Samba variables we'll be playing with. + AC_SUBST(SHELL) +diff -uNr samba-3.0.0beta2.orig/source/dynconfig.c samba-3.0.0beta2/source/dynconfig.c +--- samba-3.0.0beta2.orig/source/dynconfig.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/dynconfig.c 2003-07-02 23:19:02.000000000 -0500 +@@ -53,6 +53,13 @@ + pstring dyn_LMHOSTSFILE = LMHOSTSFILE; + + /** ++ * @brief Samba data directory. ++ * ++ * @sa data_path() to get the path to a file inside the CODEPAGEDIR. ++ **/ ++pstring dyn_CODEPAGEDIR = CODEPAGEDIR; ++ ++/** + * @brief Samba library directory. + * + * @sa lib_path() to get the path to a file inside the LIBDIR. +@@ -70,3 +77,27 @@ + + const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE; + const pstring dyn_PRIVATE_DIR = PRIVATE_DIR; ++ ++ ++/* In non-FHS mode, these should be configurable using 'lock dir ='; ++ but in FHS mode, they are their own directory. Implement as wrapper ++ functions so that everything can still be kept in dynconfig.c. ++ */ ++ ++char *dyn_STATEDIR(void) ++{ ++#ifdef FHS_COMPATIBLE ++ return STATEDIR; ++#else ++ return lp_lockdir(); ++#endif ++} ++ ++char *dyn_CACHEDIR(void) ++{ ++#ifdef FHS_COMPATIBLE ++ return CACHEDIR; ++#else ++ return lp_lockdir(); ++#endif ++} +diff -uNr samba-3.0.0beta2.orig/source/groupdb/mapping.c samba-3.0.0beta2/source/groupdb/mapping.c +--- samba-3.0.0beta2.orig/source/groupdb/mapping.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/groupdb/mapping.c 2003-07-02 23:19:02.000000000 -0500 +@@ -134,7 +134,7 @@ + + if (tdb && local_pid == sys_getpid()) + return True; +- tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open group mapping database\n")); + return False; +diff -uNr samba-3.0.0beta2.orig/source/include/dynconfig.h samba-3.0.0beta2/source/include/dynconfig.h +--- samba-3.0.0beta2.orig/source/include/dynconfig.h 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/include/dynconfig.h 2003-07-02 23:19:02.000000000 -0500 +@@ -31,8 +31,12 @@ + extern pstring dyn_CONFIGFILE; + extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE; + extern pstring dyn_LIBDIR; ++extern pstring dyn_CODEPAGEDIR; + extern const fstring dyn_SHLIBEXT; + extern const pstring dyn_LOCKDIR; + extern const pstring dyn_PIDDIR; + extern const pstring dyn_SMB_PASSWD_FILE; + extern const pstring dyn_PRIVATE_DIR; ++ ++char *dyn_STATEDIR(void); ++char *dyn_CACHEDIR(void); +diff -uNr samba-3.0.0beta2.orig/source/intl/lang_tdb.c samba-3.0.0beta2/source/intl/lang_tdb.c +--- samba-3.0.0beta2.orig/source/intl/lang_tdb.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/intl/lang_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -123,7 +123,7 @@ + /* if no lang then we don't translate */ + if (!lang) return True; + +- asprintf(&msg_path, "%s.msg", lib_path((const char *)lang)); ++ asprintf(&msg_path, "%s.msg", data_path((const char *)lang)); + if (stat(msg_path, &st) != 0) { + /* the msg file isn't available */ + free(msg_path); +@@ -131,7 +131,7 @@ + } + + +- asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang); ++ asprintf(&path, "%s%s.tdb", state_path("lang_"), lang); + + tdb = tdb_open_log(path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644); + if (!tdb) { +diff -uNr samba-3.0.0beta2.orig/source/lib/account_pol.c samba-3.0.0beta2/source/lib/account_pol.c +--- samba-3.0.0beta2.orig/source/lib/account_pol.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/account_pol.c 2003-07-02 23:19:02.000000000 -0500 +@@ -36,7 +36,7 @@ + + if (tdb && local_pid == sys_getpid()) + return True; +- tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open account policy database\n")); + return False; +diff -uNr samba-3.0.0beta2.orig/source/lib/util.c samba-3.0.0beta2/source/lib/util.c +--- samba-3.0.0beta2.orig/source/lib/util.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/util.c 2003-07-02 23:19:02.000000000 -0500 +@@ -2190,6 +2190,61 @@ + } + + /** ++ * @brief Returns an absolute path to a file in the Samba data directory. ++ * ++ * @param name File to find, relative to CODEPAGEDIR. ++ * ++ * @retval Pointer to a static #pstring containing the full path. ++ **/ ++ ++char *data_path(const char *name) ++{ ++ static pstring fname; ++ snprintf(fname, sizeof(fname), "%s/%s", dyn_CODEPAGEDIR, name); ++ return fname; ++} ++ ++/***************************************************************** ++a useful function for returning a path in the Samba state directory ++ *****************************************************************/ ++char *state_path(char *name) ++{ ++ static pstring fname; ++ ++ pstrcpy(fname,dyn_STATEDIR()); ++ trim_string(fname,"","/"); ++ ++ if (!directory_exist(fname,NULL)) { ++ mkdir(fname,0755); ++ } ++ ++ pstrcat(fname,"/"); ++ pstrcat(fname,name); ++ ++ return fname; ++} ++ ++/***************************************************************** ++a useful function for returning a path in the Samba cache directory ++ *****************************************************************/ ++char *cache_path(char *name) ++{ ++ static pstring fname; ++ ++ pstrcpy(fname,dyn_CACHEDIR()); ++ trim_string(fname,"","/"); ++ ++ if (!directory_exist(fname,NULL)) { ++ mkdir(fname,0755); ++ } ++ ++ pstrcat(fname,"/"); ++ pstrcat(fname,name); ++ ++ return fname; ++} ++ ++/** + * @brief Returns the platform specific shared library extension. + * + * @retval Pointer to a static #fstring containing the extension. +diff -uNr samba-3.0.0beta2.orig/source/lib/util_unistr.c samba-3.0.0beta2/source/lib/util_unistr.c +--- samba-3.0.0beta2.orig/source/lib/util_unistr.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/lib/util_unistr.c 2003-07-02 23:19:02.000000000 -0500 +@@ -54,8 +54,8 @@ + if (initialised) return; + initialised = 1; + +- upcase_table = map_file(lib_path("upcase.dat"), 0x20000); +- lowcase_table = map_file(lib_path("lowcase.dat"), 0x20000); ++ upcase_table = map_file(data_path("upcase.dat"), 0x20000); ++ lowcase_table = map_file(data_path("lowcase.dat"), 0x20000); + + /* we would like Samba to limp along even if these tables are + not available */ +@@ -161,7 +161,7 @@ + return; + } + +- valid_file = map_file(lib_path("valid.dat"), 0x10000); ++ valid_file = map_file(data_path("valid.dat"), 0x10000); + if (valid_file) { + valid_table = valid_file; + mapped_file = 1; +diff -uNr samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c samba-3.0.0beta2/source/libsmb/samlogon_cache.c +--- samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c 2003-07-01 09:40:37.000000000 -0500 ++++ samba-3.0.0beta2/source/libsmb/samlogon_cache.c 2003-07-02 23:19:02.000000000 -0500 +@@ -34,7 +34,7 @@ + BOOL netsamlogon_cache_init(void) + { + if (!netsamlogon_tdb) { +- netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0, ++ netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0, + TDB_DEFAULT, O_RDWR | O_CREAT, 0600); + } + +@@ -67,7 +67,7 @@ + winbindd_cache.tdb open. Open the tdb if a NULL is passed. */ + + if (!tdb) { +- tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, ++ tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, + TDB_DEFAULT, O_RDWR, 0600); + if (!tdb) { + DEBUG(5, ("netsamlogon_clear_cached_user: failed to open cache\n")); +--- samba_3_0/source/nmbd/nmbd_serverlistdb.c.orig 2003-09-08 10:53:13.000000000 -0400 ++++ samba_3_0/source/nmbd/nmbd_serverlistdb.c 2003-09-08 11:22:03.000000000 -0400 +@@ -327,7 +327,7 @@ + + updatecount++; + +- pstrcpy(fname,lp_lockdir()); ++ pstrcpy(fname,dyn_CACHEDIR()); + trim_char(fname,'\0' ,'/'); + pstrcat(fname,"/"); + pstrcat(fname,SERVER_LIST); +--- samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c.orig 2003-08-28 17:42:44.000000000 -0400 ++++ samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c 2003-08-31 08:09:11.000000000 -0400 +@@ -228,7 +228,7 @@ + + add_samba_names_to_subnet(wins_server_subnet); + +- if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) { ++ if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) { + DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n", + WINS_LIST, strerror(errno) )); + return True; +@@ -1759,7 +1759,7 @@ + } + } + +- slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST); ++ slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST); + all_string_sub(fname,"//", "/", 0); + slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid()); + +diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c samba-3.0.0beta2/source/nsswitch/winbindd_cache.c +--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/nsswitch/winbindd_cache.c 2003-07-02 23:19:02.000000000 -0500 +@@ -56,7 +56,7 @@ + if (opt_nocache) + return; + +- wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, ++ wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, + TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0600); + + if (!wcache->tdb) { +diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c samba-3.0.0beta2/source/nsswitch/winbindd_util.c +--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c 2003-07-01 15:44:25.000000000 -0500 ++++ samba-3.0.0beta2/source/nsswitch/winbindd_util.c 2003-07-02 23:19:02.000000000 -0500 +@@ -813,7 +813,7 @@ + SMB_STRUCT_STAT stbuf; + TDB_CONTEXT *idmap_tdb; + +- pstrcpy(idmap_name, lock_path("winbindd_idmap.tdb")); ++ pstrcpy(idmap_name, state_path("winbindd_idmap.tdb")); + + if (!file_exist(idmap_name, &stbuf)) { + /* nothing to convert return */ +diff -uNr samba-3.0.0beta2.orig/source/param/loadparm.c samba-3.0.0beta2/source/param/loadparm.c +--- samba-3.0.0beta2.orig/source/param/loadparm.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/param/loadparm.c 2003-07-02 23:19:02.000000000 -0500 +@@ -104,6 +104,9 @@ + char *szAddPrinterCommand; + char *szDeletePrinterCommand; + char *szOs2DriverMap; ++#ifdef FHS_COMPATIBLE ++ char *szLockDirStub; ++#endif + char *szLockDir; + char *szPidDir; + char *szRootdir; +@@ -1083,8 +1083,13 @@ + {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, + {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, + {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, ++#ifdef FHS_COMPATIBLE ++ {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, ++ {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, ++#else + {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED}, + {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, ++#endif + {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED}, + #ifdef WITH_UTMP + {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED}, +diff -uNr samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c samba-3.0.0beta2/source/passdb/pdb_tdb.c +--- samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/pdb_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -501,10 +501,7 @@ + if (location) { + tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location); + } else { +- pstring tdbfile; +- get_private_directory(tdbfile); +- pstrcat(tdbfile, "/"); +- pstrcat(tdbfile, PASSDB_FILE_NAME); ++ char *tdbfile = state_path(PASSDB_FILE_NAME); + tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile); + } + +diff -uNr samba-3.0.0beta2.orig/source/passdb/privileges.c samba-3.0.0beta2/source/passdb/privileges.c +--- samba-3.0.0beta2.orig/source/passdb/privileges.c 2003-06-07 12:57:35.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/privileges.c 2003-07-02 23:19:02.000000000 -0500 +@@ -62,7 +62,7 @@ + /* initialise the privilege database */ + BOOL privilege_init(void) + { +- tdb = tdb_open_log(lock_path("privilege.tdb"), 0, TDB_DEFAULT, ++ tdb = tdb_open_log(state_path("privilege.tdb"), 0, TDB_DEFAULT, + O_RDWR|O_CREAT, 0600); + if (!tdb) { + DEBUG(0,("Failed to open privilege database\n")); +diff -uNr samba-3.0.0beta2.orig/source/passdb/secrets.c samba-3.0.0beta2/source/passdb/secrets.c +--- samba-3.0.0beta2.orig/source/passdb/secrets.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/passdb/secrets.c 2003-07-02 23:19:02.000000000 -0500 +@@ -37,8 +37,7 @@ + if (tdb) + return True; + +- pstrcpy(fname, lp_private_dir()); +- pstrcat(fname,"/secrets.tdb"); ++ pstrcpy(fname, state_path("secrets.tdb")); + + tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + +diff -uNr samba-3.0.0beta2.orig/source/printing/nt_printing.c samba-3.0.0beta2/source/printing/nt_printing.c +--- samba-3.0.0beta2.orig/source/printing/nt_printing.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/nt_printing.c 2003-07-02 23:19:02.000000000 -0500 +@@ -293,28 +293,28 @@ + + if (tdb_drivers) + tdb_close(tdb_drivers); +- tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_drivers) { + DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n", +- lock_path("ntdrivers.tdb"), strerror(errno) )); ++ state_path("ntdrivers.tdb"), strerror(errno) )); + return False; + } + + if (tdb_printers) + tdb_close(tdb_printers); +- tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_printers) { + DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n", +- lock_path("ntprinters.tdb"), strerror(errno) )); ++ state_path("ntprinters.tdb"), strerror(errno) )); + return False; + } + + if (tdb_forms) + tdb_close(tdb_forms); +- tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!tdb_forms) { + DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n", +- lock_path("ntforms.tdb"), strerror(errno) )); ++ state_path("ntforms.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/printing/printing.c samba-3.0.0beta2/source/printing/printing.c +--- samba-3.0.0beta2.orig/source/printing/printing.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/printing.c 2003-07-02 23:19:02.000000000 -0500 +@@ -174,8 +174,8 @@ + if (local_pid == sys_getpid()) + return True; + +- unlink(lock_path("printing.tdb")); +- pstrcpy(printing_path,lock_path("printing")); ++ unlink(cache_path("printing.tdb")); ++ pstrcpy(printing_path,cache_path("printing")); + mkdir(printing_path,0755); + + local_pid = sys_getpid(); +diff -uNr samba-3.0.0beta2.orig/source/printing/printing_db.c samba-3.0.0beta2/source/printing/printing_db.c +--- samba-3.0.0beta2.orig/source/printing/printing_db.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/printing/printing_db.c 2003-07-02 23:19:02.000000000 -0500 +@@ -86,7 +86,7 @@ + DLIST_ADD(print_db_head, p); + } + +- pstrcpy(printdb_path, lock_path("printing/")); ++ pstrcpy(printdb_path, cache_path("printing/")); + pstrcat(printdb_path, printername); + pstrcat(printdb_path, ".tdb"); + +diff -uNr samba-3.0.0beta2.orig/source/registry/reg_db.c samba-3.0.0beta2/source/registry/reg_db.c +--- samba-3.0.0beta2.orig/source/registry/reg_db.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/registry/reg_db.c 2003-07-02 23:19:02.000000000 -0500 +@@ -131,13 +131,13 @@ + * if we need to init the data in the registry + */ + +- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); ++ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); + if ( !tdb_reg ) + { +- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if ( !tdb_reg ) { + DEBUG(0,("init_registry: Failed to open registry %s (%s)\n", +- lock_path("registry.tdb"), strerror(errno) )); ++ state_path("registry.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c +--- samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:19:02.000000000 -0500 +@@ -133,10 +133,10 @@ + + if (share_tdb && local_pid == sys_getpid()) + return True; +- share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); ++ share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (!share_tdb) { + DEBUG(0,("Failed to open share info database %s (%s)\n", +- lock_path("share_info.tdb"), strerror(errno) )); ++ state_path("share_info.tdb"), strerror(errno) )); + return False; + } + +diff -uNr samba-3.0.0beta2.orig/source/sam/idmap_tdb.c samba-3.0.0beta2/source/sam/idmap_tdb.c +--- samba-3.0.0beta2.orig/source/sam/idmap_tdb.c 2003-07-01 15:44:26.000000000 -0500 ++++ samba-3.0.0beta2/source/sam/idmap_tdb.c 2003-07-02 23:19:02.000000000 -0500 +@@ -487,7 +487,7 @@ + BOOL tdb_is_new = False; + + /* use the old database if present */ +- tdbfile = strdup(lock_path("winbindd_idmap.tdb")); ++ tdbfile = strdup(state_path("winbindd_idmap.tdb")); + if (!tdbfile) { + DEBUG(0, ("idmap_init: out of memory!\n")); + return NT_STATUS_NO_MEMORY; +diff -uNr samba-3.0.0beta2.orig/source/smbd/lanman.c samba-3.0.0beta2/source/smbd/lanman.c +--- samba-3.0.0beta2.orig/source/smbd/lanman.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/smbd/lanman.c 2003-07-02 23:19:02.000000000 -0500 +@@ -966,9 +966,9 @@ + BOOL local_list_only; + int i; + +- lines = file_lines_load(lock_path(SERVER_LIST), NULL); ++ lines = file_lines_load(cache_path(SERVER_LIST), NULL); + if (!lines) { +- DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno))); ++ DEBUG(4,("Can't open %s - %s\n",cache_path(SERVER_LIST),strerror(errno))); + return(0); + } + +diff -uNr samba-3.0.0beta2.orig/source/wrepld/process.c samba-3.0.0beta2/source/wrepld/process.c +--- samba-3.0.0beta2.orig/source/wrepld/process.c 2003-07-02 23:26:47.000000000 -0500 ++++ samba-3.0.0beta2/source/wrepld/process.c 2003-07-02 23:19:02.000000000 -0500 +@@ -197,7 +197,7 @@ + { + TDB_CONTEXT *tdb; + +- tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); ++ tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); + if (!tdb) { + DEBUG(2,("get_our_last_id: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); + return; +@@ -489,7 +489,7 @@ + } + + +- tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); ++ tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); + if (!tdb) { + DEBUG(2,("send_entry_request: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); + return; diff --git a/packaging/Debian/debian-stable/patches/installswat.sh.patch b/packaging/Debian/debian-stable/patches/installswat.sh.patch new file mode 100644 index 00000000000..8bd120257e9 --- /dev/null +++ b/packaging/Debian/debian-stable/patches/installswat.sh.patch @@ -0,0 +1,51 @@ +--- samba-3.0.1/source/script/installswat.sh.orig Fri Dec 19 14:49:40 2003 ++++ samba-3.0.1/source/script/installswat.sh Fri Dec 19 14:48:49 2003 +@@ -9,7 +9,7 @@ + echo Installing the Samba Web Administration Tool + + LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" +-echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` ++echo Installing the following additional langs: `cd $SRCDIR../swat/lang/; /bin/echo ??` + + for ln in $LANGS; do + SWATLANGDIR=$SWATDIR/$ln +@@ -23,11 +23,8 @@ + fi + fi + done +-done +- +-# Install images +-for ln in $LANGS; do + ++ # Install images + for f in $SRCDIR../swat/$ln/images/*.gif; do + if [ ! -f $f ] ; then + continue +@@ -38,8 +35,7 @@ + chmod 0644 $FNAME + done + +- # Install html help +- ++ # Install html hel + for f in $SRCDIR../swat/$ln/help/*.html; do + if [ ! -f $f ] ; then + continue +@@ -58,7 +54,6 @@ + done + + # Install "server-side" includes +- + for f in $SRCDIR../swat/$ln/include/*.html; do + if [ ! -f $f ] ; then + continue +@@ -78,7 +73,7 @@ + for f in $SRCDIR../docs/htmldocs/*.html; do + FNAME=$SWATDIR/help/`basename $f` + echo $FNAME +- cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? ++ ln -s ../../../doc/samba-doc/htmldocs/`basename $f` $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + fi diff --git a/packaging/Debian/debian/patches/nmbd-signalling.patch b/packaging/Debian/debian-stable/patches/nmbd-signalling.patch index ca04cce3bfa..ca04cce3bfa 100644 --- a/packaging/Debian/debian/patches/nmbd-signalling.patch +++ b/packaging/Debian/debian-stable/patches/nmbd-signalling.patch diff --git a/packaging/Debian/debian-stable/patches/samba.patch b/packaging/Debian/debian-stable/patches/samba.patch new file mode 100644 index 00000000000..dd1303ad90c --- /dev/null +++ b/packaging/Debian/debian-stable/patches/samba.patch @@ -0,0 +1,65 @@ +diff -uNr samba-3.0.0beta1.orig/source/client/smbmount.c samba-3.0.0beta1/source/client/smbmount.c +--- samba-3.0.0beta1.orig/source/client/smbmount.c 2003-06-07 12:57:32.000000000 -0500 ++++ samba-3.0.0beta1/source/client/smbmount.c 2003-06-30 20:12:22.000000000 -0500 +@@ -765,7 +765,7 @@ + *lp = 0; + pstrcpy(password,lp+1); + got_pass = True; +- memset(strchr_m(opteq+1,'%')+1,'X',strlen(password)); ++ memset(strchr_m(opteq+1,'%')+1,'\0',strlen(password)); + } + if ((lp=strchr_m(username,'/'))) { + *lp = 0; +@@ -775,7 +775,7 @@ + !strcmp(opts, "password")) { + pstrcpy(password,opteq+1); + got_pass = True; +- memset(opteq+1,'X',strlen(password)); ++ memset(opteq+1,'\0',strlen(password)); + } else if(!strcmp(opts, "credentials")) { + pstrcpy(credentials,opteq+1); + } else if(!strcmp(opts, "netbiosname")) { +@@ -889,7 +901,7 @@ + *p = 0; + pstrcpy(password,p+1); + got_pass = True; +- memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password)); ++ memset(strchr_m(getenv("USER"),'%')+1,'\0',strlen(password)); + } + strupper_m(username); + } +diff -uNr samba-3.0.0beta1.orig/source/script/installbin.sh samba-3.0.0beta1/source/script/installbin.sh +--- samba-3.0.0beta1.orig/source/script/installbin.sh 2002-04-22 13:16:20.000000000 -0500 ++++ samba-3.0.0beta1/source/script/installbin.sh 2003-06-30 20:12:22.000000000 -0500 +@@ -22,12 +22,14 @@ + chmod $INSTALLPERMS $BINDIR/$p2 + + # this is a special case, mount needs this in a specific location +- if [ $p2 = smbmount ]; then +- if [ ! -d $DESTDIR/sbin ]; then +- mkdir $DESTDIR/sbin +- fi +- ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs +- fi ++# Commented out for the Debian Samba package. We take care of this ++# important symlink in debian/rules. (peloy@debian.org) ++# if [ $p2 = smbmount ]; then ++# if [ ! -d $DESTDIR/sbin ]; then ++# mkdir $DESTDIR/sbin ++# fi ++# ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs ++# fi + done + + +diff -uNr samba-3.0.0beta1.orig/source/web/diagnose.c samba-3.0.0beta1/source/web/diagnose.c +--- samba-3.0.0beta1.orig/source/web/diagnose.c 2003-06-07 12:57:41.000000000 -0500 ++++ samba-3.0.0beta1/source/web/diagnose.c 2003-06-30 20:12:22.000000000 -0500 +@@ -70,6 +70,7 @@ + static struct cli_state cli; + extern struct in_addr loopback_ip; + ++ loopback_ip.s_addr = htonl((127 << 24) + 1); + if (!cli_initialise(&cli)) + return False; + diff --git a/packaging/Debian/debian/patches/smbclient-pager.patch b/packaging/Debian/debian-stable/patches/smbclient-pager.patch index 3ee85d4118c..3ee85d4118c 100644 --- a/packaging/Debian/debian/patches/smbclient-pager.patch +++ b/packaging/Debian/debian-stable/patches/smbclient-pager.patch diff --git a/packaging/Debian/debian/patches/smbclient-tar.patch.unused b/packaging/Debian/debian-stable/patches/smbclient-tar.patch.unused index e2a4c3ce2c0..e2a4c3ce2c0 100644 --- a/packaging/Debian/debian/patches/smbclient-tar.patch.unused +++ b/packaging/Debian/debian-stable/patches/smbclient-tar.patch.unused diff --git a/packaging/Debian/debian/patches/smbmount-mtab-flags.patch b/packaging/Debian/debian-stable/patches/smbmount-mtab-flags.patch index dac999dd63c..dac999dd63c 100644 --- a/packaging/Debian/debian/patches/smbmount-mtab-flags.patch +++ b/packaging/Debian/debian-stable/patches/smbmount-mtab-flags.patch diff --git a/packaging/Debian/debian/patches/smbmount-nomtab.patch b/packaging/Debian/debian-stable/patches/smbmount-nomtab.patch index 88071481705..88071481705 100644 --- a/packaging/Debian/debian/patches/smbmount-nomtab.patch +++ b/packaging/Debian/debian-stable/patches/smbmount-nomtab.patch diff --git a/packaging/Debian/debian-stable/patches/smbstatus-locking.patch b/packaging/Debian/debian-stable/patches/smbstatus-locking.patch new file mode 100644 index 00000000000..d37896a3699 --- /dev/null +++ b/packaging/Debian/debian-stable/patches/smbstatus-locking.patch @@ -0,0 +1,20 @@ +diff -uNr samba-2.999+3.0.alpha21.orig/source/utils/status.c samba-2.999+3.0.alpha21/source/utils/status.c +--- samba-2.999+3.0.alpha21.orig/source/utils/status.c 2002-11-26 20:54:22.000000000 -0600 ++++ samba-2.999+3.0.alpha21/source/utils/status.c 2002-12-16 23:37:14.000000000 -0600 +@@ -630,6 +630,16 @@ + if (!shares_only) { + int ret; + ++ tdb = tdb_open_log(lock_path("locking.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); ++ ++ if (!tdb) { ++ d_printf("%s not initialised\n", lock_path("locking.tdb")); ++ d_printf("This is normal if an SMB client has never connected to your server.\n"); ++ exit(0); ++ } else { ++ tdb_close(tdb); ++ } ++ + if (!locking_init(1)) { + d_printf("Can't initialise locking module - exiting\n"); + exit(1); diff --git a/packaging/Debian/debian/po/POTFILES.in b/packaging/Debian/debian-stable/po/POTFILES.in index 95a7ea81506..95a7ea81506 100644 --- a/packaging/Debian/debian/po/POTFILES.in +++ b/packaging/Debian/debian-stable/po/POTFILES.in diff --git a/packaging/Debian/debian/po/es.po b/packaging/Debian/debian-stable/po/es.po index 0d1d1a770de..0d1d1a770de 100644 --- a/packaging/Debian/debian/po/es.po +++ b/packaging/Debian/debian-stable/po/es.po diff --git a/packaging/Debian/debian/po/fr.po b/packaging/Debian/debian-stable/po/fr.po index 6be14c19b43..6be14c19b43 100644 --- a/packaging/Debian/debian/po/fr.po +++ b/packaging/Debian/debian-stable/po/fr.po diff --git a/packaging/Debian/debian/po/nl.po b/packaging/Debian/debian-stable/po/nl.po index 61e8742dbb5..61e8742dbb5 100644 --- a/packaging/Debian/debian/po/nl.po +++ b/packaging/Debian/debian-stable/po/nl.po diff --git a/packaging/Debian/debian/po/pt_BR.po b/packaging/Debian/debian-stable/po/pt_BR.po index 2af42a562b9..2af42a562b9 100644 --- a/packaging/Debian/debian/po/pt_BR.po +++ b/packaging/Debian/debian-stable/po/pt_BR.po diff --git a/packaging/Debian/debian/po/templates.pot b/packaging/Debian/debian-stable/po/templates.pot index 465f4719b0d..465f4719b0d 100644 --- a/packaging/Debian/debian/po/templates.pot +++ b/packaging/Debian/debian-stable/po/templates.pot diff --git a/packaging/Debian/debian-stable/python2.2-samba.files b/packaging/Debian/debian-stable/python2.2-samba.files new file mode 100644 index 00000000000..a24e2b98c80 --- /dev/null +++ b/packaging/Debian/debian-stable/python2.2-samba.files @@ -0,0 +1 @@ +usr/lib/python2.2/site-packages/ diff --git a/packaging/Debian/debian-stable/rules b/packaging/Debian/debian-stable/rules new file mode 100755 index 00000000000..676162a39f1 --- /dev/null +++ b/packaging/Debian/debian-stable/rules @@ -0,0 +1,300 @@ +#!/usr/bin/make -f +# +# Important modifications (introduction of a saved config.cache to +# solve build problems) introduced in Samba 2.2.1a-5. These +# modification were made by Steve Langasek <vorlon@netexpress.net>. +# +# config.cache *DISABLED* to solve problems caused incorrect settings +# --SSS +# +# + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=4 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Set the host and build architectures for use with config.cache loading, +# cross-building, etc. +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +export DEB_HOST_GNU_TYPE +export DEB_BUILD_GNU_TYPE + + +# Support the DEB_BUILD_OPTIONS variable +CFLAGS = -gstabs -Wall +INSTALL = install + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL += -s +endif + + +DESTDIR=`pwd`/debian/tmp + +patch: patch-stamp +patch-stamp: + dh_testdir + if [ ! -f patch-stamp ]; then /bin/sh debian/scripts/patch-source; fi + touch patch-stamp + +unpatch: + dh_testdir + if [ -f patch-stamp ]; then /bin/sh debian/scripts/unpatch-source; fi + rm -f patch-stamp + +configure: patch-stamp configure-stamp +configure-stamp: + dh_testdir + +# if [ -f debian/config.cache ]; then \ +# cp -f debian/config.cache source/config.cache; \ +# fi + + [ -f source/Makefile ] || (cd source && CFLAGS="$(CFLAGS)" ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --with-fhs \ + --enable-shared \ + --enable-static \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/etc/samba \ + --with-privatedir=/etc/samba \ + --localstatedir=/var \ + --with-netatalk \ + --with-smbmount \ + --with-pam \ + --with-syslog \ + --with-utmp \ + --with-readline \ + --with-pam_smbpass \ + --with-libsmbclient \ + --with-msdfs \ + --with-automount \ + --with-acl-support \ + --with-quotas \ + --with-ldap \ + --with-python=python2.2) + + touch configure-stamp + +build: patch-stamp configure-stamp build-stamp +build-stamp: + dh_testdir + + $(MAKE) -C source headers + $(MAKE) -C source all nsswitch/libnss_wins.so python_ext + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Clean first the Samba package +# -$(MAKE) -C source realclean +# -$(MAKE) -C source clean + -$(MAKE) -C source python_clean distclean + + # Delete stuff left after a build that is not deleted by 'make clean' + rm -f source/bin/wbinfo source/bin/winbindd source/bin/debug2html \ + source/bin/libsmbclient.a source/include/stamp-h + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + mkdir -p $(DESTDIR)/usr/share/man $(DESTDIR)/usr/lib \ + $(DESTDIR)/lib/security $(DESTDIR)/sbin $(DESTDIR)/etc/samba \ + $(DESTDIR)/usr/lib/cups/backend $(DESTDIR)/usr/share/samba \ + $(DESTDIR)/etc/pam.d $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d \ + $(DESTDIR)/usr/lib/python2.2/site-packages + + # Add here commands to install the package into debian/tmp. + $(MAKE) -C source install DESTDIR=$(DESTDIR) + + # libsmbclient files are not installed by the standard + # 'make install' - do it manually. + $(MAKE) -C source installclientlib DESTDIR=$(DESTDIR) + mv $(DESTDIR)/usr/lib/libsmbclient.so $(DESTDIR)/usr/lib/libsmbclient.so.0.1 + ln -s libsmbclient.so.0.1 $(DESTDIR)/usr/lib/libsmbclient.so.0 + ln -s libsmbclient.so.0.1 $(DESTDIR)/usr/lib/libsmbclient.so + + # Install other stuff not installed by "make install" + install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd + + # Install winbind stuff not installed by 'make install' + install -m 0644 source/nsswitch/libnss_winbind.so \ + $(DESTDIR)/lib/libnss_winbind.so.2 + install -m 0644 source/nsswitch/pam_winbind.so \ + $(DESTDIR)/lib/security/ + + # Install libnss_wins.so, which is not installed by 'make install' either. + install -m 0644 source/nsswitch/libnss_wins.so \ + $(DESTDIR)/lib/libnss_wins.so.2 + + # pam_smbpass.so isn't being installed by 'make install'. + # We'll move it here to $(DESTDIR)/lib/security/ and then + # libpam-smbpass.files will make dh_movefiles move it to the + # right location in the libpam-smbpass package. + install -m 0644 source/bin/pam_smbpass.so $(DESTDIR)/lib/security/ + + # Create the symlink that will allow us to do "mount -t smbfs ...". + # Create also a symlink that will allow "mount -t smb ..." to + # work too. The symlink is created in $(DESTDIR)/sbin/ but + # will be moved by dh_movefiles to the smbfs package later on. + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smbfs + ln -s /usr/bin/smbmount $(DESTDIR)/sbin/mount.smb + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smb.8 + ln -s smbmount.8 $(DESTDIR)/usr/share/man/man8/mount.smbfs.8 + + # For CUPS to support printing to samba printers, it's necessary + # to make the following symlink (according to + # Erich Schubert <debian@vitavonni.de> in #109509): + ln -s ../../../bin/smbspool $(DESTDIR)/usr/lib/cups/backend/smb + + # Install man pages for files without man pages in the upstream sources + install -m 0644 debian/mksmbpasswd.8 $(DESTDIR)/usr/share/man/man8/mksmbpasswd.8 + + # Delete unwanted stuff leftover from "make install" + + # The smbwrapper package is not being generated anymore, so we must + # delete the related man pages. + rm $(DESTDIR)/usr/share/man/man1/smbsh.1 + + # We're not providing findsmb (should we?) so let's remove the man + # pages. + find debian/ -name 'findsmb*' -exec rm -f {} \; + + # Install samba-common's conffiles - they'll get moved later to their + # correct place by dh_movefiles. + cp debian/smb.conf $(DESTDIR)/etc/samba/ + install -m755 debian/panic-action $(DESTDIR)/etc/samba/ + cp debian/gdbcommands $(DESTDIR)/etc/samba/ + cp debian/samba.pamd $(DESTDIR)/etc/pam.d/samba + install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp3/dhclient-enter-hooks.d/samba + + # Install the Python modules + # + #cp source/build/lib.*/samba/*.so $(DESTDIR)/usr/lib/python2.2/site-packages/ + cp source/build/lib.linux-*-2.2/samba/*.so $(DESTDIR)/usr/lib/python2.2/site-packages/ + + dh_movefiles + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: DH_OPTIONS=-i +binary-indep: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -A debian/README.build + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && DH_OPTIONS= dh_installexamples -v -psamba-doc examples/* +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + + # Get rid of those pesky .cvsignore files to make lintian happy + find debian/ -name .cvsignore -exec rm -f {} \; + + dh_installdeb +# dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +# Pass -a to all debhelper commands in this target to reduce clutter. +binary-arch: DH_OPTIONS=-a +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -A debian/README.build + # dh_installexamples is not available in Debian Potato... + [ -x /usr/bin/dh_installexamples ] && DH_OPTIONS= dh_installexamples -v -ppython2.2-samba source/python/examples/* +# dh_installmenu + # dh_installlogrotate is not available in Debian Potato... + if [ -x /usr/bin/dh_installlogrotate ]; then \ + dh_installlogrotate; \ + else \ + mkdir -p debian/samba/etc/logrotate.d; \ + cp debian/samba.logrotate debian/samba/etc/logrotate.d/samba; \ + mkdir -p debian/winbind/etc/logrotate.d; \ + cp debian/winbind.logrotate debian/winbind/etc/logrotate.d/winbind; \ + fi +# dh_installemacsen +# dh_installpam + DH_OPTIONS= dh_installinit -psamba -- "defaults 20 19" + DH_OPTIONS= dh_installinit -pwinbind + dh_installcron +# dh_installmanpages +# dh_installinfo + cp debian/winbind.lintian debian/winbind/usr/share/lintian/overrides/winbind +# dh_undocumented + dh_installchangelogs -Nlibpam-smbpass + DH_OPTIONS= dh_installchangelogs -plibpam-smbpass source/pam_smbpass/CHANGELOG + dh_strip + dh_link + dh_compress + dh_fixperms + + # Why this is executable, I have NO idea... + chmod a-x debian/libsmbclient-dev/usr/include/libsmbclient.h + + # You may want to make some executables suid here. + # The smbmnt and smbumount binaries should be setuid-root. This + # has security implications because these programs haven't had + # a thorough security audit. smbmount _does not_ have to have + # the setuid bit set. In fact, it is a security hole. + chmod u+s debian/smbfs/usr/bin/smbmnt + chmod u+s debian/smbfs/usr/bin/smbumount + + # Set some reasonable default perms for the samba logdir. + chmod 0750 debian/samba/var/log/samba/ + chown root.adm debian/samba/var/log/samba/ + + # Get rid of those pesky .cvsignore files to make lintian happy + # (maybe we only need the "find ... -exec rm -f {} ;" we have + # in the binary-indep target?) peloy.- + find debian/ -name .cvsignore -exec rm -f {} \; + + dh_installdeb +# dh_makeshlibs +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/packaging/Debian/debian-stable/samba-common.config b/packaging/Debian/debian-stable/samba-common.config new file mode 100644 index 00000000000..ed76b95cb84 --- /dev/null +++ b/packaging/Debian/debian-stable/samba-common.config @@ -0,0 +1,154 @@ +#/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Function for grabbing a parameter from an smb.conf file +smbconf_retr() { + if [ -z "$1" ]; then + return + fi + + if [ -n "$2" ]; then + local FILE="$2" + fi + + if [ -z "$FILE" ]; then + return + fi + + sed -n -e" + s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ { + s/^[[:space:]]*$1[[:space:]]*=[[:space:]]*//pi + }" $FILE \ + | tail -1 +} + +FILE=/etc/samba/smb.conf + +db_title "Samba Server" + +# We ask the question IFF the config contains complex options that could +# cause us to break the config. +if [ -f "$FILE" ] && grep -v dhcp.conf $FILE \ + | grep -qEi '\\$|^[[:space:]]*include[[:space:]]*=' +then + db_input high samba-common/do_debconf || true + db_go +else + db_set samba-common/do_debconf true +fi + +# If user doesn't want to use debconf to configure Samba the leave... +db_get samba-common/do_debconf || true +if [ "${RET}" = "false" ]; then + exit 0 +fi + +# User wants to use debconf, let's continue... + +# Adjust priority of the question about the workgroup name depending +# on whether a workgroup name has already being specified. +db_get samba-common/workgroup || true +if [ "${RET}" ]; then + WGPRIORITY=medium +else + WGPRIORITY=high +fi + +# Preload any values from the existing smb.conf file +if [ -f $FILE ]; then + WORKGROUP=`smbconf_retr workgroup` + if [ "$WORKGROUP" ]; then + db_set samba-common/workgroup "$WORKGROUP" + fi + + ENCRYPT=`smbconf_retr "encrypt passwords"` + if [ "$ENCRYPT" ]; then + ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'` + if [ "$ENCRYPT" = "yes" ]; then + ENCRYPT=true + elif [ "$ENCRYPT" = "no" ]; then + ENCRYPT=false + fi + + db_set samba-common/encrypt_passwords "$ENCRYPT" + fi + + CHARSET=`smbconf_retr "character set"` + CODEPAGE=`smbconf_retr "client code page"` + UNIXCHARSET=`smbconf_retr "unix charset"` + DOSCHARSET=`smbconf_retr "dos charset"` + + # If we're upgrading from an old version and there's no + # 'passdb backend' setting, add one. + if [ "$1" = "configure" -a -n "$2" ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 \ + && ! grep -q -i '^[[:space:]]*passdb backend[[:space:]]*=' $FILE + then + TMPFILE=/etc/samba/smb.conf.dpkg-tmp + sed -e' + s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)encrypt passwords/\1encrypt passwords/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*encrypt passwords[[:space:]]*=/a \ + passdb backend = smbpasswd guest + }' < $FILE > ${TMPFILE} + chmod a+r ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi +fi + +# Get workgroup name +db_input $WGPRIORITY samba-common/workgroup || true +db_go + +# Use encrypted passwords? +db_input medium samba-common/encrypt_passwords || true +db_go + +# Handle migrating character sets +if [ -n "$CHARSET" -a -z "$UNIXCHARSET" ] +then + UNIXCHARSET=`echo $CHARSET | sed -e's/iso-/ISO/i'` + db_set samba-common/character_set "$UNIXCHARSET" + # FIXME: should eventually be low. + db_input medium samba-common/character_set || true + db_go +fi + +if [ -n "$CODEPAGE" -a -z "$DOSCHARSET" ] +then + DOSCHARSET=CP`echo $CODEPAGE | sed -e's/[[:alpha:]]*//g'` + db_set samba-common/codepage "$DOSCHARSET" + # FIXME: should eventually be low. + db_input medium samba-common/codepage || true + db_go +fi + +DHCPPRIORITY=medium +#if [ "$DEBCONF_RECONFIGURE" = 1 ] && [ -f /sbin/dhclient3 ] +if [ -f /sbin/dhclient3 ] +then + DHCPPRIORITY=high +# TODO: see if we can detect that dhcp3-client is *going* to be installed, +# even if it isn't yet. +#elif dpkg-query -W --showformat='${Status}\n' dhcp3-client | grep ??? +# unknown ok not-installed ? +# DHCPPRIORITY=high +fi + +if [ ! -f $FILE ] || grep -q -i 'wins server' $FILE +then + # check the values before and after; unset the 'applied' flag + # if they don't match. + db_get samba-common/dhcp || true + OLDDHCP="$RET" + db_input $DHCPPRIORITY samba-common/dhcp || true + db_go + db_get samba-common/dhcp || true + if [ "$OLDDHCP" != "$RET" ]; then + db_fset samba-common/dhcp applied false + fi +fi diff --git a/packaging/Debian/debian-stable/samba-common.dhcp b/packaging/Debian/debian-stable/samba-common.dhcp new file mode 100644 index 00000000000..3b2fa4ba191 --- /dev/null +++ b/packaging/Debian/debian-stable/samba-common.dhcp @@ -0,0 +1,34 @@ +#!/bin/sh + +netbios_setup() { + # No need to continue if we're called with an unsupported option + + if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \ + && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \ + && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ] + then + return + fi + + umask 022 + + if [ -z "$new_netbios_name_servers" ] || [ "$reason" = FAIL ] \ + || [ "$reason" = EXPIRE ] + then + # FIXME: add sed magic to only remove wins servers + # associated with this interface + echo -n > /etc/samba/dhcp.conf + elif [ "$new_netbios_name_servers" != "$old_netbios_name_servers" ] + then + local serverlist="" + for server in $new_netbios_name_servers + do + serverlist="$serverlist $interface:$server" + done + # FIXME: add sed magic to only update wins servers + # associated with this interface + echo " wins server =$serverlist" > /etc/samba/dhcp.conf + fi +} + +netbios_setup diff --git a/packaging/Debian/debian/samba-common.dirs b/packaging/Debian/debian-stable/samba-common.dirs index c089ad73573..c089ad73573 100644 --- a/packaging/Debian/debian/samba-common.dirs +++ b/packaging/Debian/debian-stable/samba-common.dirs diff --git a/packaging/Debian/debian-stable/samba-common.files b/packaging/Debian/debian-stable/samba-common.files new file mode 100644 index 00000000000..0b6baff5f12 --- /dev/null +++ b/packaging/Debian/debian-stable/samba-common.files @@ -0,0 +1,19 @@ +etc/samba/gdbcommands +etc/samba/panic-action +etc/samba/smb.conf +etc/dhcp3/ +etc/pam.d/ +usr/bin/net +usr/bin/nmblookup +usr/bin/smbpasswd +usr/bin/testparm +usr/share/man/man1/nmblookup.1 +usr/share/man/man1/testparm.1 +usr/share/man/man5/lmhosts.5 +usr/share/man/man5/smb.conf.5 +usr/share/man/man7/samba.7 +usr/share/man/man8/net.8 +usr/share/man/man8/smbpasswd.8 +usr/share/samba/lowcase.dat +usr/share/samba/upcase.dat +usr/share/samba/valid.dat diff --git a/packaging/Debian/debian/samba-common.postinst b/packaging/Debian/debian-stable/samba-common.postinst index 6c6eb9bf537..6c6eb9bf537 100644 --- a/packaging/Debian/debian/samba-common.postinst +++ b/packaging/Debian/debian-stable/samba-common.postinst diff --git a/packaging/Debian/debian/samba-common.postrm b/packaging/Debian/debian-stable/samba-common.postrm index 8a4b6d3d55e..8a4b6d3d55e 100644 --- a/packaging/Debian/debian/samba-common.postrm +++ b/packaging/Debian/debian-stable/samba-common.postrm diff --git a/packaging/Debian/debian-stable/samba-common.templates b/packaging/Debian/debian-stable/samba-common.templates new file mode 100644 index 00000000000..9eb0676e936 --- /dev/null +++ b/packaging/Debian/debian-stable/samba-common.templates @@ -0,0 +1,66 @@ +Template: samba-common/character_set +Type: string +Description: Character Set for Unix filesystem + You currently have a "character set" configured in your smb.conf. In + Samba 3.0, this option is replaced by a new option, "unix charset". + Please specify the character set you wish to use for theis new option, + which controls how Samba interprets filenames on the file system. + . + If you leave this option blank, your smb.conf will not be changed. + +Template: samba-common/codepage +Type: string +Description: Character Set for DOS clients + You currently have a "client code page" set in your smb.conf. In Samba + 3.0, this option is replaced by the option "dos charset". Please specify + the character set you wish to use for this new option. In most cases, the + default chosen for you will be sufficient. Note that this option is not + needed to support Windows clients, it is only for DOS clients. If you + leave this option blank, your smb.conf will not be changed. + +Template: samba-common/dhcp +Type: boolean +Default: false +Description: Modify smb.conf to use WINS settings from DHCP? + If your computer gets IP address information from a DHCP server on the + network, the DHCP server may also provide information about WINS servers + ("NetBIOS name servers") present on the network. This requires a + change to your smb.conf file so that DHCP-provided WINS settings will + automatically be read from /etc/samba/dhcp.conf. + . + You must have the dhcp3-client package installed to take advantage of this + feature. + +Template: samba-common/do_debconf +Type: boolean +Default: true +Description: Configure smb.conf through debconf? + The rest of the configuration of Samba deals with questions that affect + parameters in /etc/samba/smb.conf, which is the file used to configure the + Samba programs (nmbd and smbd.) Your current smb.conf contains an + 'include' line or an option that spans multiple lines, which could confuse + debconf and require you to edit your smb.conf by hand to get it working + again. + . + If you don't use debconf to configure smb.conf, you will have to handle + any configuration changes yourself, and will not be able to take + advantage of periodic configuration enhancements. Therefore, use of + debconf is recommended if possible. + +Template: samba-common/workgroup +Type: string +Description: Workgroup/Domain Name? + This controls what workgroup your server will appear to be in when queried + by clients. Note that this parameter also controls the Domain name used + with the security=domain setting. + +Template: samba-common/encrypt_passwords +Type: boolean +Default: true +Description: Use password encryption? + Recent Windows clients communicate with SMB servers using encrypted + passwords. If you want to use clear text passwords you will need to change + a parameter in your Windows registry. It is recommended that you use + encrypted passwords. If you do, make sure you have a valid + /etc/samba/smbpasswd file and that you set passwords in there for each + user using the smbpasswd command. diff --git a/packaging/Debian/debian-stable/samba-doc.docs b/packaging/Debian/debian-stable/samba-doc.docs new file mode 100644 index 00000000000..28be0373206 --- /dev/null +++ b/packaging/Debian/debian-stable/samba-doc.docs @@ -0,0 +1,6 @@ +README +docs/Samba-HOWTO-Collection.pdf +docs/THANKS +docs/history +docs/htmldocs/ +docs/registry/ diff --git a/packaging/Debian/debian/samba-doc.examples b/packaging/Debian/debian-stable/samba-doc.examples index e71180364cf..e71180364cf 100644 --- a/packaging/Debian/debian/samba-doc.examples +++ b/packaging/Debian/debian-stable/samba-doc.examples diff --git a/packaging/Debian/debian-stable/samba.config b/packaging/Debian/debian-stable/samba.config new file mode 100644 index 00000000000..89792d436e4 --- /dev/null +++ b/packaging/Debian/debian-stable/samba.config @@ -0,0 +1,92 @@ +#/bin/sh -e +# +# + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Function for grabbing a parameter from an smb.conf file +smbconf_retr() { + if [ -z "$1" ]; then + return + fi + + if [ -n "$2" ]; then + local FILE="$2" + fi + + if [ -z "$FILE" ]; then + return + fi + + sed -n -e" + s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ { + s/^[[:space:]]*$1[[:space:]]*=[[:space:]]*//pi + }" $FILE \ + | tail -1 +} + +FILE=/etc/samba/smb.conf + +db_title "Samba Server" + +# Babysit users who don't read README.Debian +if [ -n "$2" ] && dpkg --compare-versions "$2" lt "2.2" +then + db_input medium samba/log_files_moved || true + db_go +fi + +db_input medium samba/run_mode || true +db_go + + +# Offer to move the password database for existing users +if [ "$1" = "configure" -a -n "$2" -a -e /etc/samba/smbpasswd \ + -a ! -e /var/lib/samba/passdb.tdb ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 +then + FILE=/etc/samba/smb.conf + PASSDB="" + if [ -f "$FILE" ]; then + PASSDB=`smbconf_retr "passdb backend"` + fi + TDBPRIORITY=medium + if echo "$PASSDB" | grep -q ldapsam; then + TDBPRIORITY=low + fi + db_get samba-common/do_debconf || true + if [ "${RET}" = "false" ]; then + TDBPRIORITY=low + fi + + db_input "$TDBPRIORITY" samba/tdbsam || true +fi + +# We vary the priority of the next question depending on whether +# the password database already exists... +if [ -e /etc/samba/smbpasswd -o -e /var/lib/samba/passdb.tdb ]; then + PRIORITY="low" +else + # If 'encrypt passwords' is true in smb.conf, and smbpasswd + # does not exist, default to yes here. + FILE=/etc/samba/smb.conf + if [ -f "$FILE" ]; then + ENCRYPT=`smbconf_retr "encrypt passwords"` + if [ "$ENCRYPT" ]; then + ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'` + if [ "$ENCRYPT" = "yes" ]; then + ENCRYPT=true + fi + if [ "$ENCRYPT" = "no" ]; then + ENCRYPT=false + fi + fi + db_set samba/generate_smbpasswd "$ENCRYPT" + fi + PRIORITY="medium" +fi + +db_input $PRIORITY samba/generate_smbpasswd || true +db_go diff --git a/packaging/Debian/debian/samba.cron.daily b/packaging/Debian/debian-stable/samba.cron.daily index 42fc98d8f6d..42fc98d8f6d 100644 --- a/packaging/Debian/debian/samba.cron.daily +++ b/packaging/Debian/debian-stable/samba.cron.daily diff --git a/packaging/Debian/debian-stable/samba.dirs b/packaging/Debian/debian-stable/samba.dirs new file mode 100644 index 00000000000..33178f42d2b --- /dev/null +++ b/packaging/Debian/debian-stable/samba.dirs @@ -0,0 +1,9 @@ +etc/samba +usr/bin +usr/sbin +usr/lib/samba +var/log/samba +var/lib/samba/printers/W32X86 +var/lib/samba/printers/WIN40 +var/run/samba +var/cache/samba diff --git a/packaging/Debian/debian-stable/samba.docs b/packaging/Debian/debian-stable/samba.docs new file mode 100644 index 00000000000..d38ff256ee0 --- /dev/null +++ b/packaging/Debian/debian-stable/samba.docs @@ -0,0 +1,4 @@ +Manifest +README +REVISION +WHATSNEW.txt diff --git a/packaging/Debian/debian/samba.files b/packaging/Debian/debian-stable/samba.files index f52e6c5e4f7..f52e6c5e4f7 100644 --- a/packaging/Debian/debian/samba.files +++ b/packaging/Debian/debian-stable/samba.files diff --git a/packaging/Debian/debian/samba.init b/packaging/Debian/debian-stable/samba.init index 5d0f4671a00..5d0f4671a00 100644 --- a/packaging/Debian/debian/samba.init +++ b/packaging/Debian/debian-stable/samba.init diff --git a/packaging/Debian/debian/samba.logrotate b/packaging/Debian/debian-stable/samba.logrotate index f90437bf2ad..f90437bf2ad 100644 --- a/packaging/Debian/debian/samba.logrotate +++ b/packaging/Debian/debian-stable/samba.logrotate diff --git a/packaging/Debian/debian-stable/samba.pamd b/packaging/Debian/debian-stable/samba.pamd new file mode 100644 index 00000000000..5db2bbd31f3 --- /dev/null +++ b/packaging/Debian/debian-stable/samba.pamd @@ -0,0 +1,3 @@ +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so diff --git a/packaging/Debian/debian/samba.postinst b/packaging/Debian/debian-stable/samba.postinst index 7b0bdd92ad5..7b0bdd92ad5 100644 --- a/packaging/Debian/debian/samba.postinst +++ b/packaging/Debian/debian-stable/samba.postinst diff --git a/packaging/Debian/debian/samba.postrm b/packaging/Debian/debian-stable/samba.postrm index b79fe1d0099..b79fe1d0099 100644 --- a/packaging/Debian/debian/samba.postrm +++ b/packaging/Debian/debian-stable/samba.postrm diff --git a/packaging/Debian/debian/samba.prerm b/packaging/Debian/debian-stable/samba.prerm index ab62c706d85..ab62c706d85 100644 --- a/packaging/Debian/debian/samba.prerm +++ b/packaging/Debian/debian-stable/samba.prerm diff --git a/packaging/Debian/debian-stable/samba.templates b/packaging/Debian/debian-stable/samba.templates new file mode 100644 index 00000000000..e7fcd1d4ccb --- /dev/null +++ b/packaging/Debian/debian-stable/samba.templates @@ -0,0 +1,50 @@ +Template: samba/generate_smbpasswd +Type: boolean +Default: false +Description: Create samba password database, /var/lib/samba/passdb.tdb? + To be compatible with the defaults in most versions of Windows, Samba must + be configured to use encrypted passwords. This requires user passwords to + be stored in a file separate from /etc/passwd. This file can be created + automatically, but the passwords must be added manually (by you or the + user) by running smbpasswd, and you must arrange to keep it up-to-date in + the future. If you do not create it, you will have to reconfigure samba + (and probably your client machines) to use plaintext passwords. See + /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc + package for more details. + +Template: samba/log_files_moved +Type: note +Description: Samba's log files have moved. + Starting with the first packages of Samba 2.2 for Debian the log files for + both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The + names of the files are log.nmbd and log.smbd, for nmbd and smbd + respectively. + . + The old log files that were in /var/log/ will be moved to the new location + for you. + +Template: samba/nmbd_from_inetd +Type: note +Description: Running nmbd from inetd is no longer supported + Your system was previously configured to start nmbd and smbd from inetd. + As of version 2.999+3.0.alpha20-4, nmbd will no longer be started from + inetd. If you have modified your /etc/init.d/samba startup script, you + may need to adjust it by hand now so that nmbd will start. + +Template: samba/run_mode +Type: select +Choices: daemons, inetd +Default: daemons +Description: How do you want to run Samba? + The Samba daemon smbd can run as a normal daemon or from inetd. Running as + a daemon is the recommended approach. + +Template: samba/tdbsam +Type: boolean +Default: false +Description: Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb? + Samba 3.0 introduces a newer, more complete SAM database interface which + supersedes the /etc/samba/smbpasswd file. Would you like your existing + smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you + plan to use another pdb backend (e.g., LDAP) instead, you should answer + 'no' here. diff --git a/packaging/Debian/debian/scripts/patch-source b/packaging/Debian/debian-stable/scripts/patch-source index a8559b41676..a8559b41676 100755 --- a/packaging/Debian/debian/scripts/patch-source +++ b/packaging/Debian/debian-stable/scripts/patch-source diff --git a/packaging/Debian/debian/scripts/unpatch-source b/packaging/Debian/debian-stable/scripts/unpatch-source index d3681cfa504..d3681cfa504 100755 --- a/packaging/Debian/debian/scripts/unpatch-source +++ b/packaging/Debian/debian-stable/scripts/unpatch-source diff --git a/packaging/Debian/debian/smb.conf b/packaging/Debian/debian-stable/smb.conf index 8a75979945a..8a75979945a 100644 --- a/packaging/Debian/debian/smb.conf +++ b/packaging/Debian/debian-stable/smb.conf diff --git a/packaging/Debian/debian/smbclient.files b/packaging/Debian/debian-stable/smbclient.files index 96e8945bf3d..96e8945bf3d 100644 --- a/packaging/Debian/debian/smbclient.files +++ b/packaging/Debian/debian-stable/smbclient.files diff --git a/packaging/Debian/debian/smbfs.files b/packaging/Debian/debian-stable/smbfs.files index 870db7d6453..870db7d6453 100644 --- a/packaging/Debian/debian/smbfs.files +++ b/packaging/Debian/debian-stable/smbfs.files diff --git a/packaging/Debian/debian/smbwrapper.dirs b/packaging/Debian/debian-stable/smbwrapper.dirs index fd727bddf05..fd727bddf05 100644 --- a/packaging/Debian/debian/smbwrapper.dirs +++ b/packaging/Debian/debian-stable/smbwrapper.dirs diff --git a/packaging/Debian/debian/smbwrapper.docs b/packaging/Debian/debian-stable/smbwrapper.docs index 2924e78734a..2924e78734a 100644 --- a/packaging/Debian/debian/smbwrapper.docs +++ b/packaging/Debian/debian-stable/smbwrapper.docs diff --git a/packaging/Debian/debian/smbwrapper.files b/packaging/Debian/debian-stable/smbwrapper.files index 08edbead6e6..08edbead6e6 100644 --- a/packaging/Debian/debian/smbwrapper.files +++ b/packaging/Debian/debian-stable/smbwrapper.files diff --git a/packaging/Debian/debian/swat.config b/packaging/Debian/debian-stable/swat.config index e210fae55ea..e210fae55ea 100644 --- a/packaging/Debian/debian/swat.config +++ b/packaging/Debian/debian-stable/swat.config diff --git a/packaging/Debian/debian/swat.dirs b/packaging/Debian/debian-stable/swat.dirs index d5df7df4b8e..d5df7df4b8e 100644 --- a/packaging/Debian/debian/swat.dirs +++ b/packaging/Debian/debian-stable/swat.dirs diff --git a/packaging/Debian/debian/swat.files b/packaging/Debian/debian-stable/swat.files index 82fdf104d35..82fdf104d35 100644 --- a/packaging/Debian/debian/swat.files +++ b/packaging/Debian/debian-stable/swat.files diff --git a/packaging/Debian/debian/swat.postinst b/packaging/Debian/debian-stable/swat.postinst index 338f8a07c23..338f8a07c23 100644 --- a/packaging/Debian/debian/swat.postinst +++ b/packaging/Debian/debian-stable/swat.postinst diff --git a/packaging/Debian/debian/swat.postrm b/packaging/Debian/debian-stable/swat.postrm index 6bc5873096e..6bc5873096e 100644 --- a/packaging/Debian/debian/swat.postrm +++ b/packaging/Debian/debian-stable/swat.postrm diff --git a/packaging/Debian/debian-stable/swat.templates b/packaging/Debian/debian-stable/swat.templates new file mode 100644 index 00000000000..0e6ac9f1060 --- /dev/null +++ b/packaging/Debian/debian-stable/swat.templates @@ -0,0 +1,6 @@ +Template: swat/smb_conf_warn +Type: note +Description: Your smb.conf will be re-written! + SWAT will rewrite your smb.conf file. It will rearrange the entries and + delete all comments, include= and copy= options. If you have a carefully + crafted smb.conf then back it up or don't use SWAT! diff --git a/packaging/Debian/debian/winbind.dirs b/packaging/Debian/debian-stable/winbind.dirs index 1da8fba83ad..1da8fba83ad 100644 --- a/packaging/Debian/debian/winbind.dirs +++ b/packaging/Debian/debian-stable/winbind.dirs diff --git a/packaging/Debian/debian/winbind.files b/packaging/Debian/debian-stable/winbind.files index fbb76774d42..fbb76774d42 100644 --- a/packaging/Debian/debian/winbind.files +++ b/packaging/Debian/debian-stable/winbind.files diff --git a/packaging/Debian/debian/winbind.init b/packaging/Debian/debian-stable/winbind.init index 2dfdf3b8352..2dfdf3b8352 100644 --- a/packaging/Debian/debian/winbind.init +++ b/packaging/Debian/debian-stable/winbind.init diff --git a/packaging/Debian/debian/winbind.lintian b/packaging/Debian/debian-stable/winbind.lintian index fca17d3cca1..fca17d3cca1 100644 --- a/packaging/Debian/debian/winbind.lintian +++ b/packaging/Debian/debian-stable/winbind.lintian diff --git a/packaging/Debian/debian/winbind.logrotate b/packaging/Debian/debian-stable/winbind.logrotate index e36cd1281c5..e36cd1281c5 100644 --- a/packaging/Debian/debian/winbind.logrotate +++ b/packaging/Debian/debian-stable/winbind.logrotate diff --git a/packaging/Debian/debian/wins2dns.awk b/packaging/Debian/debian-stable/wins2dns.awk index 176868a115d..176868a115d 100644 --- a/packaging/Debian/debian/wins2dns.awk +++ b/packaging/Debian/debian-stable/wins2dns.awk diff --git a/packaging/Debian/debian-unstable/README.build b/packaging/Debian/debian-unstable/README.build new file mode 100644 index 00000000000..0a11a1f6ea6 --- /dev/null +++ b/packaging/Debian/debian-unstable/README.build @@ -0,0 +1,397 @@ +From: Steve Langasek <vorlon@netexpress.net> +To: "Eloy A. Paris" <eloy.paris@usa.net> +Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) +Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 +In-Reply-To: <20010823100906.A1092@antenas> +Message-ID: <Pine.LNX.4.30.0108231744090.11071-100000@tennyson.netexpress.net> +MIME-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII + +On Thu, 23 Aug 2001, Eloy A. Paris wrote: + +> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: + +> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, +> > cache) support into the package. Issues like this are frequent enough with +> > Samba, and the configure tests add enough time to the build process, that I +> > think there'd be much benefit in being able to step past a lot of these. + +> Uhhmmm... I don't know, I guess I don't like much the idea of +> maintaining a config.cache. It looks like extra work plus a +> compilation process that is "synthetic" or atificial. What happens if +> the Samba Team adds a new test, or modifies the configure script, will +> the config.cache pick those up? + +> In any case, you are the expert, so if you think that's the way to go, +> and the burden far exceeds the problems we have right now I say let's +> go for it. I am not well versed on autoconf and the configure process, +> that's all... + +Well, I'll attach my work to the bottom of this message and let you judge it +for yourself. + +The config.cache I'm trying to generate here is not equivalent to what +a configure script outputs. The only values I'm including are those which 1) +are no-brainers on any glibc-based platform, 2) are questions we need to force +a particular value for regardless of the kernel being built against, or 3) are +questions about specific bizarre features of proprietary Unices that we'll +always get an answer of 'no' to. + +I've removed all of the config.cache variables related to headers, or to +checks for particular libraries; I think it's pretty safe to assert that glibc +provides basic C functions like select(), setenv(), and waitpid() on all our +build targets, but I think it's less safe to assert that they'll always be +provided by particular header files. + +So the config.cache won't automatically be updated with answers to new +configure tests, but it also doesn't need to in order to be useful. There's +really only a handful of variables in there that we /need/ in order to +guarantee correctly-built packages, and if you want to leave out everything +else, that's perfectly ok too. Everything from the fifth stanza on down is +just a build-time speed-up for some of the slower architectures. Well, it +also has the fringe benefit that the packages will FAIL to build if someone +tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I +see that as a plus :), you may disagree, but in any case my next trick would +be to add a global variable developers can set to bypass the provided +config.cache. + + +It is a little artificial, but the whole point of .debs is to be able to build +binaries in a controlled environment. Right now, we don't really have control +over what happens in the autobuilders. We have even /less/ control over what +happens in a stable release: it's been two weeks now since I built binaries +for bug #94380, and they haven't been uploaded to security.d.o yet. I'm +guessing they won't be uploaded until Wichert is back from vacation, either -- +which is fine, but it would be nice if we didn't have to worry about +mis-builds by the security team, or about putting the security team to extra +trouble after the fact to get packages fixed. + +With a pre-loaded config.cache, we can ensure that bugs of this kind don't +happen in woody. We can take the arm autobuilder problem into our own hands, +and not have to worry about quirkiness in the build environment. We can even +close bug #109773, since we no longer have to worry about detecting the +setuid() routines. + + +So to me, it definitely seems worth it. But you're the maintainer, and I +won't ask you to put anything in the package that you're not comfortable with. + + +> By the way, I think I remember someone was able to build 2.2.x succesfully on +> the ARM. If this is the case, could it be that there's something weird +> with Phillip's setup? + +It could be. There are arm packages for 2.2.1a-1, so at /some/ point the +autobuilder was able to pass the locking test. + + +> P.S. How did you know about the ARM build problems? I don't see any +> bugs about this... + +<http://ftp-master.debian.org/testing/>, follow the links for samba... The +exact reference for the arm autobuilder is at +<http://buildd.armlinux.org/~buildd/build.php?pkg=samba&ver=2.2.1a-4&arch=arm>. + +Regards, +Steve Langasek +postmodern programmer + + +diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog +--- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 +@@ -1,3 +1,12 @@ ++samba (2.2.1a-4.1) unstable; urgency=low ++ ++ * Fix up the build system to avoid needing to run configure as root to ++ answer questions we already know the answers to. ++ * In the process, make surprising progress towards being able to ++ cross-compile the samba packages. ++ ++ -- Steve Langasek <vorlon@debian.org> Wed, 22 Aug 2001 23:35:00 -0500 ++ + samba (2.2.1a-4) unstable; urgency=low + + * Fixed typo in smbmount's mount page. +diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache +--- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,231 @@ ++# ++# 22 August 2001 Steve Langasek <vorlon@debian.org> ++# ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++# ++# This config.cache file contains a list of acceptable autoconf ++# values which can be used in compiling Samba for Debian woody/sid. ++# ++# Autoconf sorts options alphabetically in its output. This file ++# groups options logically. ++ ++ ++# Load any architecture-specific settings ++if [ -n "$DEB_HOST_GNU_TYPE" \ ++ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then ++ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} ++fi ++ ++ ++# This is at the top because it's most in need of regular tweaking. ++# These are options which are supported on 2.4 kernels, but not on 2.2 ++# kernels. ++ ++samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} ++samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} ++samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} ++ ++ ++# These are present in 2.2 kernels, but not in 2.0... ++ ++samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} ++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) ++ ++ac_cv_c_const=${ac_cv_c_const=yes} ++ac_cv_c_inline=${ac_cv_c_inline=inline} ++samba_cv_volatile=${samba_cv_volatile=yes} ++ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} ++ac_cv_func_bzero=${ac_cv_func_bzero=yes} ++ac_cv_func_chmod=${ac_cv_func_chmod=yes} ++ac_cv_func_chown=${ac_cv_func_chown=yes} ++ac_cv_func_chroot=${ac_cv_func_chroot=yes} ++ac_cv_func_connect=${ac_cv_func_connect=yes} ++ac_cv_func_dup2=${ac_cv_func_dup2=yes} ++ac_cv_func_execl=${ac_cv_func_execl=yes} ++ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} ++ac_cv_func_fchown=${ac_cv_func_fchown=yes} ++ac_cv_func_fstat=${ac_cv_func_fstat=yes} ++ac_cv_func_fsync=${ac_cv_func_fsync=yes} ++ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} ++ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} ++ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} ++ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} ++ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} ++ac_cv_func_glob=${ac_cv_func_glob=yes} ++ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} ++ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} ++ac_cv_func_llseek=${ac_cv_func_llseek=yes} ++ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} ++ac_cv_func_memmove=${ac_cv_func_memmove=yes} ++ac_cv_func_memset=${ac_cv_func_memset=yes} ++ac_cv_func_mktime=${ac_cv_func_mktime=yes} ++ac_cv_func_pipe=${ac_cv_func_pipe=yes} ++ac_cv_func_poll=${ac_cv_func_poll=yes} ++ac_cv_func_pread=${ac_cv_func_pread=yes} ++ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} ++ac_cv_func_rand=${ac_cv_func_rand=yes} ++ac_cv_func_random=${ac_cv_func_random=yes} ++ac_cv_func_readlink=${ac_cv_func_readlink=yes} ++ac_cv_func_rename=${ac_cv_func_rename=yes} ++ac_cv_func_select=${ac_cv_func_select=yes} ++ac_cv_func_setenv=${ac_cv_func_setenv=yes} ++ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} ++ac_cv_func_setsid=${ac_cv_func_setsid=yes} ++ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} ++ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} ++ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} ++ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} ++ac_cv_func_srand=${ac_cv_func_srand=yes} ++ac_cv_func_srandom=${ac_cv_func_srandom=yes} ++ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} ++ac_cv_func_strchr=${ac_cv_func_strchr=yes} ++ac_cv_func_strdup=${ac_cv_func_strdup=yes} ++ac_cv_func_strerror=${ac_cv_func_strerror=yes} ++ac_cv_func_strftime=${ac_cv_func_strftime=yes} ++ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} ++ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} ++ac_cv_func_symlink=${ac_cv_func_symlink=yes} ++ac_cv_func_usleep=${ac_cv_func_usleep=yes} ++ac_cv_func_utime=${ac_cv_func_utime=yes} ++ac_cv_func_utimes=${ac_cv_func_utimes=yes} ++ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} ++ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} ++ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} ++ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} ++ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} ++ac_cv_type_size_t=${ac_cv_type_size_t=yes} ++ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} ++samba_cv_socklen_t=${samba_cv_socklen_t=yes} ++ ++# Yes, we know Linux supports fcntl locking. Just ignore ++# any errors caused by building on an NFS mount. ++samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} ++ ++ ++# smbwrapper doesn't work because the glibc maintainers don't want ++# 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} ++ac_cv_func__close=${ac_cv_func__close=no} ++ac_cv_func___closedir=${ac_cv_func___closedir=no} ++ac_cv_func__closedir=${ac_cv_func__closedir=no} ++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} ++ac_cv_func__fcntl=${ac_cv_func__fcntl=no} ++ac_cv_func___fork=${ac_cv_func___fork=no} ++ac_cv_func__fork=${ac_cv_func__fork=no} ++ac_cv_func___fstat=${ac_cv_func___fstat=no} ++ac_cv_func__fstat=${ac_cv_func__fstat=no} ++ac_cv_func___fstat64=${ac_cv_func___fstat64=no} ++ac_cv_func__fstat64=${ac_cv_func__fstat64=no} ++ac_cv_func___fxstat=${ac_cv_func___fxstat=no} ++ac_cv_func___getcwd=${ac_cv_func___getcwd=no} ++ac_cv_func__getcwd=${ac_cv_func__getcwd=no} ++ac_cv_func___getdents=${ac_cv_func___getdents=no} ++ac_cv_func__getdents=${ac_cv_func__getdents=no} ++ac_cv_func___llseek=${ac_cv_func___llseek=no} ++ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} ++ac_cv_func__llseek=${ac_cv_func__llseek=no} ++ac_cv_func___lseek=${ac_cv_func___lseek=no} ++ac_cv_func__lseek=${ac_cv_func__lseek=no} ++ac_cv_func___lstat=${ac_cv_func___lstat=no} ++ac_cv_func__lstat=${ac_cv_func__lstat=no} ++ac_cv_func___lstat64=${ac_cv_func___lstat64=no} ++ac_cv_func__lstat64=${ac_cv_func__lstat64=no} ++ac_cv_func___lxstat=${ac_cv_func___lxstat=no} ++ac_cv_func___open=${ac_cv_func___open=no} ++ac_cv_func__open=${ac_cv_func__open=no} ++ac_cv_func___open64=${ac_cv_func___open64=no} ++ac_cv_func__open64=${ac_cv_func__open64=no} ++ac_cv_func___opendir=${ac_cv_func___opendir=no} ++ac_cv_func__opendir=${ac_cv_func__opendir=no} ++ac_cv_func___pread=${ac_cv_func___pread=no} ++ac_cv_func__pread=${ac_cv_func__pread=no} ++ac_cv_func___pread64=${ac_cv_func___pread64=no} ++ac_cv_func__pread64=${ac_cv_func__pread64=no} ++ac_cv_func___pwrite=${ac_cv_func___pwrite=no} ++ac_cv_func__pwrite=${ac_cv_func__pwrite=no} ++ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} ++ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} ++ac_cv_func___read=${ac_cv_func___read=no} ++ac_cv_func__read=${ac_cv_func__read=no} ++ac_cv_func___readdir=${ac_cv_func___readdir=no} ++ac_cv_func__readdir=${ac_cv_func__readdir=no} ++ac_cv_func___readdir64=${ac_cv_func___readdir64=no} ++ac_cv_func__readdir64=${ac_cv_func__readdir64=no} ++ac_cv_func___seekdir=${ac_cv_func___seekdir=no} ++ac_cv_func__seekdir=${ac_cv_func__seekdir=no} ++ac_cv_func___stat=${ac_cv_func___stat=no} ++ac_cv_func__stat=${ac_cv_func__stat=no} ++ac_cv_func___stat64=${ac_cv_func___stat64=no} ++ac_cv_func__stat64=${ac_cv_func__stat64=no} ++ac_cv_func___telldir=${ac_cv_func___telldir=no} ++ac_cv_func__telldir=${ac_cv_func__telldir=no} ++ac_cv_func___write=${ac_cv_func___write=no} ++ac_cv_func__write=${ac_cv_func__write=no} ++ac_cv_func___xstat=${ac_cv_func___xstat=no} ++ ++ ++ ++# Miscellaneous stuff that isn't, and shouldn't be, available ++# in Debian. Those interested in building debs for other systems may ++# need to remove some of these defines. ++ ++ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} ++ac_cv_func_crypt16=${ac_cv_func_crypt16=no} ++ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} ++ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} ++ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} ++ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} ++ac_cv_func_rdchk=${ac_cv_func_rdchk=no} ++ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} ++ac_cv_func_setgidx=${ac_cv_func_setgidx=no} ++ac_cv_func_setluid=${ac_cv_func_setluid=no} ++ac_cv_func_setpriv=${ac_cv_func_setpriv=no} ++ac_cv_func_setuidx=${ac_cv_func_setuidx=no} ++ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} ++ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} ++ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} ++ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} ++ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} ++ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} ++ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} ++ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} ++ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} ++ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} +diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux +--- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 ++++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 +@@ -0,0 +1,12 @@ ++# 22 Aug 2001 Steve Langasek <vorlon@debian.org> ++ ++# This file contains autoconf settings specific to the alpha-linux ++# platform that should be preloaded when building for this architecture. ++ ++ ++# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but ++# Linux 2.4 does. Ensure that packages compiled for woody remain ++# compatible with 2.2 kernels, even if the build machine is running 2.4. ++samba_cv_have_setresgid=${samba_cv_have_setresgid=no} ++samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} ++samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules +--- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 ++++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 +@@ -15,6 +15,14 @@ + # This has to be exported to make some magic below work. + export DH_OPTIONS + ++# Set the host and build architectures for use with config.cache loading, ++# cross-building, etc. ++DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++export DEB_HOST_GNU_TYPE ++export DEB_BUILD_GNU_TYPE ++ + BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb + + DESTDIR=`pwd`/debian/samba +@@ -48,8 +56,11 @@ + # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ + # --localstatedir=/var + ++ if [ -f debian/config.cache ]; then \ ++ cp -f debian/config.cache source/config.cache; \ ++ fi + # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) +- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) ++ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) + + touch configure-stamp + diff --git a/packaging/Debian/debian/README.build-upstream b/packaging/Debian/debian-unstable/README.build-upstream index 8efe8164c8d..8efe8164c8d 100644 --- a/packaging/Debian/debian/README.build-upstream +++ b/packaging/Debian/debian-unstable/README.build-upstream diff --git a/packaging/Debian/debian/README.debian b/packaging/Debian/debian-unstable/README.debian index 3802e329e53..3802e329e53 100644 --- a/packaging/Debian/debian/README.debian +++ b/packaging/Debian/debian-unstable/README.debian diff --git a/packaging/Debian/debian-unstable/TODO b/packaging/Debian/debian-unstable/TODO new file mode 100644 index 00000000000..5883f72a92b --- /dev/null +++ b/packaging/Debian/debian-unstable/TODO @@ -0,0 +1,4 @@ +Nothing in our list right now. + +Debian Samba Maintainers.- +Sun Apr 6 01:34:21 EST 2003 diff --git a/packaging/Debian/debian/changelog b/packaging/Debian/debian-unstable/changelog index 382ee43eced..382ee43eced 100644 --- a/packaging/Debian/debian/changelog +++ b/packaging/Debian/debian-unstable/changelog diff --git a/packaging/Debian/debian-unstable/config.cache b/packaging/Debian/debian-unstable/config.cache new file mode 100644 index 00000000000..8872a27b761 --- /dev/null +++ b/packaging/Debian/debian-unstable/config.cache @@ -0,0 +1,221 @@ +# +# 22 August 2001 Steve Langasek <vorlon@debian.org> +# +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +# +# This config.cache file contains a list of acceptable autoconf +# values which can be used in compiling Samba for Debian woody/sid. +# +# Autoconf sorts options alphabetically in its output. This file +# groups options logically. + + +# Load any architecture-specific settings +if [ -n "$DEB_HOST_GNU_TYPE" \ + -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then + . ../debian/config.cache.${DEB_HOST_GNU_TYPE} +fi + + +# This is at the top because it's most in need of regular tweaking. +# These are options which are supported on 2.4 kernels, but not on 2.2 +# kernels. + +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} + + +# These are present in 2.2 kernels, but not in 2.0... + +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} + + +# Various basic libc/compiler stuff that it's blindingly obvious that +# Linux supports (now watch me get bitten for saying that) + +ac_cv_c_const=${ac_cv_c_const=yes} +ac_cv_c_inline=${ac_cv_c_inline=inline} +samba_cv_volatile=${samba_cv_volatile=yes} +ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} +ac_cv_func_bzero=${ac_cv_func_bzero=yes} +ac_cv_func_chmod=${ac_cv_func_chmod=yes} +ac_cv_func_chown=${ac_cv_func_chown=yes} +ac_cv_func_chroot=${ac_cv_func_chroot=yes} +ac_cv_func_connect=${ac_cv_func_connect=yes} +ac_cv_func_dup2=${ac_cv_func_dup2=yes} +ac_cv_func_execl=${ac_cv_func_execl=yes} +ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} +ac_cv_func_fchown=${ac_cv_func_fchown=yes} +ac_cv_func_fstat=${ac_cv_func_fstat=yes} +ac_cv_func_fsync=${ac_cv_func_fsync=yes} +ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} +ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} +ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} +ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} +ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} +ac_cv_func_glob=${ac_cv_func_glob=yes} +ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} +ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} +ac_cv_func_llseek=${ac_cv_func_llseek=yes} +ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} +ac_cv_func_memmove=${ac_cv_func_memmove=yes} +ac_cv_func_memset=${ac_cv_func_memset=yes} +ac_cv_func_mktime=${ac_cv_func_mktime=yes} +ac_cv_func_pipe=${ac_cv_func_pipe=yes} +ac_cv_func_poll=${ac_cv_func_poll=yes} +ac_cv_func_pread=${ac_cv_func_pread=yes} +ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} +ac_cv_func_rand=${ac_cv_func_rand=yes} +ac_cv_func_random=${ac_cv_func_random=yes} +ac_cv_func_readlink=${ac_cv_func_readlink=yes} +ac_cv_func_rename=${ac_cv_func_rename=yes} +ac_cv_func_select=${ac_cv_func_select=yes} +ac_cv_func_setenv=${ac_cv_func_setenv=yes} +ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} +ac_cv_func_setsid=${ac_cv_func_setsid=yes} +ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} +ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} +ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} +ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} +ac_cv_func_srand=${ac_cv_func_srand=yes} +ac_cv_func_srandom=${ac_cv_func_srandom=yes} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} +ac_cv_func_strchr=${ac_cv_func_strchr=yes} +ac_cv_func_strdup=${ac_cv_func_strdup=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} +ac_cv_func_strftime=${ac_cv_func_strftime=yes} +ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} +ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} +ac_cv_func_symlink=${ac_cv_func_symlink=yes} +ac_cv_func_usleep=${ac_cv_func_usleep=yes} +ac_cv_func_utime=${ac_cv_func_utime=yes} +ac_cv_func_utimes=${ac_cv_func_utimes=yes} +ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} +ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} +ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} +ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} +ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} +samba_cv_socklen_t=${samba_cv_socklen_t=yes} + +# Yes, we know Linux supports fcntl locking. Just ignore +# any errors caused by building on an NFS mount. +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} + + +# smbwrapper doesn't work because the glibc maintainers don't want +# to support transparent userland VFS. We might as well preempt +# any checks for shadowed symbols that are only useful for smbwrapper. + +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} +ac_cv_func__close=${ac_cv_func__close=no} +ac_cv_func___closedir=${ac_cv_func___closedir=no} +ac_cv_func__closedir=${ac_cv_func__closedir=no} +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___fchdir=${ac_cv_func___fchdir=no} +ac_cv_func__fchdir=${ac_cv_func__fchdir=no} +ac_cv_func___fcntl=${ac_cv_func___fcntl=no} +ac_cv_func__fcntl=${ac_cv_func__fcntl=no} +ac_cv_func___fork=${ac_cv_func___fork=no} +ac_cv_func__fork=${ac_cv_func__fork=no} +ac_cv_func___fstat=${ac_cv_func___fstat=no} +ac_cv_func__fstat=${ac_cv_func__fstat=no} +ac_cv_func___fstat64=${ac_cv_func___fstat64=no} +ac_cv_func__fstat64=${ac_cv_func__fstat64=no} +ac_cv_func___fxstat=${ac_cv_func___fxstat=no} +ac_cv_func___getcwd=${ac_cv_func___getcwd=no} +ac_cv_func__getcwd=${ac_cv_func__getcwd=no} +ac_cv_func___getdents=${ac_cv_func___getdents=no} +ac_cv_func__getdents=${ac_cv_func__getdents=no} +ac_cv_func___llseek=${ac_cv_func___llseek=no} +ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} +ac_cv_func__llseek=${ac_cv_func__llseek=no} +ac_cv_func___lseek=${ac_cv_func___lseek=no} +ac_cv_func__lseek=${ac_cv_func__lseek=no} +ac_cv_func___lstat=${ac_cv_func___lstat=no} +ac_cv_func__lstat=${ac_cv_func__lstat=no} +ac_cv_func___lstat64=${ac_cv_func___lstat64=no} +ac_cv_func__lstat64=${ac_cv_func__lstat64=no} +ac_cv_func___lxstat=${ac_cv_func___lxstat=no} +ac_cv_func___open=${ac_cv_func___open=no} +ac_cv_func__open=${ac_cv_func__open=no} +ac_cv_func___open64=${ac_cv_func___open64=no} +ac_cv_func__open64=${ac_cv_func__open64=no} +ac_cv_func___opendir=${ac_cv_func___opendir=no} +ac_cv_func__opendir=${ac_cv_func__opendir=no} +ac_cv_func___pread=${ac_cv_func___pread=no} +ac_cv_func__pread=${ac_cv_func__pread=no} +ac_cv_func___pread64=${ac_cv_func___pread64=no} +ac_cv_func__pread64=${ac_cv_func__pread64=no} +ac_cv_func___pwrite=${ac_cv_func___pwrite=no} +ac_cv_func__pwrite=${ac_cv_func__pwrite=no} +ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} +ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} +ac_cv_func___read=${ac_cv_func___read=no} +ac_cv_func__read=${ac_cv_func__read=no} +ac_cv_func___readdir=${ac_cv_func___readdir=no} +ac_cv_func__readdir=${ac_cv_func__readdir=no} +ac_cv_func___readdir64=${ac_cv_func___readdir64=no} +ac_cv_func__readdir64=${ac_cv_func__readdir64=no} +ac_cv_func___seekdir=${ac_cv_func___seekdir=no} +ac_cv_func__seekdir=${ac_cv_func__seekdir=no} +ac_cv_func___stat=${ac_cv_func___stat=no} +ac_cv_func__stat=${ac_cv_func__stat=no} +ac_cv_func___stat64=${ac_cv_func___stat64=no} +ac_cv_func__stat64=${ac_cv_func__stat64=no} +ac_cv_func___telldir=${ac_cv_func___telldir=no} +ac_cv_func__telldir=${ac_cv_func__telldir=no} +ac_cv_func___write=${ac_cv_func___write=no} +ac_cv_func__write=${ac_cv_func__write=no} +ac_cv_func___xstat=${ac_cv_func___xstat=no} + + + +# Miscellaneous stuff that isn't, and shouldn't be, available +# in Debian. Those interested in building debs for other systems may +# need to remove some of these defines. + +ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} +ac_cv_func_crypt16=${ac_cv_func_crypt16=no} +ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} +ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} +ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} +ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} +ac_cv_func_rdchk=${ac_cv_func_rdchk=no} +ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} +ac_cv_func_setgidx=${ac_cv_func_setgidx=no} +ac_cv_func_setluid=${ac_cv_func_setluid=no} +ac_cv_func_setpriv=${ac_cv_func_setpriv=no} +ac_cv_func_setuidx=${ac_cv_func_setuidx=no} +ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} +ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} +ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} +ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} +ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} +ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} +ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} +ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} +ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} +ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} diff --git a/packaging/Debian/debian-unstable/config.cache.alpha-linux b/packaging/Debian/debian-unstable/config.cache.alpha-linux new file mode 100644 index 00000000000..6d171920263 --- /dev/null +++ b/packaging/Debian/debian-unstable/config.cache.alpha-linux @@ -0,0 +1,12 @@ +# 22 Aug 2001 Steve Langasek <vorlon@debian.org> + +# This file contains autoconf settings specific to the alpha-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian-unstable/config.cache.sparc-linux b/packaging/Debian/debian-unstable/config.cache.sparc-linux new file mode 100644 index 00000000000..a2a21b1d3ad --- /dev/null +++ b/packaging/Debian/debian-unstable/config.cache.sparc-linux @@ -0,0 +1,13 @@ +# 24 Spe 2001 Steve Langasek <vorlon@debian.org> + +# This file contains autoconf settings specific to the sparc-linux +# platform that should be preloaded when building for this architecture. + + +# Linux 2.2 on Sparc doesn't have setresgid() or setresuid(), but +# Linux 2.4 does. Ensure that packages compiled for woody remain +# compatible with 2.2 kernels, even if the build machine is running 2.4. +samba_cv_have_setresuid=${samba_cv_have_setresuid=no} +samba_cv_have_setresgid=${samba_cv_have_setresgid=no} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} diff --git a/packaging/Debian/debian/control b/packaging/Debian/debian-unstable/control index 7bfb41b79d9..7bfb41b79d9 100644 --- a/packaging/Debian/debian/control +++ b/packaging/Debian/debian-unstable/control diff --git a/packaging/Debian/debian-unstable/copyright b/packaging/Debian/debian-unstable/copyright new file mode 100644 index 00000000000..e74a64fa5b8 --- /dev/null +++ b/packaging/Debian/debian-unstable/copyright @@ -0,0 +1,28 @@ +This is the Debian Linux prepackaged version of the Samba SMB +(LAN-Manager) server. Samba was written by Andrew Tridgell +<Andrew.Tridgell@anu.edu.au> and many others. + +This package was put together by Eloy Paris <peloy@debian.org> +and Steve Langasek <vorlon@debian.org> based on previous work by +Klee Dienes <klee@debian.org>, Andrew Howell <andrew@it.com.au> +and Bruce Perens <bruce@pixar.com> from sources found at +<URL:ftp://ftp.samba.org/pub/samba>. + +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/packaging/Debian/debian-unstable/gdbcommands b/packaging/Debian/debian-unstable/gdbcommands new file mode 100644 index 00000000000..5774b9ae311 --- /dev/null +++ b/packaging/Debian/debian-unstable/gdbcommands @@ -0,0 +1,2 @@ +bt +quit diff --git a/packaging/Debian/debian-unstable/libpam-smbpass.docs b/packaging/Debian/debian-unstable/libpam-smbpass.docs new file mode 100644 index 00000000000..89fbbf90425 --- /dev/null +++ b/packaging/Debian/debian-unstable/libpam-smbpass.docs @@ -0,0 +1,2 @@ +source/pam_smbpass/README +source/pam_smbpass/TODO diff --git a/packaging/Debian/debian-unstable/libpam-smbpass.examples b/packaging/Debian/debian-unstable/libpam-smbpass.examples new file mode 100644 index 00000000000..48d841b2c15 --- /dev/null +++ b/packaging/Debian/debian-unstable/libpam-smbpass.examples @@ -0,0 +1,5 @@ +source/pam_smbpass/samples/README +source/pam_smbpass/samples/kdc-pdc +source/pam_smbpass/samples/password-mature +source/pam_smbpass/samples/password-migration +source/pam_smbpass/samples/password-sync diff --git a/packaging/Debian/debian-unstable/libpam-smbpass.files b/packaging/Debian/debian-unstable/libpam-smbpass.files new file mode 100644 index 00000000000..4263df5c0f0 --- /dev/null +++ b/packaging/Debian/debian-unstable/libpam-smbpass.files @@ -0,0 +1 @@ +lib/security/pam_smbpass.so diff --git a/packaging/Debian/debian-unstable/libsmbclient-dev.examples b/packaging/Debian/debian-unstable/libsmbclient-dev.examples new file mode 100644 index 00000000000..2094c40b556 --- /dev/null +++ b/packaging/Debian/debian-unstable/libsmbclient-dev.examples @@ -0,0 +1 @@ +examples/libsmbclient/ diff --git a/packaging/Debian/debian-unstable/libsmbclient-dev.files b/packaging/Debian/debian-unstable/libsmbclient-dev.files new file mode 100644 index 00000000000..a52c17cfc56 --- /dev/null +++ b/packaging/Debian/debian-unstable/libsmbclient-dev.files @@ -0,0 +1,3 @@ +usr/lib/libsmbclient.a +usr/lib/libsmbclient.so +usr/include/libsmbclient.h diff --git a/packaging/Debian/debian-unstable/libsmbclient.files b/packaging/Debian/debian-unstable/libsmbclient.files new file mode 100644 index 00000000000..18b7f3b1654 --- /dev/null +++ b/packaging/Debian/debian-unstable/libsmbclient.files @@ -0,0 +1,2 @@ +usr/lib/libsmbclient.so.0.1 +usr/lib/libsmbclient.so.0 diff --git a/packaging/Debian/debian-unstable/libsmbclient.shlibs b/packaging/Debian/debian-unstable/libsmbclient.shlibs new file mode 100644 index 00000000000..9c6eea200a9 --- /dev/null +++ b/packaging/Debian/debian-unstable/libsmbclient.shlibs @@ -0,0 +1 @@ +libsmbclient 0 libsmbclient (>= 2.2.2-11) diff --git a/packaging/Debian/debian-unstable/mksmbpasswd.8 b/packaging/Debian/debian-unstable/mksmbpasswd.8 new file mode 100644 index 00000000000..0a500102e8a --- /dev/null +++ b/packaging/Debian/debian-unstable/mksmbpasswd.8 @@ -0,0 +1,28 @@ +.TH MKSMBPASSWD 8 12-Apr-1998 +.SH NAME +mksmbpasswd \- formats a /etc/passwd entry for a smbpasswd file +.SH SYNOPSIS +mksmbpasswd cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd +.SH DESCRIPTION +.B mksmbpasswd +should be used only once, the first time Samba is installed. The idea +is to ease accounts creation by transferring all user accounts from +/etc/passwd to /etc/samba/smbpasswd. +.PP +Please note that passwords are not transferred automatically from +/etc/passwd to the new /etc/samba/smbpasswd file. After running +.B mksmbpasswd +all accounts are disabled so the system administrator must run +smbpasswd for each account that needs to be enable. +.SH FILES +.TP +/etc/passwd +System wide accounts file +.TP +/etc/samba/smbpasswd +Encrypted passwords file for the Samba daemons +.SH SEE ALSO +samba(7), nmbd(8), smbd(8) +.SH AUTHOR +Eloy A. Paris <peloy@debian.org> (man page based on sendmailconfig's man page +by Robert Leslie <rob@mars.org>) diff --git a/packaging/Debian/debian-unstable/mksmbpasswd.awk b/packaging/Debian/debian-unstable/mksmbpasswd.awk new file mode 100644 index 00000000000..a7b41a725d3 --- /dev/null +++ b/packaging/Debian/debian-unstable/mksmbpasswd.awk @@ -0,0 +1,5 @@ +#!/usr/bin/awk -f +BEGIN {FS=":" + printf("#\n# SMB password file.\n#\n") + } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } diff --git a/packaging/Debian/debian-unstable/panic-action b/packaging/Debian/debian-unstable/panic-action new file mode 100644 index 00000000000..13f773c1ef8 --- /dev/null +++ b/packaging/Debian/debian-unstable/panic-action @@ -0,0 +1,48 @@ +#!/bin/sh + +# Redirect all output to our mail command +( + # We must be given a pid to look at + if [ -z "$1" ]; then + echo "$0 called with no arguments." + exit 1 + fi + + if [ ! -d "/proc/$1" ]; then + echo "$0: No such process: $1" + exit 1 + fi + + # Find out what binary we're debugging + BINARYNAME=`readlink "/proc/$1/exe"` + + # Generic header for our email + echo "The Samba 'panic action' script, $0," + echo "was called for pid $1 ($BINARYNAME)." + echo + + if [ -z "$BINARYNAME" ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, the executable could not be found for process $1." + echo "It may have died unexpectedly, or you may not have permission to" + echo "debug the process." + exit 1 + fi + + # No debugger + if [ ! -x /usr/bin/gdb ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, gdb was not found on your system, so the error could not be" + echo "debugged. Please install the gdb package so that debugging information is" + echo "available the next time such a problem occurs." + exit 1 + fi + + echo "Below is a backtrace for this process generated with gdb, which shows" + echo "the state of the program at the time the error occured. You are" + echo "encouraged to submit this information as a bug report to Debian. For" + echo "information about the procedure for submitting bug reports , please see" + echo "http://www.debian.org/Bugs/Reporting or the reportbug(1) manpage." + echo + gdb -x /etc/samba/gdbcommands -batch "$BINARYNAME" "$1" +) | mail -s "Segfault in Samba" root diff --git a/packaging/Debian/debian/patches/VERSION.patch b/packaging/Debian/debian-unstable/patches/VERSION.patch index 0f5c129c564..0f5c129c564 100644 --- a/packaging/Debian/debian/patches/VERSION.patch +++ b/packaging/Debian/debian-unstable/patches/VERSION.patch diff --git a/packaging/Debian/debian/patches/documentation.patch b/packaging/Debian/debian-unstable/patches/documentation.patch index 922b93f9900..922b93f9900 100644 --- a/packaging/Debian/debian/patches/documentation.patch +++ b/packaging/Debian/debian-unstable/patches/documentation.patch diff --git a/packaging/Debian/debian/patches/fhs.patch b/packaging/Debian/debian-unstable/patches/fhs.patch index 2ea7d96103b..2ea7d96103b 100644 --- a/packaging/Debian/debian/patches/fhs.patch +++ b/packaging/Debian/debian-unstable/patches/fhs.patch diff --git a/packaging/Debian/debian/patches/installswat.sh.patch b/packaging/Debian/debian-unstable/patches/installswat.sh.patch index a2b1cf8f437..a2b1cf8f437 100644 --- a/packaging/Debian/debian/patches/installswat.sh.patch +++ b/packaging/Debian/debian-unstable/patches/installswat.sh.patch diff --git a/packaging/Debian/debian-unstable/patches/nmbd-signalling.patch b/packaging/Debian/debian-unstable/patches/nmbd-signalling.patch new file mode 100644 index 00000000000..ca04cce3bfa --- /dev/null +++ b/packaging/Debian/debian-unstable/patches/nmbd-signalling.patch @@ -0,0 +1,20 @@ +diff -uNr samba-2.999+3.0.alpha21.orig/source/nmbd/nmbd_subnetdb.c samba-2.999+3.0.alpha21/source/nmbd/nmbd_subnetdb.c +--- samba-2.999+3.0.alpha21.orig/source/nmbd/nmbd_subnetdb.c 2002-11-26 20:54:19.000000000 -0600 ++++ samba-2.999+3.0.alpha21/source/nmbd/nmbd_subnetdb.c 2002-12-16 23:34:13.000000000 -0600 +@@ -214,12 +214,16 @@ + extern struct in_addr loopback_ip; + + if(num_interfaces == 0) { ++ void (*old_handler)(int); ++ + DEBUG(0,("create_subnets: No local interfaces !\n")); + DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n")); ++ old_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL ); + while (iface_count() == 0) { + sleep(5); + load_interfaces(); + } ++ CatchSignal( SIGTERM, SIGNAL_CAST old_handler ); + } + + num_interfaces = iface_count(); diff --git a/packaging/Debian/debian/patches/samba.patch b/packaging/Debian/debian-unstable/patches/samba.patch index 06d436408f5..06d436408f5 100644 --- a/packaging/Debian/debian/patches/samba.patch +++ b/packaging/Debian/debian-unstable/patches/samba.patch diff --git a/packaging/Debian/debian-unstable/patches/smbclient-pager.patch b/packaging/Debian/debian-unstable/patches/smbclient-pager.patch new file mode 100644 index 00000000000..3ee85d4118c --- /dev/null +++ b/packaging/Debian/debian-unstable/patches/smbclient-pager.patch @@ -0,0 +1,12 @@ +diff -uNr samba-2.999+3.0cvs20020906.orig/source/include/local.h samba-2.999+3.0cvs20020906/source/include/local.h +--- samba-2.999+3.0cvs20020906.orig/source/include/local.h 2002-09-04 14:13:06.000000000 -0500 ++++ samba-2.999+3.0cvs20020906/source/include/local.h 2002-09-08 14:19:24.000000000 -0500 +@@ -109,7 +109,7 @@ + /* the default pager to use for the client "more" command. Users can + override this with the PAGER environment variable */ + #ifndef PAGER +-#define PAGER "more" ++#define PAGER "/usr/bin/pager" + #endif + + /* the size of the uid cache used to reduce valid user checks */ diff --git a/packaging/Debian/debian-unstable/patches/smbclient-tar.patch.unused b/packaging/Debian/debian-unstable/patches/smbclient-tar.patch.unused new file mode 100644 index 00000000000..e2a4c3ce2c0 --- /dev/null +++ b/packaging/Debian/debian-unstable/patches/smbclient-tar.patch.unused @@ -0,0 +1,43 @@ +diff -uNr samba-3.0.0beta2.orig/source/client/client.c samba-3.0.0beta2/source/client/client.c +--- samba-3.0.0beta2.orig/source/client/client.c 2003-07-01 22:36:24.000000000 -0500 ++++ samba-3.0.0beta2/source/client/client.c 2003-07-06 15:17:36.000000000 -0500 +@@ -2773,6 +2773,7 @@ + int opt; + pstring query_host; + BOOL message = False; ++ char* tar_args = NULL; + extern char tar_type; + pstring term_code; + static const char *new_name_resolve_order = NULL; +@@ -2816,7 +2817,7 @@ + max_protocol = interpret_protocol(poptGetOptArg(pc), max_protocol); + break; + case 'T': +- if (!tar_parseargs(argc, argv, poptGetOptArg(pc), optind)) { ++ if (!(tar_args = poptGetOptArg(pc))) { + poptPrintUsage(pc, stderr, 0); + exit(1); + } +@@ -2917,6 +2917,22 @@ + pstrcpy(cmdline_auth_info.password,poptGetArg(pc)); + } + ++ /* The tar command may take a number of string options; pass ++ everything we have left to tar_parseargs(). */ ++ if (tar_args) { ++ const char **argv2 = poptGetArgs(pc); ++ int argc2 = 0; ++ ++ if (argv2) { ++ while (argv2[argc2]) argc2++; ++ } ++ ++ if (!tar_parseargs(argc2, argv2, tar_args, 0)) { ++ poptPrintUsage(pc, stderr, 0); ++ exit(1); ++ } ++ } ++ + init_names(); + + if(new_name_resolve_order) diff --git a/packaging/Debian/debian-unstable/patches/smbmount-mtab-flags.patch b/packaging/Debian/debian-unstable/patches/smbmount-mtab-flags.patch new file mode 100644 index 00000000000..dac999dd63c --- /dev/null +++ b/packaging/Debian/debian-unstable/patches/smbmount-mtab-flags.patch @@ -0,0 +1,15 @@ +diff -ur samba-2.2.4.orig/source/client/smbmnt.c samba-2.2.4/source/client/smbmnt.c +--- samba-2.2.4.orig/source/client/smbmnt.c Sun Apr 8 15:22:51 2001 ++++ samba-2.2.4/source/client/smbmnt.c Sun May 5 16:42:29 2002 +@@ -259,7 +259,10 @@ + ment.mnt_fsname = share_name ? share_name : "none"; + ment.mnt_dir = mount_point; + ment.mnt_type = "smbfs"; +- ment.mnt_opts = ""; ++ if (mount_ro) ++ ment.mnt_opts = "ro"; ++ else ++ ment.mnt_opts = "rw"; + ment.mnt_freq = 0; + ment.mnt_passno= 0; + diff --git a/packaging/Debian/debian-unstable/patches/smbmount-nomtab.patch b/packaging/Debian/debian-unstable/patches/smbmount-nomtab.patch new file mode 100644 index 00000000000..88071481705 --- /dev/null +++ b/packaging/Debian/debian-unstable/patches/smbmount-nomtab.patch @@ -0,0 +1,160 @@ +diff -uNr samba-3.0alpha22.orig/source/client/smbmnt.c samba-3.0alpha22/source/client/smbmnt.c +--- samba-3.0alpha22.orig/source/client/smbmnt.c 2003-03-15 12:11:39.000000000 -0600 ++++ samba-3.0alpha22/source/client/smbmnt.c 2003-03-15 12:11:49.000000000 -0600 +@@ -28,6 +28,7 @@ + static uid_t mount_uid; + static gid_t mount_gid; + static int mount_ro; ++static int no_mtab; + static unsigned mount_fmask; + static unsigned mount_dmask; + static int user_mount; +@@ -40,6 +41,7 @@ + printf("Usage: smbmnt mount-point [options]\n"); + printf("Version %s\n\n",VERSION); + printf("-s share share name on server\n" ++ "-n don't update /etc/mtab\n" + "-r mount read-only\n" + "-u uid mount as uid\n" + "-g gid mount as gid\n" +@@ -54,7 +56,7 @@ + { + int opt; + +- while ((opt = getopt (argc, argv, "s:u:g:rf:d:o:")) != EOF) ++ while ((opt = getopt (argc, argv, "s:u:g:nrf:d:o:")) != EOF) + { + switch (opt) + { +@@ -71,6 +73,9 @@ + mount_gid = strtol(optarg, NULL, 0); + } + break; ++ case 'n': ++ no_mtab = 1; ++ break; + case 'r': + mount_ro = 1; + break; +@@ -274,36 +279,38 @@ + return -1; + } + +- if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) +- { +- fprintf(stderr, "Can't get "MOUNTED"~ lock file"); +- return 1; +- } +- close(fd); ++ if (!no_mtab) { ++ if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) ++ { ++ fprintf(stderr, "Can't get "MOUNTED"~ lock file"); ++ return 1; ++ } ++ close(fd); + +- if ((mtab = setmntent(MOUNTED, "a+")) == NULL) +- { +- fprintf(stderr, "Can't open " MOUNTED); +- return 1; +- } ++ if ((mtab = setmntent(MOUNTED, "a+")) == NULL) ++ { ++ fprintf(stderr, "Can't open " MOUNTED); ++ return 1; ++ } + +- if (addmntent(mtab, &ment) == 1) +- { +- fprintf(stderr, "Can't write mount entry"); +- return 1; +- } +- if (fchmod(fileno(mtab), 0644) == -1) +- { +- fprintf(stderr, "Can't set perms on "MOUNTED); +- return 1; +- } +- endmntent(mtab); ++ if (addmntent(mtab, &ment) == 1) ++ { ++ fprintf(stderr, "Can't write mount entry"); ++ return 1; ++ } ++ if (fchmod(fileno(mtab), 0644) == -1) ++ { ++ fprintf(stderr, "Can't set perms on "MOUNTED); ++ return 1; ++ } ++ endmntent(mtab); + +- if (unlink(MOUNTED"~") == -1) +- { +- fprintf(stderr, "Can't remove "MOUNTED"~"); +- return 1; +- } ++ if (unlink(MOUNTED"~") == -1) ++ { ++ fprintf(stderr, "Can't remove "MOUNTED"~"); ++ return 1; ++ } ++ } + + return 0; + } +diff -uNr samba-3.0alpha22.orig/source/client/smbmount.c samba-3.0alpha22/source/client/smbmount.c +--- samba-3.0alpha22.orig/source/client/smbmount.c 2003-03-15 12:04:29.000000000 -0600 ++++ samba-3.0alpha22/source/client/smbmount.c 2003-03-15 12:15:10.000000000 -0600 +@@ -48,6 +48,7 @@ + static int mount_ro; + static unsigned mount_fmask; + static unsigned mount_dmask; ++static BOOL no_mtab = False; + static BOOL use_kerberos; + /* TODO: Add code to detect smbfs version in kernel */ + static BOOL status32_smbfs = False; +@@ -273,6 +274,9 @@ + return; + } + ++ if (no_mtab) ++ return; ++ + if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) { + DEBUG(0,("%d: Can't get "MOUNTED"~ lock file", sys_getpid())); + return; +@@ -466,6 +470,9 @@ + args[i++] = "-s"; + args[i++] = svc2; + ++ if (no_mtab) { ++ args[i++] = "-n"; ++ } + if (mount_ro) { + args[i++] = "-r"; + } +@@ -661,7 +668,7 @@ + ****************************************************************************/ + static void usage(void) + { +- printf("Usage: mount.smbfs service mountpoint [-o options,...]\n"); ++ printf("Usage: mount.smbfs service mountpoint [-n] [-o options,...]\n"); + + printf("Version %s\n\n",VERSION); + +@@ -739,8 +746,13 @@ + argc -= 2; + argv += 2; + +- opt = getopt(argc, argv, "o:"); +- if(opt != 'o') { ++ opt = getopt(argc, argv, "no:"); ++ if (opt == 'n') { ++ DEBUG(3,("No mtab!\n")); ++ no_mtab = True; ++ opt = getopt(argc, argv, "o:"); ++ } ++ if (opt != 'o') { + return; + } + diff --git a/packaging/Debian/debian/patches/smbstatus-locking.patch b/packaging/Debian/debian-unstable/patches/smbstatus-locking.patch index 50072c5c269..50072c5c269 100644 --- a/packaging/Debian/debian/patches/smbstatus-locking.patch +++ b/packaging/Debian/debian-unstable/patches/smbstatus-locking.patch diff --git a/packaging/Debian/debian-unstable/po/POTFILES.in b/packaging/Debian/debian-unstable/po/POTFILES.in new file mode 100644 index 00000000000..95a7ea81506 --- /dev/null +++ b/packaging/Debian/debian-unstable/po/POTFILES.in @@ -0,0 +1,3 @@ +[type: gettext/rfc822deb] samba-common.templates +[type: gettext/rfc822deb] samba.templates +[type: gettext/rfc822deb] swat.templates diff --git a/packaging/Debian/debian-unstable/po/es.po b/packaging/Debian/debian-unstable/po/es.po new file mode 100644 index 00000000000..0d1d1a770de --- /dev/null +++ b/packaging/Debian/debian-unstable/po/es.po @@ -0,0 +1,298 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: Samba for Debian 3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:51-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Juego de caracteres para el sistema de ficheros Unix" + +# +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Actualmente hay una opción de \"character set\" en smb.conf. En Samba 3.0 " +"esta opción ha sido reemplazado por una opción nueva: \"unix charset\". Por " +"favor, indique el juego de caracteres que desea usar para esta opción nueva, " +"que controla cómo Samba interpretará los nombres en el sistema de ficheros." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "Si deja en blanco este campo, no se cambiará smb.conf." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Juego de caracteres para los clientes DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Actualmente hay una opción de \"client code page\" en smb.conf. En Samba " +"3.0 esta opción ha sido reemplazado por la opción \"dos charset\". Por " +"favor, indique el juego de caracteres que desea usar para esta opción " +"nueva. Esta opción no se necesita en absoluto para clientes Windows; es " +"exclusivamente para los clientes DOS. Si deja en blanco este campo, no se " +"cambiará smb.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "" +"¿Modificar smb.conf para usar la configuración WINS que proviene de DHCP?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Si su sistema recibe la dirección IP desde un servidor DHCP en la red, el " +"servidor DHCP también puede proveerle informaciones sobre los servidores de " +"WINS que haya en la red. Esto requiere un cambio en el fichero smb.conf " +"para que la configuración de WINS proveniente de DHCP se lea automaticamente " +"de /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"Hay que instalar el paquete dhcp3-client para aprovechar esta funcionalidad." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "¿Configurar smb.conf mediante debconf?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"El resto de la configuración de Samba trata sobre cuestiones que afectan al " +"contenido de /etc/samba/smb.conf, que es el fichero utilizado para " +"configurar los programas de Samba (nmbd y smbd). Su smb.conf actual contiene " +"una lÃnea 'include' o una opción que atraviesa más de una lÃnea, asà que " +"debconf puede dejarlo con un smb.conf descompuesto, requiriendo que lo " +"arregle a mano." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Si no usa debconf para configurar smb.conf, tendrá que cuidar a mano " +"cualquier cambio a la configuración de Samba y no disfrutará de aumentos " +"periódicos de configuración. Por eso se recomienda el uso de debconf cuando " +"sea posible." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Nombre del dominio o del grupo de trabajo" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Es el grupo de trabajo en el que aparecerá su servidor cuando se lo " +"pregunten los clientes de la red. Este parámetro también controla el nombre " +"de dominio que se usa con la configuración security=domain." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "¿Utilizar contraseñas cifradas?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Los clientes Windows más modernos se comunican con los servidores SMB " +"utilizando contraseñas cifradas. Si quiere usar contraseñas en texto plano, " +"tendrá que cambiar un parámetro en el registro de Windows. Es muy " +"recomendable usar cifrado en las contraseñas. Si elige hacerlo, compruebe " +"que tiene un fichero /etc/samba/smbpasswd válido y que ha puesto las " +"contraseñas con el programa smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "¿Crear el base de dados de contraseñas /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Para manterner la compatibilidad con el comportamiento por defecto de la " +"mayoria de los sistemas Windows, hay que configurar Samba para que use " +"contraseñas cifradas, lo cual requiere la creación de un fichero, distinto " +"del /etc/passwd, donde se guarden las contraseñas de los usuarios. El " +"fichero se puede crear automaticamente, aunque es necesario añadir las " +"contraseñas manualmente (por usted o por el usuario) mediante el programa " +"'smbpasswd', y debe encargarse de mantener las contraseñas al dÃa. Si no " +"crea este fichero, es imprescindible configurar Samba (y posiblemente los " +"sistemas Windows) para que use contraseñas no cifradas. Véa /usr/share/doc/" +"samba-doc/htmldocs/ENCRYPTION.html del paquete samba-doc para más " +"información." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Se han cambiado de lugar los ficheros de registro de Samba." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"A partir de los primeros paquetes Debian de Samba 2.2, los ficheros de " +"registro de los dos demonios del Samba (nmbd y smbd) se encuentran en /var/" +"log/samba/. Los nombres de estos ficheros son log.nmbd y log.smbd, para " +"nmbd y smbd respectivamente." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Los ficheros de registro antiguos que habÃa en /var/log se moverán " +"automáticamente a su nueva ubicación." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "Ya no se puede ejecutar nmbd desde el inetd" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Su sistema estaba configurado anteriormente para ejectuar nmbd y smbd desde " +"inetd. A partir de la version 2.999+3.0.alpha20-4, nmbd ya no se ejecuta " +"desde inetd. Si ha modificado el script de arranque /etc/init.d/samba, " +"puede que tenga que editarlo ahora para que nmbd se ejecute." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "demonios, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "¿Cómo quiere que se ejecute Samba?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"El servicio Samba smbd puede ejecutarse como demonio normal o desde el " +"inetd. Se recomienda que se ejecute como demonio independiente." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "" +"¿Convertir el fichero /etc/samba/smbpasswd en /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:45 +#, fuzzy +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"La versión 3.0 de Samba introduce un nuevo base de dados \"SAM\" más " +"completo que suplanta al fichero /etc/samba/smbpasswd. ¿Quiere que el " +"fichero corriente smbpasswd sea convertido en /var/lib/samba/passdb.tdb? Si " +"pretende usar otro " + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "¡Se sobrescribirá su configuración smb.conf!" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" diff --git a/packaging/Debian/debian-unstable/po/fr.po b/packaging/Debian/debian-unstable/po/fr.po new file mode 100644 index 00000000000..6be14c19b43 --- /dev/null +++ b/packaging/Debian/debian-unstable/po/fr.po @@ -0,0 +1,301 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: Samba for Debian 3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:52-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Jeu de caractères pour les systèmes de fichiers Unix" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Une instruction « character set » (jeu de caractères) est utilisée dans " +"votre fichier smb.conf. Avec Samba 3.0, cette option est remplacée par une " +"nouvelle option, « unix charset » (jeu de caractères Unix). Veuillez " +"indiquer le jeu de caractères que vous voulez utiliser avec cette option, " +"qui permet d'interpréter les noms de fichiers sur le système." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Le fichier smb.conf ne sera pas modifié si vous laissez cette option sans " +"réponse." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Jeu de caractères pour les clients DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Votre fichier smb.conf contient une option « client code page » (page de " +"codes du client). Avec Samba 3.0, cette option a été remplacée par l'option " +"« dos charset » (jeu de caractères DOS). Veuillez indiquer le jeu de " +"caractères que vous voulez utiliser avec la nouvelle option. En général le " +"jeu de caractères choisi par défaut est suffisant. Veuillez noter que cette " +"option ne sert pas pour les clients Windows mais seulement pour les clients " +"DOS. Le fichier smb.conf ne sera pas modifié si vous laissez cette option " +"sans réponse. " + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "Modifier smb.conf pour utiliser les paramètres WINS fournis par DHCP ?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Si votre ordinateur obtient ses paramètres IP à partir d'un serveur DHCP du " +"réseau, ce serveur peut aussi fournir des informations sur les serveurs WINS " +"(serveurs de noms NetBIOS) présents sur le réseau. Une modification du " +"fichier smb.conf est nécessaire afin que les réglages WINS fournis par le " +"serveur DHCP soient lus dans /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "Pour cela, le paquet dhcp3-client doit être installé." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Voulez-vous configurer smb.conf avec debconf ?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"La suite de la configuration de Samba pose des questions sur des paramètres " +"de /etc/samba/smb.conf, le fichier utilisé pour configurer les programmes de " +"Samba (nmbd et smbd). Votre fichier actuel contient une ligne « include » ou " +"une option qui s'étale sur plusieurs lignes : cela peut perturber debconf et " +"il vaut mieux gérer manuellement le contenu de ce fichier." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Si vous n'utilisez pas debconf pour configurer smb.conf, vous devrez vous-" +"même gérer les modifications de configuration et vous ne pourrez pas " +"bénéficier des améliorations faites dans la configuration. Si possible, il " +"est conseillé d'utiliser debconf." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Groupe de travail et nom de domaine ?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Ce paramètre indique le groupe de travail où les clients trouveront le " +"serveur. Il indique aussi le nom de domaine utilisé par le paramètre " +"« security=domain »." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Voulez-vous chiffrer les mots de passe ?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Des clients Windows récents communiquent avec les serveurs SMB en utilisant " +"des mots de passe chiffrés. Si vous voulez utiliser des mots de passe sans " +"chiffrement, vous devez modifier un paramètre dans le registre de Windows. " +"Il est recommandé d'utiliser des mots de passe chiffrés. Si vous le faites, " +"n'oubliez pas de créer un fichier /etc/samba/smbpasswd et d'y mettre les " +"mots de passe de tous les utilisateurs qui se servent de la commande " +"smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Faut-il créer une base de données /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Pour préserver la compatibilité avec le comportement par défaut de la " +"plupart des systèmes Windows, Samba doit utiliser les mots de passe " +"chiffrés. Cela exige la création d'un fichier, distinct du fichier /etc/" +"passwd, pour mettre les mots de passe des utilisateurs. Ce fichier peut être " +"créé automatiquement, mais quelqu'un (vous ou l'utilisateur) devra ajouter " +"les mots de passe manuellement en utilisant la commande smbpasswd ; et vous " +"devrez maintenir à jour ce fichier. Si vous ne voulez pas créer le fichier " +"maintenant, Samba (et peut-être les ordinateurs Windows) devra utiliser des " +"mots de passe non chiffrés. Voyez /usr/share/doc/samba-doc/htmldocs/" +"ENCRYPTION.html dans le paquet samba-doc pour plus de détails." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Les fichiers-journaux de Samba ont changé de place." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"À partir des premiers paquets de Samba 2.2 pour Debian, les fichiers-" +"journaux des démons nmbd et smbd se trouvent dans /var/log/samba/. Les noms " +"de ces fichiers sont log.nmbd et log.smbd pour, respectivement, nmbd et smbd." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Les anciens fichiers-journaux dans /var/log/ seront mis au bon endroit." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "L'utilisation de nmbd à partir d'inetd n'est plus supportée" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Votre système lançait nmbd et smbd à partir d'inetd. Depuis la version 2.999" +"+3.0.alpha20-4, on ne peut plus exécuter nmbd à partir d'inetd. Si vous avez " +"modifié le script de lancement /etc/init.d/samba, vous avez peut-être besoin " +"de le corriger manuellement pour permettre le lancement de nmbd. " + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "démons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Comment voulez-vous lancer Samba ?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"Le service de Samba smbd peut s'exécuter en tant que démon classique ou bien " +"être lancé par inetd. L'approche recommandée est qu'il s'exécute en tant que " +"démon." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "Faut-il convertir /etc/samba/smbpasswd en /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"Avec Samba 3.0, une nouvelle interface pour les bases de données SAM, plus " +"complète, vient remplacer le fichier /etc/samba/smbpasswd. Voulez-vous que " +"votre fichier existant soit remplacé par /var/lib/samba/passdb.tdb ? Si vous " +"envisagez d'utiliser une autre interface d'authentification (p.ex. LDAP), " +"refusez la proposition maintenant." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Ré-écriture de votre fichier smb.conf !" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"SWAT va modifier votre fichier smb.conf. Les entrées seront réorganisées et " +"les commentaires détruits ainsi que les entrées « include = » et « copy = ». " +"Si votre smb.conf était soigneusement construit, sauvegardez-le ou " +"n'utilisez pas SWAT !" diff --git a/packaging/Debian/debian/po/ja.po b/packaging/Debian/debian-unstable/po/ja.po index 610b80f0d82..610b80f0d82 100644 --- a/packaging/Debian/debian/po/ja.po +++ b/packaging/Debian/debian-unstable/po/ja.po diff --git a/packaging/Debian/debian-unstable/po/nl.po b/packaging/Debian/debian-unstable/po/nl.po new file mode 100644 index 00000000000..61e8742dbb5 --- /dev/null +++ b/packaging/Debian/debian-unstable/po/nl.po @@ -0,0 +1,302 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: samba\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-08-30 02:03+0100\n" +"Last-Translator: Bart Cornelis <cobaco@linux.be>\n" +"Language-Team: dutch <debian-l10n-dutch@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Karakterset voor Unix bestandsysteem" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"U heeft momenteel een \"karakterset\" ingesteld in uw smb.conf. In Samba 3.0 " +"werd deze optie vervangen door een nieuwe \"unix karakterset\" optie. " +"Gelieve de karakterset die u voor deze nieuwe optie wil gebruiken aan te " +"geven, deze bepaald hoe Samba de bestandsnamen in het bestandsysteem " +"interpreteerd." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Uw smb.conf bestand wordt niet aangepast indien u deze optie leeg laat." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Karakterset voor DOS-clients" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"U heeft momenteel een \"client code pagina\" ingesteld in uw smb.conf. In " +"Samba 3.0 werd deze optie vervangen door de optie \"dos karakterset\". " +"Gelieve de karakterset die u voor deze nieuwe optie wilt gebruiken aan te " +"geven. In de meeste gevallen zal het standaard ingevulde antwoord voldoen. " +"Merk op dat deze optie niet nodig is voor ondersteuning van Windows-clients, " +"enkel voor DOS-clients. Uw smb.conf wordt niet veranderd wanneer u deze " +"optie blank laat." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "smb.conf aanpassen om de WINS instellingen van DHCP te gebruiken?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Indien uw computer zijn ip-addres informatie van een DHCP-server op het " +"netwerk haalt, voorziet deze mogelijks ook informatie betreffende de op het " +"netwerk aanwezige WINS-servers (\"NetBIOS naam servers\").\" Dit vereist een " +"verandering aan uw smb.conf bestand, opdat de door DHCP doorgegeven WINS " +"instellingen automatisch gelezen worden van /etc/samba/dhcp.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"U dient het dhcp3-client-pakket geïnstalleert te hebben om van deze optie " +"gebruik te maken." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Configuratie in smb.conf met debconf beheren?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"De resterende Samba configuratie beslaat parameters in /etc/samba/smb.conf, " +"het configuratiebestand dat gebruikt wordt voor de Samba programmas (nmbd en " +"smbd). Uw huidige smb.conf bevat een 'include' regel of een optie die " +"meerdere regels beslaat, dit kan debconf mogelijks in verwarring brenngen. " +"Indien debconf in verwarring raakt dient u uw smb.conf handmatig aan te " +"passen om samba terug werkend te krijgen." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Indien u geen gebruik maakt van debconf voor het beheer van smb.conf dient u " +"alle configuratie instellingen zelf te doen, en zult u geen voordeel halen " +"uit de periodieke configuratie verbeteringen. Het gebruik van debconf wordt " +"dan ook aangeraden. " + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Werkgroep/Domeinnaam?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Dit bepaald van welke werkgroep uw server deel zal lijken uit te maken bij " +"het beantwoorden van vragen door clients. Merk op dat deze parameter ook de " +"domeinnaam die gebruikt wordt voor de security=domein instelling bepaald." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Wachtwoord versleuteling gebruiken?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Recente Windows clients maken gebruik van versleutelde wachtwoorden voor de " +"communicatie met SMB-servers. Indien u onversleutelde tekst wachtwoorden " +"wilt gebruiken dient u een parameter te veranderen in de Windows registry. " +"Het gebruik van versleutelde wachtwoorden wordt aangeraden. Indien u dit " +"doet zorg er dan voor dat u een geldig /etc/samba/smbpasswd bestand heeft en " +"dat u de wachtwoorden daar voor elke gebruiker met behulp van smbpasswd " +"insteld. " + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Samba wachtwoord database, /var/lib/samba/passdb.tdb, aanmaken?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Om compatibel te zijn met de standaard instellingen van de meeste " +"Windowsversies dient Samba gebruik te maken van versleutelde wachtwoorden. " +"Dit vereist dat de gebruikerswachtwoorden opgeslagen worden in een bestand " +"dat verschilt van /etc/passwd. Dit bestand kan automatisch aangemaakt " +"worden, maar de wachtwoorden dienen handmatig (door de gebuiker) toegevoegt " +"te worden met het smbpasswd commando. U dient dit bestand in de toekomst ook " +"aktueel te houden. Indien u dit bestand niet aanmaakt zult u samba (en naar " +"alle waarschijnlijkheid de client machines) moeten herconfigureren zodat " +"deze onversleutelde wachtwoorden gebruiken. Zie /usr/share/doc/samba-doc/" +"htmldocs/ENCRYPTION.html uit het samba-doc pakket voor meer details." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Samba's log bestanden zijn verhuisd." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"Vanaf de eerste Debian pakketten vaan Samba versie 2.2 zijn de log bestanden " +"van beide Samba daemons (nmbd en smbd) opgeslagen in /var/log/samba/. De log " +"bestanden voor nmbd en smbd zijn, respectievelijk, log.nmbd en log.smbd." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"De oude logbestanden in /var/log worden voor u naar de nieuwe locatie " +"verplaatst." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "nmbd vanuit inetd draaien wordt niet langer ondersteund" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Uw systeem was geconfigureerd om nmbd en smbd vanuit inetd te starten. Vanaf " +"versie 2.999+3.0.alpha20-4 kan nmbd niet langer door inetd gestart worden. " +"Indien u uw /etc/init.d/samba startup-script aangepast had, dient u dit " +"mogelijks aan te passen opdat nmbd zou starten." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "daemons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Hoe wilt u Samba draaien?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"De Samba daemon smbd kan als een normale daemon of via inetd draaien. Als " +"een daemon is de aangeraden aanpak." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "/etc/samba/smbpasswd verplaatsen naar /var/lib/samba/passdb.tdb?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"Samba 3.0 introduceert een nieuwe, meer complete SAM databaseinterface die " +"het /etc/samba/smbpasswd bestand overstijgt. \"Wilt u dat ik uw bestaand " +"smbpasswd bestand voor u naar /var/lib/samba/passdb.tdb migreer? Indien u " +"van plan bent om, in plaats hiervan, een ander pdb-backend (e.g. LDAP) te " +"gebruiken dient u hier 'nee' te antwoorden." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Uw smb.conf wordt herschreven!" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"SWAT zal uw smb.conf bestand herschrijven. Het zal de ingangen anders " +"schikken en alle comments, include= en copy= opties verwijderen. Als u een, " +"met veel zorg, handmatig opgebouwd smb.conf bestand heeft, maak dan een " +"reservekopie of zie van het gebruik van SWAT af! " diff --git a/packaging/Debian/debian-unstable/po/pt_BR.po b/packaging/Debian/debian-unstable/po/pt_BR.po new file mode 100644 index 00000000000..2af42a562b9 --- /dev/null +++ b/packaging/Debian/debian-unstable/po/pt_BR.po @@ -0,0 +1,308 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: samba_3.0.0beta2-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: 2003-07-02 21:56-0500\n" +"Last-Translator: Steve Langasek <vorlon@debian.org>\n" +"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "Conjunto de caracteres para sistema de arquivos Unix" + +#. Description +#: ../samba-common.templates:3 +#, fuzzy +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" +"Atualmente existe um \"conjunto de caracteres\" (\"character set\") " +"configurado em seu arquivo smb.conf. No Samba 3.0, esta opção foi " +"substituída por uma nova opção, \"unix charset\". Por favor especifique o " +"conjunto de caracteres a ser usado para essa nova opção, a qual controla " +"como o Samba interpreta nomes de arquivos no sistema de arquivos." + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" +"Caso você deixe esta opção em branco, seu arquivo smb.conf não será " +"modificado." + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "Conjunto de caracteres para clientes DOS" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" +"Atualmente existe um \"código de página do cliente\" (\"client code page\") " +"definido em seu arquivo smb.conf. No Samba 3.0, essa opção foi substituída " +"pela opção \"dos charset\". Por favor, especifique o conjunto de caracteres " +"que você deseja usar para essa nova opção. Note que essa opção não é " +"necessária para suportar clientes Windows mas sim válida somente para " +"clientes DOS. Caso você deixe essa opção em branco, seu arquivo smb.conf não " +"será modificado." + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "Modificar smb.conf para usar configurações WINS fornecidas via DHCP ?" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" +"Caso seu computador obtenha as informações de endereçamento IP de um " +"servidor DHCP na rede, o servidor DHCP pode também fornecer informações " +"sobre servidor WINS (\"Servidor de Nomes NetBIOS\") presentes na rede. Para " +"o Samba ler as configurações WINS fornecidas pelo servidor DHCP " +"automaticamente do arquivo /etc/samba/dhcp.conf, é preciso modificar seu " +"arquivo smb.conf." + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" +"Você deve possuir o pacote dhcp3-client instalado para poder usar este " +"recurso." + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "Configurar smb.conf através do debconf ?" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" +"O restante da configuração do Samba lida com questões que afetam parâmetros " +"no arquivo /etc/samba/smb.conf, que é o arquivo usado para configurar os " +"programas Samba (nmbd e smbd). Seu arquivo smb.conf atual contém uma linha " +"'include' ou uma opção que ocupa diversas linhas, o que pode confundir o " +"debconf e requerer que você edite seu arquivo smb.conf manualmente para tê-" +"lo funcional novamente." + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" +"Caso você opte por não usar o debconf para configurar o smb.conf, será " +"necessário que você lide com quaisquer mudanças de configurações manualmente " +"e você não poderá aproveitar os melhoramentos periódicos de configuração. " +"Por esse motivo, é recomendado usar o debconf, caso seja possível." + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "Nome de Domínio/Grupo de Trabalho ?" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" +"Este parâmetro controla em qual grupo de trabalho (workgroup) seu servidor " +"parecerá estar quando o mesmo for pesquisado por clientes. Note que este " +"parâmetro também controla o nome de Domínio usado com a configuração " +"security=domain." + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "Usar encriptação de senhas ?" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" +"Clientes Windows atuais comunicam-se com servidores SMB usando senhas " +"encriptadas. Caso você queira usar senhas em texto puro você precisará " +"modificar um parâmetro no registro de seu Windows. É recomendado que você " +"use senhas encriptadas. Se for usá-las, certifique-se de possuir um arquivo /" +"etc/samba/smbpasswd válido e que você tenha definido senhas no mesmo para " +"cada usuário, utilizando o comando smbpasswd." + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "Gerar a base de dados para senhas /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" +"Para compatibilidade com os padrões adotados em todas as versões atuais do " +"Windows o Samba deve ser configurado para usar senhas encriptadas. Isso " +"requer que as senhas dos usuários sejam armazenadas em um arquivo diferente " +"do /etc/passwd. Esse arquivo pode ser criado automaticamente, mas as senhas " +"devem ser definidas manualmente (por você ou pelo usuário) executando o " +"utilitário smbpasswd. Você deve certificar-se de manter esse arquivo " +"atualizado futuramente. Caso você não crie esse arquivo, você terá que " +"reconfigurar o Samba (e provavelmente suas máquinas clientes) para " +"utilização de senhas em texto puro. Consulte a documentação do pacote samba-" +"doc em /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html para maiores " +"detalhes." + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "Arquivos de log do Samba foram movidos." + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" +"Desde os primeiros pacotes Debian do Samba 2.2 os arquivos de log para ambos " +"os daemons Samba (nmbd e smbd) são armazenados no diretório /var/log/samba/. " +"Os nomes desses arquivos são log.nmbd e log.smbd, para o nmbd e para o smbd, " +"respectivamente." + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" +"Os antigos arquivos de log que estavam em /var/log/ serão movidos para a " +"nova localização automaticamente para você." + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "A execução do nmbd a partir do inetd não é mais suportada" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" +"Seu sistema foi previamente configurado para iniciar os daemons nmbd e smbd " +"a partir do inetd. Desde a versão 2.999+3.0.alpha20-4, o nmbd não mais será " +"iniciado a partir do inetd. Caso você tenha modificado seu script de " +"inicialização /etc/init.d/samba, você pode precisar ajustá-lo manualmente " +"agora para que o nmbd seja iniciado." + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "daemons, inetd" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "Como você deseja que o Samba seja executado ?" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" +"O serviço Samba smbd pode ser executado como daemon normal ou a partir do " +"inetd. Executá-lo como daemon é o método recomendado." + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "Mover /etc/samba/smbpasswd para /var/lib/samba/passdb.tdb ?" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" +"O Samba 3.0 introduz uma nova e mais complete interface de base de dados SAM " +"que substitui o arquivo /etc/samba/smbpasswd. Você gostaria que o arquivo " +"smbpasswd existente fosse migrado para /var/lib/samba/passdb.tdb para você ? " +"Caso você planeje usar um outro backend (como LDAP, por exemplo) você deverá " +"escolher 'não' aqui." + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "Seu arquivo smb.conf será reescrito !" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" +"O SWAT irá reescrever seu arquivo smb.conf. Ele irá rearrumar as entradas e " +"apagar todos os comentários, opções include= e copy=. Caso você possua um " +"arquivo smb.conf cuidadosamente criado e comentado, faça uma cópia de " +"segurança (backup) do mesmo ou não use o SWAT !" diff --git a/packaging/Debian/debian-unstable/po/templates.pot b/packaging/Debian/debian-unstable/po/templates.pot new file mode 100644 index 00000000000..465f4719b0d --- /dev/null +++ b/packaging/Debian/debian-unstable/po/templates.pot @@ -0,0 +1,233 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-08-30 19:08-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../samba-common.templates:3 +msgid "Character Set for Unix filesystem" +msgstr "" + +#. Description +#: ../samba-common.templates:3 +msgid "" +"You currently have a \"character set\" configured in your smb.conf. In " +"Samba 3.0, this option is replaced by a new option, \"unix charset\". Please " +"specify the character set you wish to use for theis new option, which " +"controls how Samba interprets filenames on the file system." +msgstr "" + +#. Description +#: ../samba-common.templates:3 +msgid "If you leave this option blank, your smb.conf will not be changed." +msgstr "" + +#. Description +#: ../samba-common.templates:13 +msgid "Character Set for DOS clients" +msgstr "" + +#. Description +#: ../samba-common.templates:13 +msgid "" +"You currently have a \"client code page\" set in your smb.conf. In Samba " +"3.0, this option is replaced by the option \"dos charset\". Please specify " +"the character set you wish to use for this new option. In most cases, the " +"default chosen for you will be sufficient. Note that this option is not " +"needed to support Windows clients, it is only for DOS clients. If you leave " +"this option blank, your smb.conf will not be changed." +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "Modify smb.conf to use WINS settings from DHCP?" +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"If your computer gets IP address information from a DHCP server on the " +"network, the DHCP server may also provide information about WINS servers " +"(\"NetBIOS name servers\") present on the network. This requires a change " +"to your smb.conf file so that DHCP-provided WINS settings will automatically " +"be read from /etc/samba/dhcp.conf." +msgstr "" + +#. Description +#: ../samba-common.templates:24 +msgid "" +"You must have the dhcp3-client package installed to take advantage of this " +"feature." +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "Configure smb.conf through debconf?" +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"The rest of the configuration of Samba deals with questions that affect " +"parameters in /etc/samba/smb.conf, which is the file used to configure the " +"Samba programs (nmbd and smbd.) Your current smb.conf contains an 'include' " +"line or an option that spans multiple lines, which could confuse debconf and " +"require you to edit your smb.conf by hand to get it working again." +msgstr "" + +#. Description +#: ../samba-common.templates:37 +msgid "" +"If you don't use debconf to configure smb.conf, you will have to handle any " +"configuration changes yourself, and will not be able to take advantage of " +"periodic configuration enhancements. Therefore, use of debconf is " +"recommended if possible." +msgstr "" + +#. Description +#: ../samba-common.templates:52 +msgid "Workgroup/Domain Name?" +msgstr "" + +#. Description +#: ../samba-common.templates:52 +msgid "" +"This controls what workgroup your server will appear to be in when queried " +"by clients. Note that this parameter also controls the Domain name used with " +"the security=domain setting." +msgstr "" + +#. Description +#: ../samba-common.templates:60 +msgid "Use password encryption?" +msgstr "" + +#. Description +#: ../samba-common.templates:60 +msgid "" +"Recent Windows clients communicate with SMB servers using encrypted " +"passwords. If you want to use clear text passwords you will need to change a " +"parameter in your Windows registry. It is recommended that you use encrypted " +"passwords. If you do, make sure you have a valid /etc/samba/smbpasswd file " +"and that you set passwords in there for each user using the smbpasswd " +"command." +msgstr "" + +#. Description +#: ../samba.templates:4 +msgid "Create samba password database, /var/lib/samba/passdb.tdb?" +msgstr "" + +#. Description +#: ../samba.templates:4 +msgid "" +"To be compatible with the defaults in most versions of Windows, Samba must " +"be configured to use encrypted passwords. This requires user passwords to " +"be stored in a file separate from /etc/passwd. This file can be created " +"automatically, but the passwords must be added manually (by you or the user) " +"by running smbpasswd, and you must arrange to keep it up-to-date in the " +"future. If you do not create it, you will have to reconfigure samba (and " +"probably your client machines) to use plaintext passwords. See /usr/share/" +"doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package for more " +"details." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "Samba's log files have moved." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "" +"Starting with the first packages of Samba 2.2 for Debian the log files for " +"both Samba daemons (nmbd and smbd) are now stored in /var/log/samba/. The " +"names of the files are log.nmbd and log.smbd, for nmbd and smbd respectively." +msgstr "" + +#. Description +#: ../samba.templates:17 +msgid "" +"The old log files that were in /var/log/ will be moved to the new location " +"for you." +msgstr "" + +#. Description +#: ../samba.templates:28 +msgid "Running nmbd from inetd is no longer supported" +msgstr "" + +#. Description +#: ../samba.templates:28 +msgid "" +"Your system was previously configured to start nmbd and smbd from inetd. As " +"of version 2.999+3.0.alpha20-4, nmbd will no longer be started from inetd. " +"If you have modified your /etc/init.d/samba startup script, you may need to " +"adjust it by hand now so that nmbd will start." +msgstr "" + +#. Choices +#: ../samba.templates:36 +msgid "daemons, inetd" +msgstr "" + +#. Description +#: ../samba.templates:38 +msgid "How do you want to run Samba?" +msgstr "" + +#. Description +#: ../samba.templates:38 +msgid "" +"The Samba daemon smbd can run as a normal daemon or from inetd. Running as a " +"daemon is the recommended approach." +msgstr "" + +#. Description +#: ../samba.templates:45 +msgid "Move /etc/samba/smbpasswd to /var/lib/samba/passdb.tdb?" +msgstr "" + +#. Description +#: ../samba.templates:45 +msgid "" +"Samba 3.0 introduces a newer, more complete SAM database interface which " +"supersedes the /etc/samba/smbpasswd file. Would you like your existing " +"smbpasswd file to be migrated to /var/lib/samba/passdb.tdb for you? If you " +"plan to use another pdb backend (e.g., LDAP) instead, you should answer 'no' " +"here." +msgstr "" + +#. Description +#: ../swat.templates:3 +msgid "Your smb.conf will be re-written!" +msgstr "" + +#. Description +#: ../swat.templates:3 +msgid "" +"SWAT will rewrite your smb.conf file. It will rearrange the entries and " +"delete all comments, include= and copy= options. If you have a carefully " +"crafted smb.conf then back it up or don't use SWAT!" +msgstr "" diff --git a/packaging/Debian/debian/python2.3-samba.files b/packaging/Debian/debian-unstable/python2.3-samba.files index 82759d81b89..82759d81b89 100644 --- a/packaging/Debian/debian/python2.3-samba.files +++ b/packaging/Debian/debian-unstable/python2.3-samba.files diff --git a/packaging/Debian/debian/rules b/packaging/Debian/debian-unstable/rules index e00693a814c..e00693a814c 100755 --- a/packaging/Debian/debian/rules +++ b/packaging/Debian/debian-unstable/rules diff --git a/packaging/Debian/debian/samba-common.config b/packaging/Debian/debian-unstable/samba-common.config index 766f0ddb7ef..766f0ddb7ef 100644 --- a/packaging/Debian/debian/samba-common.config +++ b/packaging/Debian/debian-unstable/samba-common.config diff --git a/packaging/Debian/debian/samba-common.dhcp b/packaging/Debian/debian-unstable/samba-common.dhcp index 3b5a05ff573..3b5a05ff573 100644 --- a/packaging/Debian/debian/samba-common.dhcp +++ b/packaging/Debian/debian-unstable/samba-common.dhcp diff --git a/packaging/Debian/debian-unstable/samba-common.dirs b/packaging/Debian/debian-unstable/samba-common.dirs new file mode 100644 index 00000000000..c089ad73573 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba-common.dirs @@ -0,0 +1,2 @@ +etc/samba +etc/dhcp3/dhclient-enter-hooks.d diff --git a/packaging/Debian/debian/samba-common.files b/packaging/Debian/debian-unstable/samba-common.files index f5779fa8270..f5779fa8270 100644 --- a/packaging/Debian/debian/samba-common.files +++ b/packaging/Debian/debian-unstable/samba-common.files diff --git a/packaging/Debian/debian-unstable/samba-common.postinst b/packaging/Debian/debian-unstable/samba-common.postinst new file mode 100644 index 00000000000..6c6eb9bf537 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba-common.postinst @@ -0,0 +1,139 @@ +#!/bin/sh +# +# + +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 + +# Static tempfile location, dpkg-style +TMPFILE=/etc/samba/smb.conf.dpkg-tmp + +# ------------------------- Debconf questions start --------------------- + +# Is the user configuring with debconf, or he/she prefers swat/manual +# config? +db_get samba-common/do_debconf || true +if [ "${RET}" = "true" ]; then + # Get workgroup name + db_get samba-common/workgroup || true + WORKGROUP="${RET}" + + # Oh my GOD, this is ugly. Why would anyone put these + # characters in a workgroup name? Why, Lord, why??? + WORKGROUP=`echo $WORKGROUP | \ + sed -e's/\\\\/\\\\\\\\/g + s#/#\\\\/#g + s/&/\\\&/g + s/\\\$/\\\\\\\$/g'` + + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)workgroup[[:space:]]*=.*/\1workgroup = ${WORKGROUP}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + + # Encrypt passwords? + db_get samba-common/encrypt_passwords || true + ENCRYPT_PASSWORDS="${RET}" + + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)encrypt passwords[[:space:]]*=.*/\1encrypt passwords = ${ENCRYPT_PASSWORDS}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + + # Install DHCP support + db_get samba-common/dhcp && DHCPVAL="$RET" + db_fget samba-common/dhcp applied || true + if [ "$DHCPVAL" = true ] && [ "$RET" != true ] && \ + ! grep -q dhcp.conf /etc/samba/smb.conf + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /wins server[[:space:]]*=/a \\ +\\ +# If we receive WINS server info from DHCP, override the options above. \\ + include = /etc/samba/dhcp.conf +}" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + elif [ "$RET" != true ] && grep -q dhcp.conf /etc/samba/smb.conf + then + : + # FIXME: here we /delete/ the lines? + fi + # Once we get here, the config has been applied, whatever + # it is. + if [ "$RET" != true ]; then + db_fset samba-common/dhcp applied true + fi + + # Update charset settings? + if ! grep -q "^[[:space:]]*unix charset[[:space:]]*=" /etc/samba/smb.conf + then + db_get samba-common/character_set || true + UNIXCHARSET="${RET}" + if [ -n "$UNIXCHARSET" ] + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)character set/\1character set/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*character set[[:space:]]*=/c \\ + unix charset = $UNIXCHARSET + }" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + fi + + if grep -qi "^[[:space:]]*passdb backend[[:space:]]*=.*unixsam" /etc/samba/smb.conf + then + sed -e 's/^\([[:space:]]*\)passdb backend/\1passdb backend/i + /^[[:space:]]*passdb backend/ { + s/unixsam/guest/i + }' < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + + if ! grep -q "^[[:space:]]*dos charset[[:space:]]*=" /etc/samba/smb.conf + then + db_get samba-common/codepage || true + DOSCHARSET="${RET}" + if [ -n "$DOSCHARSET" ] + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + s/^\([[:space:]]*\)client code page/\1client code page/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ { + /^[[:space:]]*client code page[[:space:]]*=/c \\ + dos charset = $DOSCHARSET +}" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + fi + + if dpkg --compare-versions "$2" lt 2.999+3.0.alpha20-4 \ + && ! grep -q "^[[:space:]]*panic action[[:space:]]*=" /etc/samba/smb.conf + then + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/a \\ +\\ +# Do something sensible when Samba crashes: mail the admin a backtrace\\ + panic action = /usr/share/samba/panic-action %d" < /etc/samba/smb.conf > ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf + fi + +fi + +chmod a+r /etc/samba/smb.conf + +# ------------------------- Debconf questions end --------------------- + +db_stop + +#DEBHELPER# diff --git a/packaging/Debian/debian-unstable/samba-common.postrm b/packaging/Debian/debian-unstable/samba-common.postrm new file mode 100644 index 00000000000..8a4b6d3d55e --- /dev/null +++ b/packaging/Debian/debian-unstable/samba-common.postrm @@ -0,0 +1,10 @@ +#!/bin/sh +# +# + +if [ "$1" = purge ]; then + # Remove any files left in /etc/samba/ + rm -Rf /etc/samba/ +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba-common.templates b/packaging/Debian/debian-unstable/samba-common.templates index e5f7b1ae0cc..e5f7b1ae0cc 100644 --- a/packaging/Debian/debian/samba-common.templates +++ b/packaging/Debian/debian-unstable/samba-common.templates diff --git a/packaging/Debian/debian/samba-doc.docs b/packaging/Debian/debian-unstable/samba-doc.docs index 4d2cec2ee22..4d2cec2ee22 100644 --- a/packaging/Debian/debian/samba-doc.docs +++ b/packaging/Debian/debian-unstable/samba-doc.docs diff --git a/packaging/Debian/debian-unstable/samba-doc.examples b/packaging/Debian/debian-unstable/samba-doc.examples new file mode 100644 index 00000000000..e71180364cf --- /dev/null +++ b/packaging/Debian/debian-unstable/samba-doc.examples @@ -0,0 +1,2 @@ +debian/wins2dns.awk +source/smbadduser diff --git a/packaging/Debian/debian/samba.config b/packaging/Debian/debian-unstable/samba.config index 300b19a2e84..300b19a2e84 100644 --- a/packaging/Debian/debian/samba.config +++ b/packaging/Debian/debian-unstable/samba.config diff --git a/packaging/Debian/debian-unstable/samba.cron.daily b/packaging/Debian/debian-unstable/samba.cron.daily new file mode 100644 index 00000000000..42fc98d8f6d --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.cron.daily @@ -0,0 +1,16 @@ +#!/bin/sh +# +# cron script to save a backup copy of /etc/samba/smbpasswd in /var/backups. +# +# Written by Eloy A. Paris <peloy@debian.org> for the Debian project. +# + +BAK=/var/backups + +umask 022 +if cd $BAK; then + # Make sure /etc/samba/smbpasswd exists + if [ -f /etc/samba/smbpasswd ]; then + cmp -s smbpasswd.bak /etc/samba/smbpasswd || cp -p /etc/samba/smbpasswd smbpasswd.bak + fi +fi diff --git a/packaging/Debian/debian/samba.dirs b/packaging/Debian/debian-unstable/samba.dirs index a58e4e98929..a58e4e98929 100644 --- a/packaging/Debian/debian/samba.dirs +++ b/packaging/Debian/debian-unstable/samba.dirs diff --git a/packaging/Debian/debian/samba.docs b/packaging/Debian/debian-unstable/samba.docs index b8cc5419fb1..b8cc5419fb1 100644 --- a/packaging/Debian/debian/samba.docs +++ b/packaging/Debian/debian-unstable/samba.docs diff --git a/packaging/Debian/debian-unstable/samba.files b/packaging/Debian/debian-unstable/samba.files new file mode 100644 index 00000000000..f52e6c5e4f7 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.files @@ -0,0 +1,19 @@ +usr/bin/testprns +usr/bin/smbstatus +usr/bin/smbcontrol +usr/bin/tdbbackup +usr/bin/pdbedit +usr/sbin/smbd +usr/sbin/nmbd +usr/sbin/mksmbpasswd +usr/lib/samba/vfs +usr/share/man/man1/smbcontrol.1 +usr/share/man/man1/smbstatus.1 +usr/share/man/man1/testprns.1 +usr/share/man/man5/smbpasswd.5 +usr/share/man/man8/nmbd.8 +usr/share/man/man8/pdbedit.8 +usr/share/man/man8/smbd.8 +usr/share/man/man8/mksmbpasswd.8 +usr/share/man/man8/tdbbackup.8 + diff --git a/packaging/Debian/debian-unstable/samba.init b/packaging/Debian/debian-unstable/samba.init new file mode 100644 index 00000000000..5d0f4671a00 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.init @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Start/stops the Samba daemons (nmbd and smbd). +# +# + +# Defaults +RUN_MODE="daemons" + +# Reads config file (will override defaults above) +[ -r /etc/default/samba ] && . /etc/default/samba + +NMBDPID=/var/run/samba/nmbd.pid +SMBDPID=/var/run/samba/smbd.pid + +# clear conflicting settings from the environment +unset TMPDIR + +# See if the daemons are there +test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0 + +case "$1" in + start) + echo -n "Starting Samba daemons:" + + echo -n " nmbd" + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- -D + + if [ "$RUN_MODE" != "inetd" ]; then + echo -n " smbd" + start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- -D + fi + + echo "." + ;; + stop) + echo -n "Stopping Samba daemons: " + + start-stop-daemon --stop --quiet --pidfile $NMBDPID + # Wait a little and remove stale PID file + sleep 1 + if [ -f $NMBDPID ] && ! ps h `cat $NMBDPID` > /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" + + if [ "$RUN_MODE" != "inetd" ]; then + 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 -n " smbd" + fi + + echo "." + + ;; + reload) + echo -n "Reloading /etc/samba/smb.conf (smbd only)" + start-stop-daemon --stop --signal HUP --pidfile $SMBDPID + + echo "." + ;; + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/Debian/debian-unstable/samba.logrotate b/packaging/Debian/debian-unstable/samba.logrotate new file mode 100644 index 00000000000..f90437bf2ad --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.logrotate @@ -0,0 +1,21 @@ +/var/log/samba/log.smbd { + weekly + missingok + rotate 7 + postrotate + invoke-rc.d --quiet samba reload > /dev/null + endscript + compress + notifempty +} + +/var/log/samba/log.nmbd { + weekly + missingok + rotate 7 + postrotate + [ -f /var/run/samba/nmbd.pid ] && kill -HUP `cat /var/run/samba/nmbd.pid` + endscript + compress + notifempty +} diff --git a/packaging/Debian/debian/samba.pamd b/packaging/Debian/debian-unstable/samba.pamd index e2c7a99356d..e2c7a99356d 100644 --- a/packaging/Debian/debian/samba.pamd +++ b/packaging/Debian/debian-unstable/samba.pamd diff --git a/packaging/Debian/debian-unstable/samba.postinst b/packaging/Debian/debian-unstable/samba.postinst new file mode 100644 index 00000000000..7b0bdd92ad5 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.postinst @@ -0,0 +1,228 @@ +#!/bin/sh -e +# +# Post-installation script for the Samba package for Debian GNU/Linux +# +# + +case "$1" in + configure) + # continue below + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# Handle debconf +. /usr/share/debconf/confmodule + +INITCONFFILE=/etc/default/samba + +# We generate several files during the postinst, and we don't want +# them to be readable only by root. +umask 022 + + +# Generate configuration file if it does not exist, using default values. +[ -r "${INITCONFFILE}" ] || { + echo Generating ${INITCONFFILE}... >&2 + cat >${INITCONFFILE} <<'EOFMAGICNUMBER1234' +# Defaults for samba initscript +# sourced by /etc/init.d/samba +# installed at /etc/default/samba by the maintainer scripts +# + +# +# This is a POSIX shell fragment +# + +# How should Samba (smbd) run? Possible values are "daemons" +# or "inetd". +RUN_MODE="" +EOFMAGICNUMBER1234 +} + +# --- Begin of FHS migration code --- + +# Starting with Samba 2.2.3-4 the WINS database, the browse +# database and other important run-time files are stored in +# FHS-compliant directories. The following code takes care of +# moving the files in the old directories (/var/samba/ and +# /var/state/samba) to the new FHS-compliant directories. + +if [ -d /var/samba/ ]; then + mv /var/samba/* /var/lib/samba/ 2>/dev/null || true + rmdir /var/samba/ +fi + +# Default for anything we don't know about (see next two 'for' loops) +# is /var/lib/samba -- guaranteed not to accidentally tromp on any +# files the admin thought were safe. +if [ -d /var/state/samba ]; then + mv /var/state/samba/* /var/lib/samba/ 2>/dev/null || true + rmdir /var/state/samba/ + + # It's not FHS, and it's probably our fault this is here, + # so delete it if we can. + rmdir /var/state/ 2> /dev/null || true +fi + +# All these files are now placed in their respective FHS-compliant +# directories. Separate out the individual files accordingly. +for F in browse.dat printing.tdb winbindd_cache.tdb +do + if [ -e /var/lib/samba/"$F" ]; then + mv /var/lib/samba/"$F" /var/cache/samba/ + fi +done + +for F in brlock.tdb connections.tdb locking.tdb messages.tdb nmbd.pid \ + sessionid.tdb smbd.pid unexpected.tdb +do + if [ -e /var/lib/samba/"$F" ]; then + mv /var/lib/samba/"$F" /var/run/samba/ + fi +done + +# Beginning with Samba 2.2.5-1, we also move the domain secrets file +# to a more suitable location, since no one really edits this by hand. +if [ -e /etc/samba/secrets.tdb -a ! -e /var/lib/samba/secrets.tdb ] +then + mv /etc/samba/secrets.tdb /var/lib/samba/ +fi + +# If upgrading from a previous 2.999 snapshot, move the passdb.tdb +# database into /var/lib. + +if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.999+3.0.alpha23-5 \ + && [ -e /etc/samba/passdb.tdb -a ! -e /var/lib/samba/passdb.tdb ] +then + mv /etc/samba/passdb.tdb /var/lib/samba/ +fi + +# --- End of FHS migration code --- + +# If upgrading from a previous 2.999 snapshot, clear the broken +# registry.tdb file. +if [ -n "$2" ] && dpkg --compare-versions "$2" gt 2.99.cvs.20020713-1 \ + && dpkg --compare-versions "$2" lt 2.999+3.0cvs20020805-1 +then + rm -f /var/lib/samba/registry.tdb +fi + +# ------------------------- Debconf questions start --------------------- + +# Run Samba as daemons or from inetd? +db_get samba/run_mode || true +RUN_MODE="${RET}" + +TMPFILE=/etc/default/samba.dpkg-tmp +sed -e "s/^[[:space:]]*RUN_MODE[[:space:]]*=.*/RUN_MODE=\"${RUN_MODE}\"/" \ + < ${INITCONFFILE} >${TMPFILE} +chmod a+r ${TMPFILE} +mv -f ${TMPFILE} ${INITCONFFILE} + +# Generate a smbpasswd file? +db_get samba/generate_smbpasswd || true +GENERATE_SMBPASSWD="${RET}" + +db_get samba/tdbsam || true +PDB_MIGRATE="${RET}" + +# Done with debconf now. +db_stop + +umask 066 + +# FIXME: disable if ldapsam support is enabled? +# FIXME: we don't want to pass these through the smbpasswd backend, +# some of the faking can cause us problems! +if [ "${GENERATE_SMBPASSWD}" = "true" -a ! -e /var/lib/samba/passdb.tdb -a ! -e /etc/samba/smbpasswd ]; then + getent passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd + pdbedit -i smbpasswd -e tdbsam + rm /etc/samba/smbpasswd +fi + +umask 022 + +if [ -n "$2" -a -e /etc/samba/smbpasswd \ + -a ! -e /var/lib/samba/passdb.tdb -a "$PDB_MIGRATE" = "true" ] \ + && dpkg --compare-versions "$2" lt 2.99.cvs.20020713-2 +then + umask 066 + pdbedit -i smbpasswd -e tdbsam + rm /etc/samba/smbpasswd + umask 022 + + # The database has been moved, now make sure we can still find it. + PASSDB=`sed -n -e"s/^[[:space:]]*\[global\]/\[global\]/i + /^\[global\]/,/^[[:space:]]*\[/ \ + s/^[[:space:]]*passdb backend[[:space:]]*=[[:space:]]*//pi" \ + < /etc/samba/smb.conf \ + | tail -n 1` + if echo "$PASSDB" | egrep -q "(^|[[:space:]])smbpasswd"; then + if ! echo "$PASSDB" | egrep -q "(^|[[:space:]])tdbsam"; then + PASSDB=`echo $PASSDB | sed -e's/\(^\|[[:space:]]\)smbpasswd/\1tdbsam/'` + fi + fi + if ! echo "$PASSDB" | egrep -q "(^|[[:space:]])tdbsam"; then + PASSDB="tdbsam $PASSDB" + fi + TMPFILE=/etc/samba/smb.conf.dpkg-tmp + sed -e "s/^\([[:space:]]*\)\[global\]/\1\[global\]/i + /^[[:space:]]*\[global\]/,/^[[:space:]]*\[/ \ + s/^\([[:space:]]*\)passdb backend[[:space:]]*=.*/\1passdb backend = ${PASSDB}/i" \ + < /etc/samba/smb.conf >${TMPFILE} + chmod a+r ${TMPFILE} + mv -f ${TMPFILE} /etc/samba/smb.conf +fi + +# ------------------------- Debconf questions end --------------------- + +# Handle removal of nmbd from inetd.conf, which is no longer a supported +# configuration. +if dpkg --compare-versions "$2" lt 2.999+3.0.alpha20-4; then + update-inetd --remove netbios-ns +fi + +# We want to add these entries to inetd.conf commented out. Otherwise +# UDP traffic could make inetd to start nmbd or smbd right during +# the configuration stage. +if [ -z "$2" ]; then + update-inetd --add "#<off># netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd" +fi + +if [ "$RUN_MODE" = "daemons" ]; then + update-inetd --disable netbios-ssn +else + update-inetd --enable netbios-ssn +fi + +# This check is a safety net: the /etc/samba/smbpasswd file must have +# permissions 600. +if [ -f /etc/samba/smbpasswd ]; then + chmod 600 /etc/samba/smbpasswd +fi + +# Do the same check for /var/backup/smbpasswd.bak, just in case. +if [ -f /var/backups/smbpasswd.bak ]; then + chmod 600 /var/backups/smbpasswd.bak +fi + +# Delete old /etc/samba/debian_config file, which is not used anymore +# now that we are using debconf. +rm -f /etc/samba/debian_config + +# Move old log files to the new location of Samba's log files +mv -f /var/log/nmb* /var/log/samba/ 2> /dev/null || true +mv -f /var/log/smb* /var/log/samba/ 2> /dev/null || true + +#DEBHELPER# + +exit 0 diff --git a/packaging/Debian/debian-unstable/samba.postrm b/packaging/Debian/debian-unstable/samba.postrm new file mode 100644 index 00000000000..b79fe1d0099 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.postrm @@ -0,0 +1,26 @@ +#!/bin/sh -e +# +# + +if [ "$1" = purge ]; then + + # Remove Samba's state files, both volatile and non-volatile + rm -Rf /var/run/samba/ /var/cache/samba/ /var/lib/samba + + # Remove log files + rm -Rf /var/log/samba/ + + # Remove init.d configuration file + echo Removing configuration file /etc/default/samba... >&2 + rm -f /etc/default/samba + + # Remove NetBIOS entries from /etc/inetd.conf + update-inetd --remove netbios-ssn + +else + # Not purging, do not remove NetBIOS entries from /etc/inetd.conf + update-inetd --disable netbios-ssn + +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian-unstable/samba.prerm b/packaging/Debian/debian-unstable/samba.prerm new file mode 100644 index 00000000000..ab62c706d85 --- /dev/null +++ b/packaging/Debian/debian-unstable/samba.prerm @@ -0,0 +1,10 @@ +#!/bin/sh -e + +if [ "$1" = upgrade -a -n "$2" ] && dpkg --compare-versions "$2" lt 2.99 \ + && [ -e /var/lib/samba/passdb.tdb -a ! -e /etc/samba/smbpasswd ] +then + pdbedit -i tdbsam -e smbpasswd + rm -f /var/lib/samba/passdb.tdb +fi + +#DEBHELPER# diff --git a/packaging/Debian/debian/samba.templates b/packaging/Debian/debian-unstable/samba.templates index ce503aea5c4..ce503aea5c4 100644 --- a/packaging/Debian/debian/samba.templates +++ b/packaging/Debian/debian-unstable/samba.templates diff --git a/packaging/Debian/debian-unstable/scripts/patch-source b/packaging/Debian/debian-unstable/scripts/patch-source new file mode 100755 index 00000000000..a8559b41676 --- /dev/null +++ b/packaging/Debian/debian-unstable/scripts/patch-source @@ -0,0 +1,28 @@ +#!/bin/sh -e +# +# + +for patch in debian/patches/*.patch; do + echo '->'`basename $patch`: + patch -p1 --ignore-whitespace < $patch +done + +# This code is currently not used because it creates a long version +# number string. For now we're sticking to <upstream version>-Debian, +# as in 3.0.0rc2-Debian. peloy@debian.org.- + +# ---- Begin unused code ---- +# Get Debian version number from 1st line of the Debian changelog +#DEBIAN_VERSION=`sed -n -e '1s/^.*(\(.*\)).*$/\1/p' debian/changelog` + +# Insert Debian version number in source/VERSION, which will then be +# used to create source/include/version.h. +#TMPFILE=source/VERSION.debian +#sed -e "s/^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*$/\1\"Debian-${DEBIAN_VERSION}\"/" source/VERSION > ${TMPFILE} +#mv -f ${TMPFILE} source/VERSION +# ---- End unused code ---- + +# Regenerate configure only if it is older than configure.in +[ source/configure -ot source/configure.in ] && (cd source && sh ./autogen.sh) + +exit 0 diff --git a/packaging/Debian/debian-unstable/scripts/unpatch-source b/packaging/Debian/debian-unstable/scripts/unpatch-source new file mode 100755 index 00000000000..d3681cfa504 --- /dev/null +++ b/packaging/Debian/debian-unstable/scripts/unpatch-source @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# + +# We want to reverse the patches in the opposite order we applied +# them, hence the 'ls|sort -r'. +for patch in `ls debian/patches/*.patch | sort -r`; do + patch -p1 -R --ignore-whitespace < $patch +done + +# Unused code. See comment in the patch-source script. + +#TMPFILE=source/VERSION.debian +#sed -e "s/^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*$/\1/" source/VERSION > ${TMPFILE} +#mv -f ${TMPFILE} source/VERSION + +# Regenerate configure only if it is older than configure.in +[ source/configure -ot source/configure.in ] && (cd source && autoheader && autoconf) + +exit 0 diff --git a/packaging/Debian/debian-unstable/smb.conf b/packaging/Debian/debian-unstable/smb.conf new file mode 100644 index 00000000000..8a75979945a --- /dev/null +++ b/packaging/Debian/debian-unstable/smb.conf @@ -0,0 +1,237 @@ +# +# Sample configuration file for the Samba suite for Debian GNU/Linux. +# +# +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options most of which +# are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentary and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command +# "testparm" to check that you have not many any basic syntactic +# errors. +# + +#======================= Global Settings ======================= + +[global] + +## Browsing/Identification ### + +# Change this to the workgroup/NT-domain name your Samba server will part of + workgroup = DEBIAN_FANS + +# server string is the equivalent of the NT Description field + server string = %h server (Samba %v) + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable its WINS Server +; wins support = no + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# This will prevent nmbd to search for NetBIOS names through DNS. + dns proxy = no + +# What naming service and in what order should we use to resolve host names +# to IP addresses +; name resolve order = lmhosts host wins bcast + + +#### Debugging/Accounting #### + +# This tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 1000 + +# If you want Samba to only log through syslog then set the following +# parameter to 'yes'. +; syslog only = no + +# We want Samba to log a minimum amount of information to syslog. Everything +# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log +# through syslog you should set the following parameter to something higher. + syslog = 0 + +# Do something sensible when Samba crashes: mail the admin a backtrace + panic action = /usr/share/samba/panic-action %d + + +####### Authentication ####### + +# "security = user" is always a good idea. This will require a Unix account +# in this server for every user accessing the server. See +# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc +# package for details. +; security = user + +# You may wish to use password encryption. See the section on +# 'encrypt passwords' in the smb.conf(5) manpage before enabling. + encrypt passwords = no + +# If you are using encrypted passwords, Samba will need to know what +# password database type you are using. + passdb backend = tdbsam guest + + obey pam restrictions = yes + +; guest account = nobody + invalid users = root + +# This boolean parameter controls whether Samba attempts to sync the Unix +# password with the SMB password when the encrypted SMB password in the +# passdb is changed. +; unix password sync = no + +# For Unix password sync to work on a Debian GNU/Linux system, the following +# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for +# sending the correct chat script for the passwd program in Debian Potato). + passwd program = /usr/bin/passwd %u + passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . + +# This boolean controls whether PAM will be used for password changes +# when requested by an SMB client instead of the program listed in +# 'passwd program'. The default is 'no'. +; pam password change = no + + +########## Printing ########## + +# If you want to automatically load your printer list rather +# than setting them up individually then you'll need this +; load printers = yes + +# lpr(ng) printing. You may wish to override the location of the +# printcap file +; printing = bsd +; printcap name = /etc/printcap + +# CUPS printing. See also the cupsaddsmb(8) manpage in the +# cupsys-client package. +; printing = cups +; printcap name = cups + +# When using [print$], root is implicitly a 'printer admin', but you can +# also give this right to other users to add drivers and set printer +# properties +; printer admin = @ntadmin + + +######## File sharing ######## + +# Name mangling options +; preserve case = yes +; short preserve case = yes + + +############ Misc ############ + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /home/samba/etc/smb.conf.%m + +# Most people will find that this option gives better performance. +# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html +# for details +# You may want to add the following on a Linux system: +# SO_RCVBUF=8192 SO_SNDBUF=8192 + socket options = TCP_NODELAY + +# The following parameter is useful only if you have the linpopup package +# installed. The samba maintainer and the linpopup maintainer are +# working to ease installation and configuration of linpopup and samba. +; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & + +# Domain Master specifies Samba to be the Domain Master Browser. If this +# machine will be configured as a BDC (a secondary logon server), you +# must set this to 'no'; otherwise, the default behavior is recommended. +; domain master = auto + +# Some defaults for winbind (make sure you're not using the ranges +# for something else.) +; idmap uid = 10000-20000 +; idmap gid = 10000-20000 +; template shell = /bin/bash + +#======================= Share Definitions ======================= + +[homes] + comment = Home Directories + browseable = no + +# By default, the home directories are exported read-only. Change next +# parameter to 'yes' if you want to be able to write to them. + writable = no + +# File creation mask is set to 0700 for security reasons. If you want to +# create files with group=rw permissions, set next parameter to 0775. + create mask = 0700 + +# Directory creation mask is set to 0700 for security reasons. If you want to +# create dirs. with group=rw permissions, set next parameter to 0775. + directory mask = 0700 + +# Un-comment the following and create the netlogon directory for Domain Logons +# (you need to configure Samba to act as a domain controller too.) +;[netlogon] +; comment = Network Logon Service +; path = /home/samba/netlogon +; guest ok = yes +; writable = no +; share modes = no + +[printers] + comment = All Printers + browseable = no + path = /tmp + printable = yes + public = no + writable = no + create mode = 0700 + +# Windows clients look for this share name as a source of downloadable +# printer drivers +[print$] + comment = Printer Drivers + path = /var/lib/samba/printers + browseable = yes + read only = yes + guest ok = no +# Uncomment to allow remote administration of Windows print drivers. +# Replace 'ntadmin' with the name of the group your admin users are +# members of. +; write list = root, @ntadmin + +# A sample share for sharing your CD-ROM with others. +;[cdrom] +; comment = Samba server's CD-ROM +; writable = no +; locking = no +; path = /cdrom +; public = yes + +# The next two parameters show how to auto-mount a CD-ROM when the +# cdrom share is accesed. For this to work /etc/fstab must contain +# an entry like this: +# +# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 +# +# The CD-ROM gets unmounted automatically after the connection to the +# +# If you don't want to use auto-mounting/unmounting make sure the CD +# is mounted on /cdrom +# +; preexec = /bin/mount /cdrom +; postexec = /bin/umount /cdrom + diff --git a/packaging/Debian/debian-unstable/smbclient.files b/packaging/Debian/debian-unstable/smbclient.files new file mode 100644 index 00000000000..96e8945bf3d --- /dev/null +++ b/packaging/Debian/debian-unstable/smbclient.files @@ -0,0 +1,15 @@ +usr/bin/smbclient +usr/bin/smbtar +usr/bin/rpcclient +usr/bin/smbspool +usr/bin/smbtree +usr/bin/smbcacls +usr/bin/smbcquotas +usr/share/man/man1/smbclient.1 +usr/share/man/man1/smbtar.1 +usr/share/man/man1/rpcclient.1 +usr/share/man/man8/smbspool.8 +usr/share/man/man1/smbcacls.1 +usr/share/man/man1/smbcquotas.1 +usr/share/man/man1/smbtree.1 +usr/lib/cups/backend/smb diff --git a/packaging/Debian/debian-unstable/smbfs.files b/packaging/Debian/debian-unstable/smbfs.files new file mode 100644 index 00000000000..870db7d6453 --- /dev/null +++ b/packaging/Debian/debian-unstable/smbfs.files @@ -0,0 +1,10 @@ +sbin/mount.smbfs +sbin/mount.smb +usr/bin/smbmount +usr/bin/smbumount +usr/bin/smbmnt +usr/share/man/man8/smbmount.8 +usr/share/man/man8/smbumount.8 +usr/share/man/man8/smbmnt.8 +usr/share/man/man8/mount.smb.8 +usr/share/man/man8/mount.smbfs.8 diff --git a/packaging/Debian/debian-unstable/smbwrapper.dirs b/packaging/Debian/debian-unstable/smbwrapper.dirs new file mode 100644 index 00000000000..fd727bddf05 --- /dev/null +++ b/packaging/Debian/debian-unstable/smbwrapper.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/samba diff --git a/packaging/Debian/debian-unstable/smbwrapper.docs b/packaging/Debian/debian-unstable/smbwrapper.docs new file mode 100644 index 00000000000..2924e78734a --- /dev/null +++ b/packaging/Debian/debian-unstable/smbwrapper.docs @@ -0,0 +1,2 @@ +source/smbwrapper/README +source/smbwrapper/PORTING diff --git a/packaging/Debian/debian-unstable/smbwrapper.files b/packaging/Debian/debian-unstable/smbwrapper.files new file mode 100644 index 00000000000..08edbead6e6 --- /dev/null +++ b/packaging/Debian/debian-unstable/smbwrapper.files @@ -0,0 +1 @@ +usr/bin/smbsh diff --git a/packaging/Debian/debian-unstable/swat.config b/packaging/Debian/debian-unstable/swat.config new file mode 100644 index 00000000000..e210fae55ea --- /dev/null +++ b/packaging/Debian/debian-unstable/swat.config @@ -0,0 +1,11 @@ +#/bin/sh -e +# +# + +# Source debconf library. +. /usr/share/debconf/confmodule + +db_title "Samba Web Administration Tool (SWAT)" + +db_input medium swat/smb_conf_warn || true +db_go diff --git a/packaging/Debian/debian-unstable/swat.dirs b/packaging/Debian/debian-unstable/swat.dirs new file mode 100644 index 00000000000..d5df7df4b8e --- /dev/null +++ b/packaging/Debian/debian-unstable/swat.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/samba/swat diff --git a/packaging/Debian/debian-unstable/swat.files b/packaging/Debian/debian-unstable/swat.files new file mode 100644 index 00000000000..82fdf104d35 --- /dev/null +++ b/packaging/Debian/debian-unstable/swat.files @@ -0,0 +1,3 @@ +usr/sbin/swat +usr/share/samba/swat +usr/share/man/man8/swat.8 diff --git a/packaging/Debian/debian-unstable/swat.postinst b/packaging/Debian/debian-unstable/swat.postinst new file mode 100644 index 00000000000..338f8a07c23 --- /dev/null +++ b/packaging/Debian/debian-unstable/swat.postinst @@ -0,0 +1,23 @@ +#!/bin/sh +# +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + *) + echo "$0: Unknown action \"$1\"" + exit 0 + ;; +esac + +# Set up swat, turned off by default. +update-inetd --group OTHER --add \ + '#<off># swat\t\tstream\ttcp\tnowait.400\troot\t/usr/sbin/tcpd\t/usr/sbin/swat' + +#DEBHELPER# diff --git a/packaging/Debian/debian-unstable/swat.postrm b/packaging/Debian/debian-unstable/swat.postrm new file mode 100644 index 00000000000..6bc5873096e --- /dev/null +++ b/packaging/Debian/debian-unstable/swat.postrm @@ -0,0 +1,22 @@ +#!/bin/sh +# +# + +case "$1" in + purge) + update-inetd --remove '/usr/sbin/swat$' + ;; + remove) + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "$0: unknown action \"$1\"" + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 + diff --git a/packaging/Debian/debian/swat.templates b/packaging/Debian/debian-unstable/swat.templates index 3407f7efbc1..3407f7efbc1 100644 --- a/packaging/Debian/debian/swat.templates +++ b/packaging/Debian/debian-unstable/swat.templates diff --git a/packaging/Debian/debian-unstable/winbind.dirs b/packaging/Debian/debian-unstable/winbind.dirs new file mode 100644 index 00000000000..1da8fba83ad --- /dev/null +++ b/packaging/Debian/debian-unstable/winbind.dirs @@ -0,0 +1 @@ +usr/share/lintian/overrides diff --git a/packaging/Debian/debian-unstable/winbind.files b/packaging/Debian/debian-unstable/winbind.files new file mode 100644 index 00000000000..fbb76774d42 --- /dev/null +++ b/packaging/Debian/debian-unstable/winbind.files @@ -0,0 +1,9 @@ +usr/sbin/winbindd +usr/bin/wbinfo +usr/bin/ntlm_auth +usr/share/man/man1/wbinfo.1 +usr/share/man/man1/ntlm_auth.1 +usr/share/man/man8/winbindd.8 +lib/security/pam_winbind.so +lib/libnss_winbind.so.2 +lib/libnss_wins.so.2 diff --git a/packaging/Debian/debian-unstable/winbind.init b/packaging/Debian/debian-unstable/winbind.init new file mode 100644 index 00000000000..2dfdf3b8352 --- /dev/null +++ b/packaging/Debian/debian-unstable/winbind.init @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Start/stops the winbindd daemon. +# +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/winbindd + +# clear conflicting settings from the environment +unset TMPDIR + +# See if the daemon is there +test -x $DAEMON || exit 0 + +case "$1" in + start) + echo -n "Starting the Winbind daemon: winbindd" + + start-stop-daemon --start --quiet --exec $DAEMON + + echo "." + ;; + stop) + echo -n "Stopping the Winbind daemon: winbindd" + + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + + echo "." + ;; + restart|force-reload) + echo -n "Restarting the Winbind daemon: winbindd" + + start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + sleep 2 + start-stop-daemon --start --quiet --exec $DAEMON + + echo "." + ;; + *) + echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 + diff --git a/packaging/Debian/debian-unstable/winbind.lintian b/packaging/Debian/debian-unstable/winbind.lintian new file mode 100644 index 00000000000..fca17d3cca1 --- /dev/null +++ b/packaging/Debian/debian-unstable/winbind.lintian @@ -0,0 +1,6 @@ +winbind: ldconfig-symlink-missing-for-shlib lib/libnss_winbind.so lib/libnss_winbind.so.2 libnss_winbind.so +winbind: ldconfig-symlink-missing-for-shlib lib/libnss_wins.so lib/libnss_wins.so.2 libnss_wins.so +winbind: no-shlibs-control-file lib/libnss_winbind.so.2 +winbind: no-shlibs-control-file lib/libnss_wins.so.2 +winbind: postinst-must-call-ldconfig lib/libnss_wins.so.2 +winbind: postrm-should-call-ldconfig lib/libnss_wins.so.2 diff --git a/packaging/Debian/debian-unstable/winbind.logrotate b/packaging/Debian/debian-unstable/winbind.logrotate new file mode 100644 index 00000000000..e36cd1281c5 --- /dev/null +++ b/packaging/Debian/debian-unstable/winbind.logrotate @@ -0,0 +1,10 @@ +/var/log/samba/log.winbindd { + weekly + missingok + rotate 7 + postrotate + [ -f /var/run/samba/winbindd.pid ] && kill -HUP `cat /var/run/samba/winbindd.pid` + endscript + compress + notifempty +} diff --git a/packaging/Debian/debian-unstable/wins2dns.awk b/packaging/Debian/debian-unstable/wins2dns.awk new file mode 100644 index 00000000000..176868a115d --- /dev/null +++ b/packaging/Debian/debian-unstable/wins2dns.awk @@ -0,0 +1,38 @@ +#!/usr/bin/awk -f +# +# Date: Wed, 26 Aug 1998 10:37:39 -0600 (MDT) +# From: Jason Gunthorpe <jgg@deltatee.com> +# To: samba@packages.debian.org +# Subject: Nifty samba script +# +# Here is a really nifty script I just wrote for samba, it takes the wins +# database in /var/samba/wins and writes out two dns files for it. In this +# way network wide wins clients can get into the dns for use by unix +# machines. +# +# Perhaps this could be included in /usr/doc/examples or somesuch. +# + +BEGIN { + FS="#|\""; +FORWARD="/tmp/wins.hosts" +REVERSE="/tmp/wins.rev" +DOMAIN="ven.ra.rockwell.com" +} +$3 == "00" { + split($4,a," " ); + split(a[2],b,"."); + while (sub(" ","-",$2)); + $2=tolower($2); + if (b[1] == "255") + next; + if (length($2) >= 8) + print $2"\ta\t"a[2] > FORWARD + else + print $2"\t\ta\t"a[2] > FORWARD + print b[4]"."b[3]"\t\tptr\t"$2"."DOMAIN"." > REVERSE +} +END { + system("echo killall -HUP named"); +} + diff --git a/source/Makefile.in b/source/Makefile.in index 639b39ced23..c8d2b959a4d 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -161,17 +161,40 @@ MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) $(CHARSE ###################################################################### TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o + TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o tdb/tdbback.o SMBLDAP_OBJ = @SMBLDAP@ -LIB_OBJ = lib/version.o lib/charcnv.o lib/debug.o lib/fault.o \ +VERSION_OBJ = lib/version.o + +DOSERR_OBJ = libsmb/doserr.o + +SNPRINTF_OBJ = lib/snprintf.o + +WBCOMMON_OBJ = nsswitch/wb_common.o + +DUMMYROOT_OBJ = lib/dummyroot.o + +AFS_OBJ = lib/afs.o + +AFS_SETTOKEN_OBJ = lib/afs_settoken.o + +SERVER_MUTEX_OBJ = lib/server_mutex.o + +ERRORMAP_OBJ = libsmb/errormap.o + +PASSCHANGE_OBJ = libsmb/passchange.o + +RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o + +LIB_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \ lib/getsmbpass.o lib/interface.o lib/md4.o \ lib/interfaces.o lib/pidfile.o lib/replace.o lib/replace1.o \ lib/signal.o lib/system.o lib/sendfile.o lib/time.o \ lib/ufc.o lib/genrand.o lib/username.o \ lib/util_getent.o lib/util_pw.o lib/access.o lib/smbrun.o \ - lib/bitmap.o lib/crc32.o lib/snprintf.o lib/dprintf.o \ + lib/bitmap.o lib/crc32.o $(SNPRINTF_OBJ) lib/dprintf.o \ lib/xfile.o lib/wins_srv.o \ lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \ lib/util_unistr.o lib/util_file.o lib/data_blob.o \ @@ -180,7 +203,7 @@ LIB_OBJ = lib/version.o lib/charcnv.o lib/debug.o lib/fault.o \ lib/ms_fnmatch.o lib/select.o lib/messages.o \ lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \ lib/md5.o lib/hmacmd5.o lib/iconv.o \ - nsswitch/wb_client.o nsswitch/wb_common.o \ + nsswitch/wb_client.o $(WBCOMMON_OBJ) \ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \ lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \ lib/module.o lib/ldap_escape.o @CHARSET_STATIC@ \ @@ -227,19 +250,20 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \ libsmb/clistr.o lib/util_seaccess.o \ libsmb/cliquota.o libsmb/clifsinfo.o \ libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \ - libsmb/clioplock.o libsmb/errormap.o libsmb/clirap2.o \ - libsmb/doserr.o \ + libsmb/clioplock.o $(ERRORMAP_OBJ) libsmb/clirap2.o \ + $(DOSERR_OBJ) \ $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ) LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \ rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \ rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \ - rpc_client/cli_reg.o rpc_client/cli_pipe.o \ + rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \ rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o \ rpc_client/cli_ds.o rpc_client/cli_echo.o \ rpc_client/cli_shutdown.o REGOBJS_OBJ = registry/reg_objects.o + REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \ registry/reg_db.o @@ -259,6 +283,7 @@ RPC_SVC_OBJ = rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o RPC_WKS_OBJ = rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o RPC_DFS_OBJ = rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o + RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o rpc_server/srv_util.o \ @@ -270,8 +295,7 @@ RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ) # this includes only the low level parse code, not stuff # that requires knowledge of security contexts -RPC_PARSE_OBJ1 = rpc_parse/parse_prs.o rpc_parse/parse_sec.o \ - rpc_parse/parse_misc.o +RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \ rpc_parse/parse_reg.o rpc_parse/parse_rpc.o \ @@ -281,8 +305,7 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \ rpc_parse/parse_echo.o rpc_parse/parse_shutdown.o \ $(REGOBJS_OBJ) - -RPC_CLIENT_OBJ = rpc_client/cli_pipe.o +RPC_CLIENT_OBJ = rpc_client/cli_pipe.o LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o smbd/tdbutil.o @@ -313,6 +336,7 @@ NOTIFY_OBJ = smbd/notify.o smbd/notify_hash.o smbd/notify_kernel.o VFS_AUDIT_OBJ = modules/vfs_audit.o VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o +VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o VFS_RECYCLE_OBJ = modules/vfs_recycle.o VFS_NETATALK_OBJ = modules/vfs_netatalk.o @@ -321,6 +345,7 @@ VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o VFS_CAP_OBJ = modules/vfs_cap.o VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o +VFS_AFSACL_OBJ = modules/vfs_afsacl.o PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o @@ -355,13 +380,13 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \ smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \ smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \ smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \ - smbd/posix_acls.o lib/sysacls.o lib/server_mutex.o \ + smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \ smbd/process.o smbd/service.o smbd/error.o \ printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \ lib/sysquotas_xfs.o lib/sysquotas_4A.o \ smbd/change_trust_pw.o smbd/fake_file.o \ - smbd/quotas.o smbd/ntquotas.o lib/afs.o smbd/msdfs.o \ - lib/afs_settoken.o \ + smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \ + $(AFS_SETTOKEN_OBJ) \ $(MANGLE_OBJ) @VFS_STATIC@ SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \ @@ -378,8 +403,9 @@ PRINTING_OBJ = printing/pcap.o printing/print_svid.o \ printing/print_cups.o printing/print_generic.o \ printing/lpq_parse.o printing/load.o -PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o printing/notify.o \ - printing/printing_db.o +PRINTBASE_OBJ = printing/notify.o printing/printing_db.o + +PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ) SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN) NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ @@ -412,20 +438,20 @@ SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \ $(LOCKING_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(KRBCLIENT_OBJ) \ $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) \ - libsmb/passchange.o lib/dummyroot.o + $(PASSCHANGE_OBJ) $(DUMMYROOT_OBJ) SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \ $(PARAM_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \ $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ - $(SECRETS_OBJ) $(LIBSAMBA_OBJ) lib/dummyroot.o libsmb/errormap.o + $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(DUMMYROOT_OBJ) $(ERRORMAP_OBJ) SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \ $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ $(SECRETS_OBJ) $(LIBSAMBA_OBJ) \ - printing/notify.o printing/printing_db.o lib/dummyroot.o libsmb/errormap.o + $(PRINTBASE_OBJ) $(DUMMYROOT_OBJ) $(ERRORMAP_OBJ) SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \ $(UBIQX_OBJ) $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \ @@ -438,14 +464,14 @@ TESTPARM_OBJ = utils/testparm.o \ TESTPRNS_OBJ = utils/testprns.o $(PARAM_OBJ) $(PRINTING_OBJ) $(UBIQX_OBJ) \ $(LIB_NONSMBD_OBJ) -SMBPASSWD_OBJ = utils/smbpasswd.o libsmb/passchange.o $(PARAM_OBJ) $(SECRETS_OBJ) \ +SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSCHANGE_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \ $(LIBSMB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ)\ $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ - $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) lib/dummyroot.o + $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) $(DUMMYROOT_OBJ) PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \ $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \ - $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o + $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(DUMMYROOT_OBJ) SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ) $(SECRETS_OBJ) @@ -461,7 +487,7 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \ $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \ $(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \ - $(SMBLDAP_OBJ) $(DCUTIL_OBJ) lib/dummyroot.o + $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(DUMMYROOT_OBJ) PAM_WINBIND_PICOBJ = nsswitch/pam_winbind.@PICSUFFIX@ \ nsswitch/wb_common.@PICSUFFIX@ lib/replace1.@PICSUFFIX@ \ @@ -493,7 +519,7 @@ LIBBIGBALLOFMUD_MAJOR = 0 LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(UBIQX_OBJ) $(SECRETS_OBJ) \ $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \ - $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o + $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(DUMMYROOT_OBJ) LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.@PICSUFFIX@) @@ -514,8 +540,8 @@ NET_OBJ = $(NET_OBJ1) $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \ $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) \ $(LIBMSRPC_OBJ) $(IDMAP_OBJ) \ $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \ - $(SMBLDAP_OBJ) $(DCUTIL_OBJ) lib/dummyroot.o lib/server_mutex.o \ - lib/afs.o lib/afs_settoken.o + $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(DUMMYROOT_OBJ) $(SERVER_MUTEX_OBJ) \ + $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ) @@ -523,7 +549,7 @@ CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ MOUNT_OBJ = client/smbmount.o \ $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) -MNT_OBJ = client/smbmnt.o lib/version.o lib/snprintf.o +MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(SNPRINTF_OBJ) UMOUNT_OBJ = client/smbumount.o @@ -543,7 +569,7 @@ MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \ - $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) lib/dummyroot.o + $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(DUMMYROOT_OBJ) NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) @@ -555,7 +581,7 @@ SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(UBIQX_OBJ) $ LOG2PCAP_OBJ = utils/log2pcaphex.o LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \ - $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) lib/dummyroot.o + $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(DUMMYROOT_OBJ) SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \ @@ -587,7 +613,7 @@ SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ PROTO_OBJ = $(SMBD_OBJ_MAIN) \ $(SMBD_OBJ_SRV) $(NMBD_OBJ1) $(SWAT_OBJ1) $(LIB_OBJ) $(LIBSMB_OBJ) \ $(SMBW_OBJ1) $(SMBWRAPPER_OBJ1) $(SMBTORTURE_OBJ1) $(RPCCLIENT_OBJ1) \ - $(LIBMSRPC_OBJ) $(RPC_CLIENT_OBJ) \ + $(LIBMSRPC_OBJ) \ $(RPC_PIPE_OBJ) $(RPC_PARSE_OBJ) $(KRBCLIENT_OBJ) \ $(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \ $(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \ @@ -596,7 +622,7 @@ PROTO_OBJ = $(SMBD_OBJ_MAIN) \ $(LIB_SMBD_OBJ) $(AUTH_SAM_OBJ) $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \ $(RPC_LSA_OBJ) $(RPC_NETLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) \ $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \ - $(RPC_ECHO_OBJ) $(SMBLDAP_OBJ) $(IDMAP_OBJ) libsmb/spnego.o libsmb/passchange.o + $(RPC_ECHO_OBJ) $(SMBLDAP_OBJ) $(IDMAP_OBJ) libsmb/spnego.o $(PASSCHANGE_OBJ) WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) \ $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) @@ -608,7 +634,7 @@ LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.@PICSUFFIX@) PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \ - lib/dummyroot.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ + $(DUMMYROOT_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ $(SECRETS_OBJ) $(UBIQX_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.@PICSUFFIX@) @@ -638,29 +664,30 @@ WINBINDD_OBJ = \ $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \ $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \ $(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \ - $(DCUTIL_OBJ) $(IDMAP_OBJ) lib/dummyroot.o \ - lib/afs.o lib/afs_settoken.o + $(DCUTIL_OBJ) $(IDMAP_OBJ) $(DUMMYROOT_OBJ) \ + $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ - $(UBIQX_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) lib/afs_settoken.o + $(UBIQX_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) -WINBIND_NSS_OBJ = nsswitch/wb_common.o lib/replace1.o @WINBIND_NSS_EXTRA_OBJS@ +WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) lib/replace1.o @WINBIND_NSS_EXTRA_OBJS@ WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.@PICSUFFIX@) lib/snprintf.@PICSUFFIX@ POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o -TDBBACKUP_OBJ = tdb/tdbbackup.o tdb/tdbback.o lib/snprintf.o $(TDBBASE_OBJ) +TDBBACKUP_OBJ = tdb/tdbbackup.o tdb/tdbback.o $(SNPRINTF_OBJ) $(TDBBASE_OBJ) TDBDUMP_OBJ = tdb/tdbdump.o $(TDBBASE_OBJ) NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o + NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \ libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \ - libads/kerberos_verify.o $(SECRETS_OBJ) lib/server_mutex.o \ - libads/authdata.o rpc_parse/parse_prs.o rpc_parse/parse_misc.o \ - libsmb/doserr.o + libads/kerberos_verify.o $(SECRETS_OBJ) $(SERVER_MUTEX_OBJ) \ + libads/authdata.o $(RPC_PARSE_OBJ0) \ + $(DOSERR_OBJ) ###################################################################### # now the rules... @@ -1146,6 +1173,11 @@ bin/extd_audit.@SHLIBEXT@: $(VFS_EXTD_AUDIT_OBJ:.o=.@PICSUFFIX@) @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ:.o=.@PICSUFFIX@) \ @SONAMEFLAG@`basename $@` +bin/full_audit.@SHLIBEXT@: $(VFS_FULL_AUDIT_OBJ:.o=.@PICSUFFIX@) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FULL_AUDIT_OBJ:.o=.@PICSUFFIX@) \ + @SONAMEFLAG@`basename $@` + bin/recycle.@SHLIBEXT@: $(VFS_RECYCLE_OBJ:.o=.@PICSUFFIX@) @echo "Building plugin $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ:.o=.@PICSUFFIX@) \ @@ -1186,6 +1218,11 @@ bin/expand_msdfs.@SHLIBEXT@: $(VFS_EXPAND_MSDFS_OBJ:.o=.@PICSUFFIX@) @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXPAND_MSDFS_OBJ:.o=.@PICSUFFIX@) \ @SONAMEFLAG@`basename $@` +bin/afsacl.@SHLIBEXT@: $(VFS_AFSACL_OBJ:.o=.po) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AFSACL_OBJ:.o=.po) \ + @SONAMEFLAG@`basename $@` + bin/wbinfo@EXEEXT@: $(WBINFO_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ @$(LINK) -o $@ $(WBINFO_OBJ) $(LIBS) @POPTLIBS@ @@ -1288,7 +1325,7 @@ installclientlib: installdirs libsmbclient PYTHON_OBJS = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \ $(UBIQX_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ - $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) lib/dummyroot.o + $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(DUMMYROOT_OBJ) PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.@PICSUFFIX@) diff --git a/source/VERSION b/source/VERSION index 87e9d571d6b..e493805fdb4 100644 --- a/source/VERSION +++ b/source/VERSION @@ -19,19 +19,7 @@ ######################################################## SAMBA_VERSION_MAJOR=3 SAMBA_VERSION_MINOR=0 -SAMBA_VERSION_RELEASE=4 - -######################################################## -# If a official release has a serious bug # -# a security release will have 'a' sufffix # -# # -# so SAMBA's version will be # -# <MAJOR>.<MINOR>.<RELEASE><REVISION> # -# # -# e.g. SAMBA_VERSION_PRE_RELEASE=a # -# -> "2.2.8a" # -######################################################## -SAMBA_VERSION_REVISION= +SAMBA_VERSION_RELEASE=5 ######################################################## # For 'pre' releases the version will be # @@ -41,7 +29,7 @@ SAMBA_VERSION_REVISION= # e.g. SAMBA_VERSION_PRE_RELEASE=1 # # -> "2.2.9pre1" # ######################################################## -SAMBA_VERSION_PRE_RELEASE= +SAMBA_VERSION_PRE_RELEASE=1 ######################################################## # For 'rc' releases the version will be # @@ -63,7 +51,7 @@ SAMBA_VERSION_RC_RELEASE= # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes # # -> "3.0.0-SVN-build-199" # ######################################################## -SAMBA_VERSION_IS_SVN_SNAPSHOT=no +SAMBA_VERSION_IS_SVN_SNAPSHOT= ######################################################## # This can be set by vendors if they want... # diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c index e6ed83a79af..9a03e7fe13c 100644 --- a/source/auth/auth_util.c +++ b/source/auth/auth_util.c @@ -1236,6 +1236,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, info3->gids[i].g_rid)); SAFE_FREE(lgroupSIDs); + SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; @@ -1264,6 +1265,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, if ( !NT_STATUS_IS_OK(nt_status) ) { DEBUG(4,("create_nt_user_token failed\n")); + SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); free_server_info(server_info); return nt_status; @@ -1271,6 +1273,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, (*server_info)->ptok = token; + SAFE_FREE(lgroupSIDs); SAFE_FREE(all_group_SIDs); /* ensure we are never given NULL session keys */ diff --git a/source/auth/auth_winbind.c b/source/auth/auth_winbind.c index 0e2820313e3..4260a0e80b4 100644 --- a/source/auth/auth_winbind.c +++ b/source/auth/auth_winbind.c @@ -127,9 +127,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, if (result == NSS_STATUS_SUCCESS && response.extra_data) { if (NT_STATUS_IS_OK(nt_status)) { - - if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) - { + if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str, user_info->smb_name.str, user_info->domain.str, @@ -141,6 +139,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, nt_status = NT_STATUS_NO_LOGON_SERVERS; } + SAFE_FREE(response.extra_data); return nt_status; } diff --git a/source/client/client.c b/source/client/client.c index f2f43656cbb..a0470315f82 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -1650,7 +1650,6 @@ static int cmd_symlink(void) return 1; } - pstrcpy(oldname,cur_dir); pstrcpy(newname,cur_dir); if (!next_token_nr(NULL,buf,NULL,sizeof(buf)) || @@ -1659,7 +1658,7 @@ static int cmd_symlink(void) return 1; } - pstrcat(oldname,buf); + pstrcpy(oldname,buf); pstrcat(newname,buf2); if (!cli_unix_symlink(cli, oldname, newname)) { diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index ad202d1da10..5670a147468 100755 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -38,7 +38,7 @@ #include <fcntl.h> #define MOUNT_CIFS_VERSION_MAJOR "1" -#define MOUNT_CIFS_VERSION_MINOR "2" +#define MOUNT_CIFS_VERSION_MINOR "3" #ifndef MOUNT_CIFS_VENDOR_SUFFIX #define MOUNT_CIFS_VENDOR_SUFFIX "" @@ -285,32 +285,45 @@ static int parse_options(char * options, int * filesys_flags) if (strncmp(data, "user", 4) == 0) { if (!value || !*value) { - printf("invalid or missing username\n"); - return 1; /* needs_arg; */ - } - if (strnlen(value, 260) < 260) { - got_user=1; - percent_char = strchr(value,'%'); - if(percent_char) { - *percent_char = ','; - if(mountpassword == NULL) - mountpassword = calloc(65,1); - if(mountpassword) { - if(got_password) - printf("\nmount.cifs warning - password specified twice\n"); - got_password = 1; - percent_char++; - strncpy(mountpassword, percent_char,64); - /* remove password from username */ - while(*percent_char != 0) { - *percent_char = ','; + if(data[4] == '\0') { + if(verboseflag) + printf("\nskipping empty user mount parameter\n"); + /* remove the parm since it would otherwise be confusing + to the kernel code which would think it was a real username */ + data[0] = ','; + data[1] = ','; + data[2] = ','; + data[3] = ','; + /* BB remove it from mount line so as not to confuse kernel code */ + } else { + printf("username specified with no parameter\n"); + return 1; /* needs_arg; */ + } + } else { + if (strnlen(value, 260) < 260) { + got_user=1; + percent_char = strchr(value,'%'); + if(percent_char) { + *percent_char = ','; + if(mountpassword == NULL) + mountpassword = calloc(65,1); + if(mountpassword) { + if(got_password) + printf("\nmount.cifs warning - password specified twice\n"); + got_password = 1; percent_char++; + strncpy(mountpassword, percent_char,64); + /* remove password from username */ + while(*percent_char != 0) { + *percent_char = ','; + percent_char++; + } } } + } else { + printf("username too long\n"); + return 1; } - } else { - printf("username too long\n"); - return 1; } } else if (strncmp(data, "pass", 4) == 0) { if (!value || !*value) { @@ -634,7 +647,7 @@ int main(int argc, char ** argv) /* add sharename in opts string as unc= parm */ - while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsU:vVwt:", + while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsSU:vVwt:", longopts, NULL)) != -1) { switch (c) { /* No code to do the following options yet */ @@ -712,6 +725,9 @@ int main(int argc, char ** argv) strncpy(mountpassword,optarg,64); } break; + case 'S': + get_password_from_file(0 /* stdin */,NULL); + break; case 't': break; default: diff --git a/source/configure.in b/source/configure.in index bf8aa771b5c..e1fc69b4b79 100644 --- a/source/configure.in +++ b/source/configure.in @@ -8,6 +8,9 @@ AC_CONFIG_HEADER(include/config.h) AC_DISABLE_STATIC AC_ENABLE_SHARED +SMB_VERSION_STRING=`cat include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2` +echo "SAMBA VERSION: ${SMB_VERSION_STRING}" + ################################################# # Directory handling stuff to support both the # legacy SAMBA directories and FHS compliant @@ -360,7 +363,7 @@ dnl These have to be built static: default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_reg rpc_lsa_ds rpc_wks rpc_net rpc_dfs rpc_srv rpc_spoolss auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin" dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437" +default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437" if test "x$developer" = xyes; then default_static_modules="$default_static_modules rpc_echo" @@ -2277,7 +2280,21 @@ if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES,1,[Whether the nisplus include files are broken]) fi +AC_CACHE_CHECK([if the realpath function allows a NULL argument],samba_cv_REALPATH_TAKES_NULL,[ +AC_TRY_RUN([ +#include <stdio.h> +#include <limits.h> +main() { + char *newpath = realpath("/tmp", NULL); + exit ((newpath != NULL) ? 0 : 1); +} +], +samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)]) +if test x"$samba_cv_REALPATH_TAKES_NULL" = x"yes"; then + AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL]) +fi +A ################################################# # check for smbwrapper support AC_MSG_CHECKING(whether to use smbwrapper) @@ -2377,13 +2394,31 @@ if test x"$samba_cv_WITH_AFS" != x"no" || fi fi -if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then - AC_CHECK_LIB( crypto, DES_pcbc_encrypt, LIBS="$LIBS -lcrypto" ) -fi - if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" == x"yes"; then AC_DEFINE(WITH_FAKE_KASERVER,1,[Whether to include AFS fake-kaserver support]) fi + +################################################# +# check whether to compile AFS/NT ACL mapping module +samba_cv_WITH_VFS_AFSACL=no +AC_MSG_CHECKING(whether to use AFS fake-kaserver) +AC_ARG_WITH(vfs-afsacl, +[ --with-vfs-afsacl Include AFS to NT ACL mapping module (default=no) ], +[ case "$withval" in + yes|auto) + AC_MSG_RESULT($withval) + samba_cv_WITH_VFS_AFSACL=yes + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + +if test x"$samba_cv_WITH_VFS_AFSACL" == x"yes"; then + default_shared_modules="$default_shared_modules vfs_afsacl" +fi if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then AC_DEFINE(WITH_AFS,1,[Whether to include AFS clear-text auth support]) @@ -3152,7 +3187,7 @@ AC_ARG_WITH(sys-quotas, AC_MSG_RESULT(${samba_cv_TRY_SYS_QUOTAS}) ) -if test x"$samba_cv_TRY_SYS_QUOTAS" = x"auto"; then +if test x"$samba_cv_TRY_SYS_QUOTAS" != x"no"; then AC_MSG_CHECKING(whether to try the lib/sysquotas.c interface on ${host_os}) case "$host_os" in *linux*) @@ -4329,6 +4364,7 @@ SMB_SUBSYSTEM(AUTH,auth/auth.o) SMB_MODULE(vfs_recycle, \$(VFS_RECYCLE_OBJ), "bin/recycle.$SHLIBEXT", VFS) SMB_MODULE(vfs_audit, \$(VFS_AUDIT_OBJ), "bin/audit.$SHLIBEXT", VFS) SMB_MODULE(vfs_extd_audit, \$(VFS_EXTD_AUDIT_OBJ), "bin/extd_audit.$SHLIBEXT", VFS) +SMB_MODULE(vfs_full_audit, \$(VFS_FULL_AUDIT_OBJ), "bin/full_audit.$SHLIBEXT", VFS) SMB_MODULE(vfs_netatalk, \$(VFS_NETATALK_OBJ), "bin/netatalk.$SHLIBEXT", VFS) SMB_MODULE(vfs_fake_perms, \$(VFS_FAKE_PERMS_OBJ), "bin/fake_perms.$SHLIBEXT", VFS) SMB_MODULE(vfs_default_quota, \$(VFS_DEFAULT_QUOTA_OBJ), "bin/default_quota.$SHLIBEXT", VFS) @@ -4336,6 +4372,7 @@ SMB_MODULE(vfs_readonly, \$(VFS_READONLY_OBJ), "bin/readonly.$SHLIBEXT", VFS) SMB_MODULE(vfs_cap, \$(VFS_CAP_OBJ), "bin/cap.$SHLIBEXT", VFS) SMB_MODULE(vfs_expand_msdfs, \$(VFS_EXPAND_MSDFS_OBJ), "bin/expand_msdfs.$SHLIBEXT", VFS) SMB_MODULE(vfs_shadow_copy, \$(VFS_SHADOW_COPY_OBJ), "bin/shadow_copy.$SHLIBEXT", VFS) +SMB_MODULE(vfs_afsacl, \$(VFS_AFSACL_OBJ), "bin/afsacl.$SHLIBEXT", VFS) SMB_SUBSYSTEM(VFS,smbd/vfs.o) AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules]) diff --git a/source/include/libsmbclient.h b/source/include/libsmbclient.h index 68c4a053d1b..aaa19cb191b 100644 --- a/source/include/libsmbclient.h +++ b/source/include/libsmbclient.h @@ -471,7 +471,13 @@ struct _SMBCCTX { * * @note Do not forget to smbc_init_context() the returned SMBCCTX pointer ! */ +#ifdef __cplusplus +extern "C" { +#endif SMBCCTX * smbc_new_context(void); +#ifdef __cplusplus +} +#endif /**@ingroup misc * Delete a SBMCCTX (a context) acquired from smbc_new_context(). @@ -494,8 +500,13 @@ SMBCCTX * smbc_new_context(void); * just before exit()'ing. When shutdown_ctx is 0, this function can be * use in periodical cleanup functions for example. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_free_context(SMBCCTX * context, int shutdown_ctx); - +#ifdef __cplusplus +} +#endif /**@ingroup misc * Initialize a SBMCCTX (a context). @@ -515,8 +526,13 @@ int smbc_free_context(SMBCCTX * context, int shutdown_ctx); * but it might leak memory on smbc_context_init() failure. Avoid this. * You'll have to call smbc_free_context() yourself on failure. */ - +#ifdef __cplusplus +extern "C" { +#endif SMBCCTX * smbc_init_context(SMBCCTX * context); +#ifdef __cplusplus +} +#endif /**@ingroup misc * Initialize the samba client library. @@ -536,7 +552,13 @@ SMBCCTX * smbc_init_context(SMBCCTX * context); * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_init(smbc_get_auth_data_fn fn, int debug); +#ifdef __cplusplus +} +#endif /**@ingroup misc * Set or retrieve the compatibility library's context pointer @@ -560,7 +582,13 @@ int smbc_init(smbc_get_auth_data_fn fn, int debug); * authentication functions have been freed, if necessary. */ +#ifdef __cplusplus +extern "C" { +#endif SMBCCTX * smbc_set_context(SMBCCTX * new_context); +#ifdef __cplusplus +} +#endif /**@ingroup file * Open a file on an SMB server. @@ -613,8 +641,13 @@ SMBCCTX * smbc_set_context(SMBCCTX * new_context); * try again with an empty username and password. This * often gets mapped to the guest account on some machines. */ - +#ifdef __cplusplus +extern "C" { +#endif int smbc_open(const char *furl, int flags, mode_t mode); +#ifdef __cplusplus +} +#endif /**@ingroup file * Create a file on an SMB server. @@ -647,8 +680,13 @@ int smbc_open(const char *furl, int flags, mode_t mode); * @see smbc_open() * */ - +#ifdef __cplusplus +extern "C" { +#endif int smbc_creat(const char *furl, mode_t mode); +#ifdef __cplusplus +} +#endif /**@ingroup file * Read from a file using an opened file handle. @@ -670,8 +708,13 @@ int smbc_creat(const char *furl, mode_t mode); * @see smbc_open(), smbc_write() * */ +#ifdef __cplusplus +extern "C" { +#endif ssize_t smbc_read(int fd, void *buf, size_t bufsize); - +#ifdef __cplusplus +} +#endif /**@ingroup file * Write to a file using an opened file handle. @@ -693,8 +736,13 @@ ssize_t smbc_read(int fd, void *buf, size_t bufsize); * @see smbc_open(), smbc_read() * */ +#ifdef __cplusplus +extern "C" { +#endif ssize_t smbc_write(int fd, void *buf, size_t bufsize); - +#ifdef __cplusplus +} +#endif /**@ingroup file * Seek to a specific location in a file. @@ -724,8 +772,13 @@ ssize_t smbc_write(int fd, void *buf, size_t bufsize); * * @todo Are errno values complete and correct? */ +#ifdef __cplusplus +extern "C" { +#endif off_t smbc_lseek(int fd, off_t offset, int whence); - +#ifdef __cplusplus +} +#endif /**@ingroup file * Close an open file handle. @@ -738,8 +791,13 @@ off_t smbc_lseek(int fd, off_t offset, int whence); * * @see smbc_open(), smbc_creat() */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_close(int fd); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Unlink (delete) a file or directory. @@ -762,8 +820,13 @@ int smbc_close(int fd); * * @todo Are errno values complete and correct? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_unlink(const char *furl); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Rename or move a file or directory. @@ -805,8 +868,13 @@ int smbc_unlink(const char *furl); * share? I say no... NOTE. I agree for the moment. * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_rename(const char *ourl, const char *nurl); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Open a directory used to obtain directory entries. @@ -828,8 +896,13 @@ int smbc_rename(const char *ourl, const char *nurl); * @see smbc_getdents(), smbc_readdir(), smbc_closedir() * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_opendir(const char *durl); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Close a directory handle opened by smbc_opendir(). @@ -841,8 +914,13 @@ int smbc_opendir(const char *durl); * * @see smbc_opendir() */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_closedir(int dh); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Get multiple directory entries. @@ -870,8 +948,13 @@ int smbc_closedir(int dh); * * @todo Add example code so people know how to parse buffers. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_getdents(unsigned int dh, struct smbc_dirent *dirp, int count); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Get a single directory entry. @@ -885,8 +968,13 @@ int smbc_getdents(unsigned int dh, struct smbc_dirent *dirp, int count); * * @see smbc_dirent, smbc_getdents(), smbc_open() */ +#ifdef __cplusplus +extern "C" { +#endif struct smbc_dirent* smbc_readdir(unsigned int dh); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Get the current directory offset. @@ -908,8 +996,13 @@ struct smbc_dirent* smbc_readdir(unsigned int dh); * @see smbc_readdir() * */ +#ifdef __cplusplus +extern "C" { +#endif off_t smbc_telldir(int dh); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * lseek on directories. @@ -933,7 +1026,13 @@ off_t smbc_telldir(int dh); * * @todo In what does the reture and errno values mean? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_lseekdir(int fd, off_t offset); +#ifdef __cplusplus +} +#endif /**@ingroup directory * Create a directory. @@ -956,8 +1055,13 @@ int smbc_lseekdir(int fd, off_t offset); * @see smbc_rmdir() * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_mkdir(const char *durl, mode_t mode); - +#ifdef __cplusplus +} +#endif /**@ingroup directory * Remove a directory. @@ -977,8 +1081,13 @@ int smbc_mkdir(const char *durl, mode_t mode); * * @todo Are errno values complete and correct? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_rmdir(const char *durl); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Get information about a file or directory. @@ -999,8 +1108,13 @@ int smbc_rmdir(const char *durl); * @see Unix stat() * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_stat(const char *url, struct stat *st); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Get file information via an file descriptor. @@ -1020,8 +1134,13 @@ int smbc_stat(const char *url, struct stat *st); * @see smbc_stat(), Unix stat() * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_fstat(int fd, struct stat *st); - +#ifdef __cplusplus +} +#endif /**@ingroup attribue * Change the ownership of a file or directory. @@ -1046,8 +1165,13 @@ int smbc_fstat(int fd, struct stat *st); * @todo How do we abstract owner and group uid and gid? * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_chown(const char *url, uid_t owner, gid_t group); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Change the permissions of a file. @@ -1069,7 +1193,13 @@ int smbc_chown(const char *url, uid_t owner, gid_t group); * * @todo Are errno values complete and correct? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_chmod(const char *url, mode_t mode); +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Change the last modification time on a file @@ -1086,7 +1216,13 @@ int smbc_chmod(const char *url, mode_t mode); * - EPERM Permission was denied. * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_utimes(const char *url, struct timeval *tbuf); +#ifdef __cplusplus +} +#endif #ifdef HAVE_UTIME_H /**@ingroup attribute @@ -1105,7 +1241,13 @@ int smbc_utimes(const char *url, struct timeval *tbuf); * - EPERM Permission was denied. * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_utime(const char *fname, struct utimbuf *utbuf); +#ifdef __cplusplus +} +#endif #endif /**@ingroup attribute @@ -1207,12 +1349,17 @@ int smbc_utime(const char *fname, struct utimbuf *utbuf); * sYsTeM.nt_sEc_desc.owNER * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_setxattr(const char *url, const char *name, const void *value, size_t size, int flags); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Set extended attributes for a file. This is used for modifying a file's @@ -1317,12 +1464,17 @@ int smbc_setxattr(const char *url, * sYsTeM.nt_sEc_desc.owNER * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_lsetxattr(const char *url, const char *name, const void *value, size_t size, int flags); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Set extended attributes for a file. This is used for modifying a file's @@ -1424,12 +1576,17 @@ int smbc_lsetxattr(const char *url, * sYsTeM.nt_sEc_desc.owNER * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Get extended attributes for a file. @@ -1487,11 +1644,16 @@ int smbc_fsetxattr(int fd, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_getxattr(const char *url, const char *name, const void *value, size_t size); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Get extended attributes for a file. The POSIX function which this maps to @@ -1552,11 +1714,16 @@ int smbc_getxattr(const char *url, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_lgetxattr(const char *url, const char *name, const void *value, size_t size); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Get extended attributes for a file. @@ -1615,11 +1782,16 @@ int smbc_lgetxattr(const char *url, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_fgetxattr(int fd, const char *name, const void *value, size_t size); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Remove extended attributes for a file. This is used for modifying a file's @@ -1664,9 +1836,14 @@ int smbc_fgetxattr(int fd, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_removexattr(const char *url, const char *name); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Remove extended attributes for a file. This is used for modifying a file's @@ -1714,9 +1891,14 @@ int smbc_removexattr(const char *url, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_lremovexattr(const char *url, const char *name); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * Remove extended attributes for a file. This is used for modifying a file's @@ -1762,9 +1944,14 @@ int smbc_lremovexattr(const char *url, * extended attributes * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_fremovexattr(int fd, const char *name); - +#ifdef __cplusplus +} +#endif /**@ingroup attribute * List the supported extended attribute names associated with a file @@ -1796,9 +1983,15 @@ int smbc_fremovexattr(int fd, * extended attributes at all. Whether this is a feature or * a bug is yet to be decided. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_listxattr(const char *url, char *list, size_t size); +#ifdef __cplusplus +} +#endif /**@ingroup attribute * List the supported extended attribute names associated with a file The @@ -1834,9 +2027,15 @@ int smbc_listxattr(const char *url, * extended attributes at all. Whether this is a feature or * a bug is yet to be decided. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_llistxattr(const char *url, char *list, size_t size); +#ifdef __cplusplus +} +#endif /**@ingroup attribute * List the supported extended attribute names associated with a file @@ -1869,9 +2068,15 @@ int smbc_llistxattr(const char *url, * extended attributes at all. Whether this is a feature or * a bug is yet to be decided. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_flistxattr(int fd, char *list, size_t size); +#ifdef __cplusplus +} +#endif /**@ingroup print * Print a file given the name in fname. It would be a URL ... @@ -1888,7 +2093,13 @@ int smbc_flistxattr(int fd, * and errors returned by smbc_open * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_print_file(const char *fname, const char *printq); +#ifdef __cplusplus +} +#endif /**@ingroup print * Open a print file that can be written to by other calls. This simply @@ -1903,7 +2114,13 @@ int smbc_print_file(const char *fname, const char *printq); * - all errors returned by smbc_open * */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_open_print_job(const char *fname); +#ifdef __cplusplus +} +#endif /**@ingroup print * List the print jobs on a print share, for the moment, pass a callback @@ -1916,7 +2133,13 @@ int smbc_open_print_job(const char *fname); * - EINVAL fname was NULL or smbc_init not called * - EACCES ??? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_list_print_jobs(const char *purl, smbc_list_print_job_fn fn); +#ifdef __cplusplus +} +#endif /**@ingroup print * Delete a print job @@ -1930,7 +2153,13 @@ int smbc_list_print_jobs(const char *purl, smbc_list_print_job_fn fn); * * @todo what errno values are possible here? */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_unlink_print_job(const char *purl, int id); +#ifdef __cplusplus +} +#endif /**@ingroup callback * Remove a server from the cached server list it's unused. @@ -1942,6 +2171,12 @@ int smbc_unlink_print_job(const char *purl, int id); * @return On success, 0 is returned. 1 is returned if the server could not * be removed. Also useable outside libsmbclient. */ +#ifdef __cplusplus +extern "C" { +#endif int smbc_remove_unused_server(SMBCCTX * context, SMBCSRV * srv); +#ifdef __cplusplus +} +#endif #endif /* SMBCLIENT_H_INCLUDED */ diff --git a/source/include/mangle.h b/source/include/mangle.h index 769278d828b..1d7cdf73628 100644 --- a/source/include/mangle.h +++ b/source/include/mangle.h @@ -9,6 +9,6 @@ struct mangle_fns { BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards); void (*reset)(void); BOOL (*check_cache)(char *s); - void (*name_map)(char *OutName, BOOL need83, BOOL cache83); + void (*name_map)(char *OutName, BOOL need83, BOOL cache83, int default_case); }; #endif /* _MANGLE_H_ */ diff --git a/source/include/messages.h b/source/include/messages.h index 37e9372cdaa..78f19fa0bdb 100644 --- a/source/include/messages.h +++ b/source/include/messages.h @@ -49,9 +49,10 @@ /* printing messages */ /* #define MSG_PRINTER_NOTIFY 2001*/ /* Obsolete */ -#define MSG_PRINTER_DRVUPGRADE 2002 -#define MSG_PRINTER_NOTIFY2 2003 +#define MSG_PRINTER_DRVUPGRADE 2002 +#define MSG_PRINTER_NOTIFY2 2003 #define MSG_PRINTERDATA_INIT_RESET 2004 +#define MSG_PRINTER_UPDATE 2005 /* smbd messages */ #define MSG_SMB_CONF_UPDATED 3001 diff --git a/source/include/rpc_dce.h b/source/include/rpc_dce.h index 8266fc861f1..0df903109db 100644 --- a/source/include/rpc_dce.h +++ b/source/include/rpc_dce.h @@ -63,7 +63,9 @@ enum RPC_PKT_TYPE #define NETSEC_AUTH_TYPE 0x44 #define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 } #define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 } -#define RPC_AUTH_NETSEC_CHK_LEN 0x20 + +#define RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN 0x20 +#define RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN 0x18 /* The 7 here seems to be required to get Win2k not to downgrade us to NT4. Actually, anything other than 1ff would seem to do... */ diff --git a/source/include/smb.h b/source/include/smb.h index 30eb82ddf56..54a69d1433a 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -503,6 +503,11 @@ typedef struct connection_struct time_t lastused; BOOL used; int num_files_open; + + BOOL case_sensitive; + BOOL case_preserve; + BOOL short_case_preserve; + name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */ name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */ name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */ diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index e847714443a..bcbaa64f863 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -122,9 +122,9 @@ #define MAP_HIDDEN(conn) ((conn) && lp_map_hidden((conn)->service)) #define MAP_SYSTEM(conn) ((conn) && lp_map_system((conn)->service)) #define MAP_ARCHIVE(conn) ((conn) && lp_map_archive((conn)->service)) -#define IS_HIDDEN_PATH(conn,path) ((conn) && is_in_path((path),(conn)->hide_list)) -#define IS_VETO_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_list)) -#define IS_VETO_OPLOCK_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_oplock_list)) +#define IS_HIDDEN_PATH(conn,path) ((conn) && is_in_path((path),(conn)->hide_list,(conn)->case_sensitive)) +#define IS_VETO_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_list,(conn)->case_sensitive)) +#define IS_VETO_OPLOCK_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_oplock_list,(conn)->case_sensitive)) /* * Used by the stat cache code to check if a returned diff --git a/source/lib/debug.c b/source/lib/debug.c index b0d8ff35230..f9c8b0c46ab 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -163,7 +163,7 @@ static const char *default_classname_table[] = { "vfs", /* DBGC_VFS */ "idmap", /* DBGC_IDMAP */ "quota", /* DBGC_QUOTA */ - "acls", /* DBGC_QUOTA */ + "acls", /* DBGC_ACLS */ NULL }; diff --git a/source/lib/substitute.c b/source/lib/substitute.c index fed11c22982..44e791b7907 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -40,24 +40,24 @@ void set_local_machine_name(const char* local_name, BOOL perm) static BOOL already_perm = False; fstring tmp_local_machine; + fstrcpy(tmp_local_machine,local_name); + trim_char(tmp_local_machine,' ',' '); + /* * Windows NT/2k uses "*SMBSERVER" and XP uses "*SMBSERV" * arrggg!!! */ - if (strequal(local_name, "*SMBSERVER")) - return; - - if (strequal(local_name, "*SMBSERV")) + if ( strequal(tmp_local_machine, "*SMBSERVER") || strequal(tmp_local_machine, "*SMBSERV") ) { + fstrcpy( local_machine, client_socket_addr() ); return; + } if (already_perm) return; already_perm = perm; - fstrcpy(tmp_local_machine,local_name); - trim_char(tmp_local_machine,' ',' '); alpha_strcpy(local_machine,tmp_local_machine,SAFE_NETBIOS_CHARS,sizeof(local_machine)-1); strlower_m(local_machine); } diff --git a/source/lib/util.c b/source/lib/util.c index 3f57048a00b..9d7a2648c5b 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -63,19 +63,6 @@ int chain_size = 0; int trans_num = 0; -/* - case handling on filenames -*/ -int case_default = CASE_LOWER; - -/* the following control case operations - they are put here so the - client can link easily */ -BOOL case_sensitive; -BOOL case_preserve; -BOOL use_mangled_map = False; -BOOL short_case_preserve; -BOOL case_mangle; - static enum remote_arch_types ra_type = RA_UNKNOWN; pstring user_socket_options=DEFAULT_SOCKET_OPTIONS; @@ -609,7 +596,7 @@ void unix_clean_name(char *s) Make a dir struct. ****************************************************************************/ -void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date) +void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date, BOOL case_sensitive) { char *p; pstring mask2; @@ -1453,6 +1440,9 @@ void smb_panic2(const char *why, BOOL decrement_pid_count ) #endif dbgflush(); +#ifdef SIGABRT + CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL); +#endif abort(); } @@ -1500,7 +1490,7 @@ const char *readdirname(DIR *p) of a path matches a (possibly wildcarded) entry in a namelist. ********************************************************************/ -BOOL is_in_path(const char *name, name_compare_entry *namelist) +BOOL is_in_path(const char *name, name_compare_entry *namelist, BOOL case_sensitive) { pstring last_component; char *p; @@ -1713,24 +1703,6 @@ BOOL is_myname(const char *s) return(ret); } -/******************************************************************** - Return only the first IP address of our configured interfaces - as a string - *******************************************************************/ - -const char* get_my_primary_ip (void) -{ - static fstring ip_string; - int n; - struct iface_struct nics[MAX_INTERFACES]; - - if ((n=get_interfaces(nics, MAX_INTERFACES)) <= 0) - return NULL; - - fstrcpy(ip_string, inet_ntoa(nics[0].ip)); - return ip_string; -} - BOOL is_myname_or_ipaddr(const char *s) { /* optimize for the common case */ diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 600c830aced..65ef306ed17 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -334,9 +334,8 @@ char *strupper_static(const char *s) Convert a string to "normal" form. **/ -void strnorm(char *s) +void strnorm(char *s, int case_default) { - extern int case_default; if (case_default == CASE_UPPER) strupper_m(s); else @@ -347,9 +346,8 @@ void strnorm(char *s) Check if a string is in "normal" case. **/ -BOOL strisnormal(const char *s) +BOOL strisnormal(const char *s, int case_default) { - extern int case_default; if (case_default == CASE_UPPER) return(!strhaslower(s)); diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index 005f10a4c0a..bfb5288826f 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -506,13 +506,13 @@ BOOL strupper_w(smb_ucs2_t *s) /******************************************************************* convert a string to "normal" form ********************************************************************/ -void strnorm_w(smb_ucs2_t *s) + +void strnorm_w(smb_ucs2_t *s, int case_default) { - extern int case_default; - if (case_default == CASE_UPPER) - strupper_w(s); - else - strlower_w(s); + if (case_default == CASE_UPPER) + strupper_w(s); + else + strlower_w(s); } int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b) diff --git a/source/libads/ldap.c b/source/libads/ldap.c index e156857e96f..e018eeb2da9 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -1980,17 +1980,22 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) } status = ads_do_search(ads, "", LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res); - if (!ADS_ERR_OK(status)) return status; + if (!ADS_ERR_OK(status)) { + talloc_destroy(ctx); + return status; + } value = ads_pull_string(ads, ctx, res, "ldapServiceName"); if (!value) { ads_msgfree(ads, res); + talloc_destroy(ctx); return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); } timestr = ads_pull_string(ads, ctx, res, "currentTime"); if (!timestr) { ads_msgfree(ads, res); + talloc_destroy(ctx); return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); } diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c index f8204e05d68..8cc5d8bf901 100644 --- a/source/libsmb/clirap.c +++ b/source/libsmb/clirap.c @@ -217,6 +217,8 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, int uLevel = 1; int count = -1; + errno = 0; /* reset */ + /* send a SMBtrans command with api NetServerEnum */ p = param; SSVAL(p,0,0x68); /* api number */ @@ -269,7 +271,18 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, SAFE_FREE(rparam); SAFE_FREE(rdata); - + + if (count < 0) { + errno = cli_errno(cli); + } else { + if (!count) { + /* this is a very special case, when the domain master for the + work group isn't part of the work group itself, there is something + wild going on */ + errno = ENOENT; + } + } + return(count > 0); } diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index f08d9440f96..e44bdea2d3d 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -680,12 +680,18 @@ SMBCSRV *smbc_server(SMBCCTX *context, srv->cli = c; srv->dev = (dev_t)(str_checksum(server) ^ str_checksum(share)); - /* now add it to the cache (internal or external) */ + /* now add it to the cache (internal or external) */ + /* Let the cache function set errno if it wants to */ + errno = 0; if (context->callbacks.add_cached_srv_fn(context, srv, server, share, workgroup, username)) { + int saved_errno = errno; DEBUG(3, (" Failed to add server to cache\n")); + errno = saved_errno; + if (errno == 0) { + errno = ENOMEM; + } goto failed; } - DEBUG(2, ("Server connect ok: //%s/%s: %p\n", server, share, srv)); @@ -1939,7 +1945,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } - errno = cli_errno(&srv->cli); return NULL; @@ -2032,7 +2037,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } - errno = cli_errno(&srv->cli); return NULL; @@ -2106,7 +2110,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } - errno = cli_errno(&srv->cli); return NULL; } @@ -2150,7 +2153,7 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) } else { - errno = ENODEV; /* Neither the workgroup nor server exists */ + errno = ECONNREFUSED; /* Neither the workgroup nor server exists */ if (dir) { SAFE_FREE(dir->fname); SAFE_FREE(dir); diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index 3c25eba744f..d883c5308d3 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -1143,8 +1143,6 @@ void sort_query_replies(char *data, int n, struct in_addr ip) qsort(data, n, 6, QSORT_CAST name_query_comp); } -#define TRUNCATE_NETBIOS_NAME 1 - /******************************************************************* Convert, possibly using a stupid microsoft-ism which has destroyed the transport independence of netbios (for CIFS vendors that usually @@ -1164,19 +1162,17 @@ char *dns_to_netbios_name(const char *dns_name) StrnCpy(netbios_name, dns_name, MAX_NETBIOSNAME_LEN-1); netbios_name[15] = 0; -#ifdef TRUNCATE_NETBIOS_NAME /* ok. this is because of a stupid microsoft-ism. if the called host name contains a '.', microsoft clients expect you to truncate the netbios name up to and including the '.' this even applies, by mistake, to workgroup (domain) names, which is _really_ daft. */ - for (i = 0; i >= 15; i--) { + for (i = 0; i < 15; i++) { if (netbios_name[i] == '.') { netbios_name[i] = 0; break; } } -#endif /* TRUNCATE_NETBIOS_NAME */ return netbios_name; } diff --git a/source/libsmb/ntlmssp.c b/source/libsmb/ntlmssp.c index 66d48afc463..52e5cd004ff 100644 --- a/source/libsmb/ntlmssp.c +++ b/source/libsmb/ntlmssp.c @@ -1102,6 +1102,8 @@ NTSTATUS ntlmssp_client_start(NTLMSSP_STATE **ntlmssp_state) NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_NTLM2 | NTLMSSP_NEGOTIATE_KEY_EXCH | + NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED | + NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED | /* * We need to set this to allow a later SetPassword * via the SAMR pipe to succeed. Strange.... We could diff --git a/source/libsmb/trustdom_cache.c b/source/libsmb/trustdom_cache.c index 0128d080062..e63acd18c4f 100644 --- a/source/libsmb/trustdom_cache.c +++ b/source/libsmb/trustdom_cache.c @@ -114,12 +114,14 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, { char *key, *alt_key; fstring sid_string; + BOOL ret; /* * we use gecache call to avoid annoying debug messages * about initialised trustdom */ - if (!gencache_init()) return False; + if (!gencache_init()) + return False; DEBUG(5, ("trustdom_store: storing SID %s of domain %s\n", sid_string_static(sid), name)); @@ -134,11 +136,18 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, * try to put the names in the cache */ if (alt_key) { - return (gencache_set(alt_key, sid_string, timeout) - && gencache_set(key, sid_string, timeout)); + ret = gencache_set(alt_key, sid_string, timeout); + if ( ret ) { + ret = gencache_set(key, sid_string, timeout); + } + SAFE_FREE(alt_key); + SAFE_FREE(key); + return ret; } - - return gencache_set(key, sid_string, timeout); + + ret = gencache_set(key, sid_string, timeout); + SAFE_FREE(key); + return ret; } @@ -155,22 +164,26 @@ BOOL trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid, BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) { - char *key, *value; + char *key = NULL, *value = NULL; time_t timeout; /* init the cache */ - if (!gencache_init()) return False; + if (!gencache_init()) + return False; /* exit now if null pointers were passed as they're required further */ - if (!sid) return False; + if (!sid) + return False; /* prepare a key and get the value */ key = trustdom_cache_key(name); - if (!key) return False; + if (!key) + return False; if (!gencache_get(key, &value, &timeout)) { DEBUG(5, ("no entry for trusted domain %s found.\n", name)); SAFE_FREE(key); + SAFE_FREE(value); return False; } else { SAFE_FREE(key); @@ -180,9 +193,11 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) /* convert ip string representation into in_addr structure */ if(! string_to_sid(sid, value)) { sid = NULL; + SAFE_FREE(value); return False; } + SAFE_FREE(value); return True; } @@ -193,7 +208,7 @@ BOOL trustdom_cache_fetch(const char* name, DOM_SID* sid) uint32 trustdom_cache_fetch_timestamp( void ) { - char *value; + char *value = NULL; time_t timeout; uint32 timestamp; @@ -203,11 +218,13 @@ uint32 trustdom_cache_fetch_timestamp( void ) if (!gencache_get(TDOMTSKEY, &value, &timeout)) { DEBUG(5, ("no timestamp for trusted domain cache located.\n")); + SAFE_FREE(value); return 0; } timestamp = atoi(value); + SAFE_FREE(value); return timestamp; } diff --git a/source/modules/vfs_default_quota.c b/source/modules/vfs_default_quota.c index 1294a515333..f7c5dce4d67 100644 --- a/source/modules/vfs_default_quota.c +++ b/source/modules/vfs_default_quota.c @@ -21,7 +21,7 @@ #include "includes.h" #undef DBGC_CLASS -#define DBGC_CLASS DBGC_VFS +#define DBGC_CLASS DBGC_QUOTA #define DEFAULT_QUOTA_NAME "default_quota" diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index 40221b69feb..9caf7affc39 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -70,6 +70,10 @@ void close_sock(void) } } +#define CONNECT_TIMEOUT 30 +#define WRITE_TIMEOUT CONNECT_TIMEOUT +#define READ_TIMEOUT CONNECT_TIMEOUT + /* Make sure socket handle isn't stdin, stdout or stderr */ #define RECURSION_LIMIT 3 @@ -105,6 +109,14 @@ static int make_nonstd_fd_internals(int fd, int limit /* Recursion limiter */) return fd; } +/**************************************************************************** + Set a fd into blocking/nonblocking mode. Uses POSIX O_NONBLOCK if available, + else + if SYSV use O_NDELAY + if BSD use FNDELAY + Set close on exec also. +****************************************************************************/ + static int make_safe_fd(int fd) { int result, flags; @@ -113,8 +125,32 @@ static int make_safe_fd(int fd) close(fd); return -1; } + + /* Socket should be nonblocking. */ +#ifdef O_NONBLOCK +#define FLAG_TO_SET O_NONBLOCK +#else +#ifdef SYSV +#define FLAG_TO_SET O_NDELAY +#else /* BSD */ +#define FLAG_TO_SET FNDELAY +#endif +#endif + + if ((flags = fcntl(new_fd, F_GETFL)) == -1) { + close(new_fd); + return -1; + } + + flags |= FLAG_TO_SET; + if (fcntl(new_fd, F_SETFL, flags) == -1) { + close(new_fd); + return -1; + } + +#undef FLAG_TO_SET + /* Socket should be closed on exec() */ - #ifdef FD_CLOEXEC result = flags = fcntl(new_fd, F_GETFD, 0); if (flags >= 0) { @@ -137,6 +173,8 @@ static int winbind_named_pipe_sock(const char *dir) struct stat st; pstring path; int fd; + int wait_time; + int slept; /* Check permissions on unix socket directory */ @@ -185,10 +223,64 @@ static int winbind_named_pipe_sock(const char *dir) return -1; } + /* Set socket non-blocking and close on exec. */ + if ((fd = make_safe_fd( fd)) == -1) { return fd; } - + + for (wait_time = 0; connect(fd, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1; + wait_time += slept) { + struct timeval tv; + fd_set w_fds; + int ret; + int connect_errno = 0, errnosize; + + if (wait_time >= CONNECT_TIMEOUT) + goto error_out; + + switch (errno) { + case EINPROGRESS: + FD_ZERO(&w_fds); + FD_SET(fd, &w_fds); + tv.tv_sec = CONNECT_TIMEOUT - wait_time; + tv.tv_usec = 0; + + ret = select(fd + 1, NULL, &w_fds, NULL, &tv); + + if (ret > 0) { + errnosize = sizeof(connect_errno); + + ret = getsockopt(fd, SOL_SOCKET, + SO_ERROR, &connect_errno, &errnosize); + + if (ret >= 0 && connect_errno == 0) { + /* Connect succeed */ + goto out; + } + } + + slept = CONNECT_TIMEOUT; + break; + case EAGAIN: + slept = rand() % 3 + 1; + sleep(slept); + break; + default: + goto error_out; + } + + } + + out: + + return fd; + + error_out: + + close(fd); + return -1; + if (connect(fd, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { close(fd); @@ -318,25 +410,58 @@ int write_sock(void *buffer, int count) static int read_sock(void *buffer, int count) { int result = 0, nread = 0; + int total_time = 0, selret; /* Read data from socket */ - while(nread < count) { + struct timeval tv; + fd_set r_fds; - result = read(winbindd_fd, (char *)buffer + nread, - count - nread); + /* Catch pipe close on other end by checking if a read() + call would not block by calling select(). */ + + FD_ZERO(&r_fds); + FD_SET(winbindd_fd, &r_fds); + ZERO_STRUCT(tv); + /* Wait for 5 seconds for a reply. May need to parameterise this... */ + tv.tv_sec = 5; + + if ((selret = select(winbindd_fd + 1, &r_fds, NULL, NULL, &tv)) == -1) { + close_sock(); + return -1; /* Select error */ + } - if ((result == -1) || (result == 0)) { + if (selret == 0) { + /* Not ready for read yet... */ + if (total_time >= 30) { + /* Timeout */ + close_sock(); + return -1; + } + total_time += 5; + continue; + } + + if (FD_ISSET(winbindd_fd, &r_fds)) { - /* Read failed. I think the only useful thing we - can do here is just return -1 and fail since the - transaction has failed half way through. */ + /* Do the Read */ + + result = read(winbindd_fd, (char *)buffer + nread, + count - nread); + + if ((result == -1) || (result == 0)) { + + /* Read failed. I think the only useful thing we + can do here is just return -1 and fail since the + transaction has failed half way through. */ + + close_sock(); + return -1; + } + + nread += result; - close_sock(); - return -1; } - - nread += result; } return result; diff --git a/source/param/loadparm.c b/source/param/loadparm.c index e47fc3ebad8..6376e4aa917 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -249,6 +249,7 @@ typedef struct BOOL bNullPasswords; BOOL bObeyPamRestrictions; BOOL bLoadPrinters; + int PrintcapCacheTime; BOOL bLargeReadwrite; BOOL bReadRaw; BOOL bWriteRaw; @@ -365,7 +366,6 @@ typedef struct BOOL bCaseSensitive; BOOL bCasePreserve; BOOL bShortCasePreserve; - BOOL bCaseMangle; BOOL bHideDotFiles; BOOL bHideSpecialFiles; BOOL bHideUnReadable; @@ -489,7 +489,6 @@ static service sDefault = { False, /* case sensitive */ True, /* case preserve */ True, /* short case preserve */ - False, /* case mangle */ True, /* bHideDotFiles */ False, /* bHideSpecialFiles */ False, /* bHideUnReadable */ @@ -947,6 +946,7 @@ static struct parm_struct parm_table[] = { {"max reported print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxReportedPrintJobs, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, {"max print jobs", P_INTEGER, P_LOCAL, &sDefault.iMaxPrintJobs, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, {"load printers", P_BOOL, P_GLOBAL, &Globals.bLoadPrinters, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, + {"printcap cache time", P_INTEGER, P_GLOBAL, &Globals.PrintcapCacheTime, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, {"printcap name", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, {"printcap", P_STRING, P_GLOBAL, &Globals.szPrintcapname, NULL, NULL, FLAG_HIDE}, {"printable", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, @@ -982,7 +982,6 @@ static struct parm_struct parm_table[] = { {"casesignames", P_BOOL, P_LOCAL, &sDefault.bCaseSensitive, NULL, NULL, FLAG_HIDE}, {"preserve case", P_BOOL, P_LOCAL, &sDefault.bCasePreserve, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"short preserve case", P_BOOL, P_LOCAL, &sDefault.bShortCasePreserve, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, - {"mangle case", P_BOOL, P_LOCAL, &sDefault.bCaseMangle, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, {"hide special files", P_BOOL, P_LOCAL, &sDefault.bHideSpecialFiles, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, @@ -1365,6 +1364,7 @@ static void init_globals(void) Globals.AlgorithmicRidBase = BASE_RID; Globals.bLoadPrinters = True; + Globals.PrintcapCacheTime = 0; /* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */ /* Discovered by 2 days of pain by Don McCall @ HP :-). */ Globals.max_xmit = 0x4104; @@ -1450,6 +1450,7 @@ static void init_globals(void) a large number of sites (tridge) */ Globals.bHostnameLookups = False; + str_list_free(&Globals.szPassdbBackend); #ifdef WITH_LDAP_SAMCONFIG string_set(&Globals.szLdapServer, "localhost"); Globals.ldap_port = 636; @@ -1616,6 +1617,7 @@ FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile) FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile) FN_GLOBAL_STRING(lp_private_dir, &Globals.szPrivateDir) FN_GLOBAL_STRING(lp_serverstring, &Globals.szServerString) +FN_GLOBAL_INTEGER(lp_printcap_cache_time, &Globals.PrintcapCacheTime) FN_GLOBAL_STRING(lp_printcapname, &Globals.szPrintcapname) FN_GLOBAL_STRING(lp_enumports_cmd, &Globals.szEnumPortsCommand) FN_GLOBAL_STRING(lp_addprinter_cmd, &Globals.szAddPrinterCommand) @@ -1833,7 +1835,6 @@ FN_LOCAL_BOOL(lp_rootpreexec_close, bRootpreexecClose) FN_LOCAL_BOOL(lp_casesensitive, bCaseSensitive) FN_LOCAL_BOOL(lp_preservecase, bCasePreserve) FN_LOCAL_BOOL(lp_shortpreservecase, bShortCasePreserve) -FN_LOCAL_BOOL(lp_casemangle, bCaseMangle) FN_LOCAL_BOOL(lp_hide_dot_files, bHideDotFiles) FN_LOCAL_BOOL(lp_hide_special_files, bHideSpecialFiles) FN_LOCAL_BOOL(lp_hideunreadable, bHideUnReadable) @@ -2521,6 +2522,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL strupper_m(*(char **)dest_ptr); break; case P_LIST: + str_list_free((char ***)dest_ptr); str_list_copy((char ***)dest_ptr, *(const char ***)src_ptr); break; default: @@ -2752,6 +2754,7 @@ static BOOL handle_netbios_scope(int snum, const char *pszParmValue, char **ptr) static BOOL handle_netbios_aliases(int snum, const char *pszParmValue, char **ptr) { + str_list_free(&Globals.szNetbiosAliases); Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL); return set_netbios_aliases((const char **)Globals.szNetbiosAliases); } @@ -4256,7 +4259,7 @@ const char *get_called_name(void) static fstring called_name; if (!*local_machine) { - fstrcpy(called_name, get_my_primary_ip()); + fstrcpy(called_name, client_socket_addr()); DEBUG(8,("get_called_name: assuming that client used IP address [%s] as called name.\n", called_name)); return called_name; diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 8313a259bd2..75f8171a25d 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -814,13 +814,13 @@ BOOL local_lookup_sid(const DOM_SID *sid, char *name, enum SID_NAME_USE *psid_na BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psid_name_use) { - extern DOM_SID global_sid_World_Domain; DOM_SID local_sid; + DOM_SID sid; fstring user; SAM_ACCOUNT *sam_account = NULL; struct group *grp; GROUP_MAP map; - + *psid_name_use = SID_NAME_UNKNOWN; /* @@ -832,14 +832,12 @@ BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psi sid_copy(&local_sid, get_global_sam_sid()); - /* - * Special case for MACHINE\Everyone. Map to the world_sid. - */ - - if(strequal(user, "Everyone")) { - sid_copy( psid, &global_sid_World_Domain); - sid_append_rid(psid, 0); - *psid_name_use = SID_NAME_ALIAS; + if (map_name_to_wellknown_sid(&sid, psid_name_use, user)){ + fstring sid_str; + sid_copy( psid, &sid); + sid_to_string(sid_str, &sid); + DEBUG(10,("lookup_name: name %s = SID %s, type = %u\n", user, sid_str, + (unsigned int)*psid_name_use )); return True; } diff --git a/source/passdb/util_sam_sid.c b/source/passdb/util_sam_sid.c index 63ef5914af8..c13159e47f0 100644 --- a/source/passdb/util_sam_sid.c +++ b/source/passdb/util_sam_sid.c @@ -56,16 +56,23 @@ static const known_sid_users creator_owner_users[] = { {0, (enum SID_NAME_USE)0, NULL}}; static const known_sid_users nt_authority_users[] = { - { 1, SID_NAME_ALIAS, "Dialup" }, - { 2, SID_NAME_ALIAS, "Network"}, - { 3, SID_NAME_ALIAS, "Batch"}, - { 4, SID_NAME_ALIAS, "Interactive"}, - { 6, SID_NAME_ALIAS, "Service"}, - { 7, SID_NAME_ALIAS, "AnonymousLogon"}, - { 8, SID_NAME_ALIAS, "Proxy"}, - { 9, SID_NAME_ALIAS, "ServerLogon"}, - { 11, SID_NAME_ALIAS, "Authenticated Users"}, - { 18, SID_NAME_ALIAS, "SYSTEM"}, + { 1, SID_NAME_WKN_GRP, "Dialup" }, + { 2, SID_NAME_WKN_GRP, "Network"}, + { 3, SID_NAME_WKN_GRP, "Batch"}, + { 4, SID_NAME_WKN_GRP, "Interactive"}, + { 6, SID_NAME_WKN_GRP, "Service"}, + { 7, SID_NAME_WKN_GRP, "AnonymousLogon"}, + { 8, SID_NAME_WKN_GRP, "Proxy"}, + { 9, SID_NAME_WKN_GRP, "ServerLogon"}, + { 10, SID_NAME_WKN_GRP, "Self"}, + { 11, SID_NAME_WKN_GRP, "Authenticated Users"}, + { 12, SID_NAME_WKN_GRP, "Restricted"}, + { 13, SID_NAME_WKN_GRP, "Terminal Server User"}, + { 14, SID_NAME_WKN_GRP, "Remote Interactive Logon"}, + { 15, SID_NAME_WKN_GRP, "This Organization"}, + { 18, SID_NAME_WKN_GRP, "SYSTEM"}, + { 19, SID_NAME_WKN_GRP, "Local Service"}, + { 20, SID_NAME_WKN_GRP, "Network Service"}, { 0, (enum SID_NAME_USE)0, NULL}}; static const known_sid_users builtin_groups[] = { @@ -287,6 +294,8 @@ BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char if (!sid_name_map_initialized) init_sid_name_map(); + DEBUG(10,("map_name_to_wellknown_sid: looking up %s\n", name)); + for (i=0; sid_name_map[i].sid != NULL; i++) { const known_sid_users *users = sid_name_map[i].known_users; diff --git a/source/printing/notify.c b/source/printing/notify.c index 7750239630c..26ef191f877 100644 --- a/source/printing/notify.c +++ b/source/printing/notify.c @@ -463,6 +463,15 @@ void notify_printer_sharename(int snum, char *share_name) snum, strlen(share_name) + 1, share_name); } +void notify_printer_printername(int snum, char *printername) +{ + const char *printer_name = SERVICE(snum); + + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRINTER_NAME, + snum, strlen(printername) + 1, printername); +} + void notify_printer_port(int snum, char *port_name) { const char *printer_name = SERVICE(snum); diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 0670b2543eb..909aed6c866 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2037,9 +2037,6 @@ uint32 del_a_printer(char *sharename) return 0; } -/* FIXME!!! Reorder so this forward declaration is not necessary --jerry */ -static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **, const char* sharename); -static void free_nt_printer_info_level_2(NT_PRINTER_INFO_LEVEL_2 **); /**************************************************************************** ****************************************************************************/ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info) @@ -2056,10 +2053,13 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info) * and printer is \\server\\printer * * Samba manages only local printers. - * we currently don't support things like path=\\other_server\printer + * we currently don't support things like i + * path=\\other_server\printer + * + * We only store the printername, not \\server\printername */ - if (info->servername[0]!='\0') { + if ( info->servername[0] != '\0' ) { trim_string(info->printername, info->servername, NULL); trim_char(info->printername, '\\', '\0'); info->servername[0]='\0'; @@ -3070,10 +3070,13 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, char *buf, int buflen) /* * break of the keyname from the value name. - * Should only be one '\' in the string returned. + * Valuenames can have embedded '\'s so be careful. + * only support one level of keys. See the + * "Konica Fiery S300 50C-K v1.1. enu" 2k driver. + * -- jerry */ - str = strrchr( string, '\\'); + str = strchr_m( string, '\\'); /* Put in "PrinterDriverData" is no key specified */ diff --git a/source/printing/printing.c b/source/printing/printing.c index 2355dd14506..2274e2d5f45 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -971,7 +971,7 @@ static void check_job_changed(int snum, TDB_DATA data, uint32 jobid) Update the internal database from the system print queue for a queue. ****************************************************************************/ -static void print_queue_update(int snum) +static void print_queue_update_internal(int snum) { int i, qcount; print_queue_struct *queue = NULL; @@ -1151,6 +1151,73 @@ static void print_queue_update(int snum) } /**************************************************************************** +this is the receive function of the background lpq updater +****************************************************************************/ +static void print_queue_receive(int msg_type, pid_t src, void *buf, size_t len) +{ + int snum; + snum=*((int *)buf); + print_queue_update_internal(snum); +} + +static pid_t background_lpq_updater_pid = -1; + +/**************************************************************************** +main thread of the background lpq updater +****************************************************************************/ +void start_background_queue(void) +{ + DEBUG(3,("start_background_queue: Starting background LPQ thread\n")); + background_lpq_updater_pid = sys_fork(); + + if (background_lpq_updater_pid == -1) { + DEBUG(5,("start_background_queue: background LPQ thread failed to start. %s\n", strerror(errno) )); + exit(1); + } + + if(background_lpq_updater_pid == 0) { + /* Child. */ + DEBUG(5,("start_background_queue: background LPQ thread started\n")); + + claim_connection( NULL, "smbd lpq backend", 0, False, + FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_PRINTING ); + + if (!locking_init(0)) { + exit(1); + } + + if (!print_backend_init()) { + exit(1); + } + + message_register(MSG_PRINTER_UPDATE, print_queue_receive); + + DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n")); + while (1) { + pause(); + DEBUG(10,("start_background_queue: background LPQ thread got a message\n")); + message_dispatch(); + } + } +} + +/**************************************************************************** +update the internal database from the system print queue for a queue +****************************************************************************/ +static void print_queue_update(int snum) +{ + /* + * Make sure that the backgroup queueu process exists. + * Otherwise just do the update ourselves + */ + + if ( background_lpq_updater_pid != -1 ) + message_send_pid(background_lpq_updater_pid, MSG_PRINTER_UPDATE, &snum, sizeof(snum), False); + else + print_queue_update_internal( snum ); +} + +/**************************************************************************** Create/Update an entry in the print tdb that will allow us to send notify updates only to interested smbd's. ****************************************************************************/ diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c index df0d37a4631..b24dbb7d25d 100644 --- a/source/rpc_client/cli_pipe.c +++ b/source/rpc_client/cli_pipe.c @@ -332,13 +332,24 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata, if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) { RPC_AUTH_NETSEC_CHK chk; - if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) { + if ( (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) + && (auth_len != RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN) ) + { DEBUG(0,("rpc_auth_pipe: wrong schannel auth len %d\n", auth_len)); return False; } - if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign", - &chk, &auth_verf, 0)) { + /* can't seal with no nonce */ + if ( (cli->pipe_auth_flags & AUTH_PIPE_SEAL) + && (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) ) + { + DEBUG(0,("rpc_auth_pipe: sealing not supported with schannel auth len %d\n", auth_len)); + return False; + } + + + if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign", auth_len, &chk, &auth_verf, 0)) + { DEBUG(0, ("rpc_auth_pipe: schannel unmarshalling " "RPC_AUTH_NETSECK_CHK failed\n")); return False; @@ -918,7 +929,7 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num, auth_len = RPC_AUTH_NTLMSSP_CHK_LEN; } if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) { - auth_len = RPC_AUTH_NETSEC_CHK_LEN; + auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN; } auth_hdr_len = RPC_HDR_AUTH_LEN; } @@ -1034,8 +1045,9 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num, /* write auth footer onto the packet */ parse_offset_marker = prs_offset(&sec_blob); - if (!smb_io_rpc_auth_netsec_chk("", &verf, - &sec_blob, 0)) { + if (!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN, + &verf, &sec_blob, 0)) + { prs_mem_free(&sec_blob); return False; } diff --git a/source/rpc_parse/parse_rpc.c b/source/rpc_parse/parse_rpc.c index 69262b6d0cb..f4ffcba1bdf 100644 --- a/source/rpc_parse/parse_rpc.c +++ b/source/rpc_parse/parse_rpc.c @@ -1189,7 +1189,8 @@ BOOL smb_io_rpc_auth_netsec_neg(const char *desc, RPC_AUTH_NETSEC_NEG *neg, /******************************************************************* reads or writes an RPC_AUTH_NETSEC_CHK structure. ********************************************************************/ -BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk, +BOOL smb_io_rpc_auth_netsec_chk(const char *desc, int auth_len, + RPC_AUTH_NETSEC_CHK * chk, prs_struct *ps, int depth) { if (chk == NULL) @@ -1198,10 +1199,19 @@ BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk, prs_debug(ps, depth, desc, "smb_io_rpc_auth_netsec_chk"); depth++; - prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)); - prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)); - prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)); - prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)); + if ( !prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)) ) + return False; + + if ( !prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)) ) + return False; + + if ( !prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)) ) + return False; + + if ( auth_len == RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN ) { + if ( !prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)) ) + return False; + } return True; } diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index 3878734c6df..b4e29e67485 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -171,10 +171,12 @@ static void init_lsa_rid2s(DOM_R_REF *ref, DOM_RID2 *rid2, status = lookup_name(dom_name, user, &sid, &name_type); } +#if 0 /* This is not true. */ if (name_type == SID_NAME_WKN_GRP) { /* BUILTIN aliases are still aliases :-) */ name_type = SID_NAME_ALIAS; } +#endif DEBUG(5, ("init_lsa_rid2s: %s\n", status ? "found" : "not found")); @@ -667,12 +669,12 @@ done: /* set up the LSA Lookup SIDs response */ init_lsa_trans_names(p->mem_ctx, ref, names, num_entries, sid, &mapped_count); - if (mapped_count == 0) - r_u->status = NT_STATUS_NONE_MAPPED; - else if (mapped_count != num_entries) - r_u->status = STATUS_SOME_UNMAPPED; - else - r_u->status = NT_STATUS_OK; + if (NT_STATUS_IS_OK(r_u->status)) { + if (mapped_count == 0) + r_u->status = NT_STATUS_NONE_MAPPED; + else if (mapped_count != num_entries) + r_u->status = STATUS_SOME_UNMAPPED; + } init_reply_lookup_sids(r_u, ref, names, mapped_count); return r_u->status; diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c index 3a4e0852769..13d894d2d88 100644 --- a/source/rpc_server/srv_pipe.c +++ b/source/rpc_server/srv_pipe.c @@ -124,7 +124,7 @@ BOOL create_next_pdu(pipes_struct *p) if(p->ntlmssp_auth_validated) { data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NTLMSSP_CHK_LEN); } else if(p->netsec_auth_validated) { - data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN); + data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN); } /* @@ -177,8 +177,8 @@ BOOL create_next_pdu(pipes_struct *p) } else if (p->netsec_auth_validated) { p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len + ss_padding_len + - RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN; - p->hdr.auth_len = RPC_AUTH_NETSEC_CHK_LEN; + RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN; + p->hdr.auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN; } else { p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len; p->hdr.auth_len = 0; @@ -309,7 +309,8 @@ BOOL create_next_pdu(pipes_struct *p) SENDER_IS_ACCEPTOR, &verf, data, data_len + ss_padding_len); - smb_io_rpc_auth_netsec_chk("", &verf, &outgoing_pdu, 0); + smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN, + &verf, &outgoing_pdu, 0); p->netsec_auth.seq_num++; } @@ -1339,7 +1340,7 @@ BOOL api_pipe_netsec_process(pipes_struct *p, prs_struct *rpc_in) auth_len = p->hdr.auth_len; - if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) { + if (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) { DEBUG(0,("Incorrect auth_len %d.\n", auth_len )); return False; } @@ -1384,7 +1385,9 @@ BOOL api_pipe_netsec_process(pipes_struct *p, prs_struct *rpc_in) return False; } - if(!smb_io_rpc_auth_netsec_chk("", &netsec_chk, rpc_in, 0)) { + if(!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN, + &netsec_chk, rpc_in, 0)) + { DEBUG(0,("failed to unmarshal RPC_AUTH_NETSEC_CHK.\n")); return False; } diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 44fec78c505..ccf571a0e2c 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -1118,6 +1118,7 @@ static BOOL close_internal_rpc_pipe_hnd(void *np_conn) data_blob_free(&p->session_key); delete_nt_token(&p->pipe_user.nt_user_token); + data_blob_free(&p->session_key); SAFE_FREE(p->pipe_user.groups); DLIST_REMOVE(InternalPipes, p); diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index eca0913c1c2..ea631d7c851 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -3295,16 +3295,12 @@ static BOOL get_memberuids(gid_t gid, uid_t **uids, int *num) /* Secondary group members */ - gr = grp->gr_mem; - while ((*gr != NULL) && ((*gr)[0] != '\0')) { + for (gr = grp->gr_mem; (*gr != NULL) && ((*gr)[0] != '\0'); gr += 1) { struct passwd *pw = getpwnam(*gr); if (pw == NULL) continue; - add_uid_to_array_unique(pw->pw_uid, uids, num); - - gr += 1; } winbind_on(); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 3b1bb5ede5d..65d5517da45 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -473,9 +473,11 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) { int snum; int n_services=lp_numservices(); - char *aprinter; + char *aprinter, *printername; fstring sname; BOOL found=False; + NT_PRINTER_INFO_LEVEL *printer; + WERROR result; DEBUG(4,("Setting printer name=%s (len=%lu)\n", handlename, (unsigned long)strlen(handlename))); @@ -496,16 +498,9 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) aprinter=handlename; } - DEBUGADD(5,("searching for [%s] (len=%lu)\n", aprinter, (unsigned long)strlen(aprinter))); + DEBUGADD(5, ("searching for [%s] (len=%lu)\n", aprinter, (unsigned long)strlen(aprinter))); - /* - * The original code allowed smbd to store a printer name that - * was different from the share name. This is not possible - * anymore, so I've simplified this loop greatly. Here - * we are just verifying that the printer name is a valid - * printer service defined in smb.conf - * --jerry [Fri Feb 15 11:17:46 CST 2002] - */ + /* have to search on sharename and PRINTER_INFO2->printername */ for (snum=0; snum<n_services; snum++) { @@ -514,13 +509,45 @@ static BOOL set_printer_hnd_name(Printer_entry *Printer, char *handlename) fstrcpy(sname, lp_servicename(snum)); - DEBUGADD(5,("share:%s\n",sname)); + DEBUGADD(10, ("share: %s\n",sname)); - if (! StrCaseCmp(sname, aprinter)) { + /* sharename */ + if ( strequal(sname, aprinter) ) { found = True; break; } - + + /* printername */ + printer = NULL; + result = get_a_printer( NULL, &printer, 2, sname ); + if ( !W_ERROR_IS_OK(result) ) { + DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n", + sname, dos_errstr(result))); + continue; + } + + /* printername is always returned as \\server\printername */ + if ( !(printername = strchr_m(&printer->info_2->printername[2], '\\')) ) { + DEBUG(0,("set_printer_hnd_name: info2->printername in wrong format! [%s]\n", + printer->info_2->printername)); + free_a_printer( &printer, 2); + continue; + } + + /* FIXME!! not mb safe here */ + printername++; + + /* sharename */ + if ( strequal(printername, aprinter) ) { + found = True; + } + + DEBUGADD(10, ("printername: %s\n", printername)); + + free_a_printer( &printer, 2); + + if ( found ) + break; } @@ -5854,14 +5881,28 @@ static WERROR update_printer_sec(POLICY_HND *handle, uint32 level, static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum) { + fstring printername; + const char *p; + DEBUG(5,("check_printer_ok: servername=%s printername=%s sharename=%s portname=%s drivername=%s comment=%s location=%s\n", info->servername, info->printername, info->sharename, info->portname, info->drivername, info->comment, info->location)); /* we force some elements to "correct" values */ slprintf(info->servername, sizeof(info->servername)-1, "\\\\%s", get_called_name()); fstrcpy(info->sharename, lp_servicename(snum)); + + /* make sure printername is in \\server\printername format */ + + fstrcpy( printername, info->printername ); + p = printername; + if ( printername[0] == '\\' && printername[1] == '\\' ) { + if ( (p = strchr_m( &printername[2], '\\' )) != NULL ) + p++; + } + slprintf(info->printername, sizeof(info->printername)-1, "\\\\%s\\%s", - get_called_name(), info->sharename); + get_called_name(), p ); + info->attributes = PRINTER_ATTRIBUTE_SAMBA; @@ -6057,14 +6098,28 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) { init_unistr2( &buffer, printer->info_2->sharename, UNI_STR_TERMINATE); - set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "printerName", - REG_SZ, (uint8*)buffer.buffer, buffer.uni_str_len*2 ); set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shareName", REG_SZ, (uint8*)buffer.buffer, buffer.uni_str_len*2 ); notify_printer_sharename(snum, printer->info_2->sharename); } + if (!strequal(printer->info_2->printername, old_printer->info_2->printername)) { + char *pname; + + if ( (pname = strchr_m( printer->info_2->printername+2, '\\' )) != NULL ) + pname++; + else + pname = printer->info_2->printername; + + + init_unistr2( &buffer, pname, UNI_STR_TERMINATE); + set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "printerName", + REG_SZ, (uint8*)buffer.buffer, buffer.uni_str_len*2 ); + + notify_printer_printername( snum, pname ); + } + if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) { init_unistr2( &buffer, printer->info_2->portname, UNI_STR_TERMINATE); set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "portName", @@ -8750,19 +8805,19 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, { /* save the OID if one was specified */ if ( oid_string ) { - fstrcat( keyname, "\\" ); - fstrcat( keyname, SPOOL_OID_KEY ); + fstrcat( keyname, "\\" ); + fstrcat( keyname, SPOOL_OID_KEY ); - /* - * I'm not checking the status here on purpose. Don't know - * if this is right, but I'm returning the status from the - * previous set_printer_dataex() call. I have no idea if - * this is right. --jerry - */ + /* + * I'm not checking the status here on purpose. Don't know + * if this is right, but I'm returning the status from the + * previous set_printer_dataex() call. I have no idea if + * this is right. --jerry + */ - set_printer_dataex( printer, keyname, valuename, - REG_SZ, (void*)oid_string, strlen(oid_string)+1 ); - } + set_printer_dataex( printer, keyname, valuename, + REG_SZ, (void*)oid_string, strlen(oid_string)+1 ); + } status = mod_a_printer(*printer, 2); } diff --git a/source/script/mkversion.sh b/source/script/mkversion.sh index 917a9ed1ae3..492ecaade2a 100755 --- a/source/script/mkversion.sh +++ b/source/script/mkversion.sh @@ -48,7 +48,7 @@ fi if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then HAVESVN=no svn info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVN=yes - TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` + TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'` if test x"${HAVESVN}" = x"no";then HAVESVK=no svk info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVK=yes diff --git a/source/smbd/conn.c b/source/smbd/conn.c index 9bac0acdb9f..e083e144263 100644 --- a/source/smbd/conn.c +++ b/source/smbd/conn.c @@ -161,6 +161,7 @@ void conn_close_all(void) connection_struct *conn, *next; for (conn=Connections;conn;conn=next) { next=conn->next; + set_current_service(conn, True); close_cnum(conn, conn->vuid); } } diff --git a/source/smbd/filename.c b/source/smbd/filename.c index 805af9c494a..5e5f5726913 100644 --- a/source/smbd/filename.c +++ b/source/smbd/filename.c @@ -26,11 +26,6 @@ #include "includes.h" -extern BOOL case_sensitive; -extern BOOL case_preserve; -extern BOOL short_case_preserve; -extern BOOL use_mangled_map; - static BOOL scan_directory(const char *path, char *name,size_t maxlength, connection_struct *conn,BOOL docache); @@ -39,7 +34,7 @@ static BOOL scan_directory(const char *path, char *name,size_t maxlength, This needs to be careful about whether we are case sensitive. ****************************************************************************/ -static BOOL fname_equal(const char *name1, const char *name2) +static BOOL fname_equal(const char *name1, const char *name2, BOOL case_sensitive) { /* Normal filename handling */ if (case_sensitive) @@ -137,6 +132,10 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen if (!*name) { name[0] = '.'; name[1] = '\0'; + if (SMB_VFS_STAT(conn,name,&st) == 0) { + *pst = st; + } + DEBUG(5,("conversion finished %s -> %s\n",orig_path, name)); return(True); } @@ -152,13 +151,17 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen pstrcpy(saved_last_component, name); } - if (!case_sensitive && (!case_preserve || (mangle_is_8_3(name, False) && !short_case_preserve))) - strnorm(name); +#if 1 + if (!conn->case_preserve || (mangle_is_8_3(name, False) && !conn->short_case_preserve)) +#else + if (!conn->case_sensitive && (!conn->case_preserve || (mangle_is_8_3(name, False) && !conn->short_case_preserve))) +#endif + strnorm(name, lp_defaultcase(SNUM(conn))); start = name; pstrcpy(orig_path, name); - if(!case_sensitive && stat_cache_lookup(conn, name, dirpath, &start, &st)) { + if(!conn->case_sensitive && stat_cache_lookup(conn, name, dirpath, &start, &st)) { *pst = st; return True; } @@ -168,7 +171,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen */ if (SMB_VFS_STAT(conn,name,&st) == 0) { - stat_cache_add(orig_path, name); + stat_cache_add(orig_path, name, conn->case_sensitive); DEBUG(5,("conversion finished %s -> %s\n",orig_path, name)); *pst = st; return(True); @@ -181,7 +184,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen * sensitive then searching won't help. */ - if (case_sensitive && !mangle_is_mangled(name) && !use_mangled_map) + if (conn->case_sensitive && !mangle_is_mangled(name) && !*lp_mangled_map(SNUM(conn))) return(False); name_has_wildcard = ms_has_wild(start); @@ -297,8 +300,8 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen * don't normalise it. */ - if (!case_preserve && (!strhasupper(start) || !strhaslower(start))) - strnorm(start); + if (!conn->case_preserve && (!strhasupper(start) || !strhaslower(start))) + strnorm(start, lp_defaultcase(SNUM(conn))); /* * check on the mangled stack to see if we can recover the @@ -353,7 +356,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen */ if(!component_was_mangled && !name_has_wildcard) - stat_cache_add(orig_path, dirpath); + stat_cache_add(orig_path, dirpath, conn->case_sensitive); /* * Restore the / that we wiped out earlier. @@ -368,7 +371,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen */ if(!component_was_mangled && !name_has_wildcard) - stat_cache_add(orig_path, name); + stat_cache_add(orig_path, name, conn->case_sensitive); /* * The name has been resolved. @@ -400,7 +403,7 @@ BOOL check_name(pstring name,connection_struct *conn) } if (!lp_widelinks(SNUM(conn))) { - ret = reduce_name(conn,name,conn->connectpath); + ret = reduce_name(conn,name); } /* Check if we are allowing users to follow symlinks */ @@ -482,7 +485,7 @@ static BOOL scan_directory(const char *path, char *name, size_t maxlength, * against unmangled name. */ - if ((mangled && mangled_equal(name,dname,SNUM(conn))) || fname_equal(name, dname)) { + if ((mangled && mangled_equal(name,dname,SNUM(conn))) || fname_equal(name, dname, conn->case_sensitive)) { /* we've found the file, change it's name and return */ if (docache) DirCacheAdd(path,name,dname,SNUM(conn)); diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index c5d7582c033..b77fe601b69 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -120,5 +120,5 @@ void mangle_map(pstring OutName, BOOL need83, BOOL cache83, int snum) /* invoke the inane "mangled map" code */ mangle_map_filename(OutName, snum); - mangle_fns->name_map(OutName, need83, cache83); + mangle_fns->name_map(OutName, need83, cache83, lp_defaultcase(snum)); } diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c index 16722ae6e9d..7b8cbdbddba 100644 --- a/source/smbd/mangle_hash.c +++ b/source/smbd/mangle_hash.c @@ -51,13 +51,6 @@ /* -------------------------------------------------------------------------- ** - * External Variables... - */ - -extern int case_default; /* Are conforming 8.3 names all upper or lower? */ -extern BOOL case_mangle; /* If true, all chars in 8.3 should be same case. */ - -/* -------------------------------------------------------------------------- ** * Other stuff... * * magic_char - This is the magic char used for mangling. It's @@ -130,13 +123,6 @@ static BOOL mc_initialized = False; #define MANGLED_CACHE_MAX_ENTRIES 1024 #define MANGLED_CACHE_MAX_MEMORY 0 -/* -------------------------------------------------------------------------- ** - * External Variables... - */ - -extern int case_default; /* Are conforming 8.3 names all upper or lower? */ -extern BOOL case_mangle; /* If true, all chars in 8.3 should be same case. */ - /* -------------------------------------------------------------------- */ static NTSTATUS has_valid_83_chars(const smb_ucs2_t *s, BOOL allow_wildcards) @@ -639,7 +625,7 @@ static BOOL check_cache( char *s ) * the buffer must be able to hold 13 characters (including the null) ***************************************************************************** */ -static void to_8_3(char *s) +static void to_8_3(char *s, int default_case) { int csum; char *p; @@ -653,7 +639,7 @@ static void to_8_3(char *s) p = strrchr(s,'.'); if( p && (strlen(p+1) < (size_t)4) ) { - BOOL all_normal = ( strisnormal(p+1) ); /* XXXXXXXXX */ + BOOL all_normal = ( strisnormal(p+1, default_case) ); /* XXXXXXXXX */ if( all_normal && p[1] != 0 ) { *p = 0; @@ -728,7 +714,7 @@ static void to_8_3(char *s) * **************************************************************************** */ -static void name_map(char *OutName, BOOL need83, BOOL cache83) +static void name_map(char *OutName, BOOL need83, BOOL cache83, int default_case) { smb_ucs2_t *OutName_ucs2; DEBUG(5,("name_map( %s, need83 = %s, cache83 = %s)\n", OutName, @@ -750,7 +736,7 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83) if (cache83) tmp = strdup(OutName); - to_8_3(OutName); + to_8_3(OutName, default_case); if(tmp != NULL) { cache_mangled_name(OutName, tmp); diff --git a/source/smbd/mangle_hash2.c b/source/smbd/mangle_hash2.c index 62087e7e593..dcfd7663ba3 100644 --- a/source/smbd/mangle_hash2.c +++ b/source/smbd/mangle_hash2.c @@ -501,7 +501,7 @@ static BOOL is_legal_name(const char *name) the name parameter must be able to hold 13 bytes */ -static void name_map(fstring name, BOOL need83, BOOL cache83) +static void name_map(fstring name, BOOL need83, BOOL cache83, int default_case) { char *dot_p; char lead_chars[7]; diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index e4ddda104e3..26be4434fdb 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -24,9 +24,6 @@ extern int Protocol; extern int smb_read_error; extern int global_oplock_break; -extern BOOL case_sensitive; -extern BOOL case_preserve; -extern BOOL short_case_preserve; extern struct current_user current_user; static const char *known_nt_pipes[] = { @@ -274,33 +271,33 @@ static BOOL saved_short_case_preserve; Save case semantics. ****************************************************************************/ -static void set_posix_case_semantics(uint32 file_attributes) +static void set_posix_case_semantics(connection_struct *conn, uint32 file_attributes) { if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) return; - saved_case_sensitive = case_sensitive; - saved_case_preserve = case_preserve; - saved_short_case_preserve = short_case_preserve; + saved_case_sensitive = conn->case_sensitive; + saved_case_preserve = conn->case_preserve; + saved_short_case_preserve = conn->short_case_preserve; /* Set to POSIX. */ - case_sensitive = True; - case_preserve = True; - short_case_preserve = True; + conn->case_sensitive = True; + conn->case_preserve = True; + conn->short_case_preserve = True; } /**************************************************************************** Restore case semantics. ****************************************************************************/ -static void restore_case_semantics(uint32 file_attributes) +static void restore_case_semantics(connection_struct *conn, uint32 file_attributes) { if(!(file_attributes & FILE_FLAG_POSIX_SEMANTICS)) return; - case_sensitive = saved_case_sensitive; - case_preserve = saved_case_preserve; - short_case_preserve = saved_short_case_preserve; + conn->case_sensitive = saved_case_sensitive; + conn->case_preserve = saved_case_preserve; + conn->short_case_preserve = saved_short_case_preserve; } /**************************************************************************** @@ -762,7 +759,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib * Check if POSIX semantics are wanted. */ - set_posix_case_semantics(file_attributes); + set_posix_case_semantics(conn, file_attributes); unix_convert(fname,conn,0,&bad_path,&sbuf); @@ -781,7 +778,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, &smb_action); - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); if(!fsp) { END_PROFILE(SMBntcreateX); @@ -847,7 +844,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib */ if (create_options & FILE_NON_DIRECTORY_FILE) { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); SSVAL(outbuf, smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); END_PROFILE(SMBntcreateX); @@ -858,20 +855,20 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, &smb_action); if(!fsp) { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); END_PROFILE(SMBntcreateX); return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } } else { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); END_PROFILE(SMBntcreateX); return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } } } - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); file_len = sbuf.st_size; fmode = dos_mode(conn,fname,&sbuf); @@ -1285,7 +1282,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o * Check if POSIX semantics are wanted. */ - set_posix_case_semantics(file_attributes); + set_posix_case_semantics(conn, file_attributes); RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); @@ -1313,7 +1310,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, &smb_action); if(!fsp) { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } @@ -1336,7 +1333,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o */ if (create_options & FILE_NON_DIRECTORY_FILE) { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); SSVAL(outbuf, smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES); return ERROR_NT(NT_STATUS_FILE_IS_A_DIRECTORY); } @@ -1345,11 +1342,11 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, &smb_action); if(!fsp) { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } } else { - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } } @@ -1361,7 +1358,7 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o if (fmode & aDIR) { close_file(fsp,False); - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); return ERROR_DOS(ERRDOS,ERRnoaccess); } @@ -1384,11 +1381,11 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o if (sd_len && !NT_STATUS_IS_OK(status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION))) { close_file(fsp,False); - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); return ERROR_NT(status); } - restore_case_semantics(file_attributes); + restore_case_semantics(conn, file_attributes); /* Save the requested allocation size. */ allocation_size = (SMB_BIG_UINT)IVAL(params,12); diff --git a/source/smbd/open.c b/source/smbd/open.c index 8ab5dab6ac9..3b4f50b0656 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -242,30 +242,10 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, return True; } -/**************************************************************************** - C. Hoch 11/22/95 - Helper for open_file_shared. - Truncate a file after checking locking; close file if locked. - **************************************************************************/ - -static int truncate_unless_locked(struct connection_struct *conn, files_struct *fsp) -{ - SMB_BIG_UINT mask = (SMB_BIG_UINT)-1; - - if (is_locked(fsp,fsp->conn,mask,0,WRITE_LOCK,True)){ - errno = EACCES; - unix_ERR_class = ERRDOS; - unix_ERR_code = ERRlock; - unix_ERR_ntstatus = dos_to_ntstatus(ERRDOS, ERRlock); - return -1; - } else { - return SMB_VFS_FTRUNCATE(fsp,fsp->fd,0); - } -} - /******************************************************************* return True if the filename is one of the special executable types ********************************************************************/ + static BOOL is_executable(const char *fname) { if ((fname = strrchr_m(fname,'.'))) { @@ -825,6 +805,25 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ return print_fsp_open(conn, fname); } + if (desired_access && ((desired_access & ~(SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES))==0) && + ((desired_access & (SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)) != 0)) { + /* Stat open that doesn't trigger oplock breaks or share mode checks... ! JRA. */ + oplock_request = 0; + fsp = open_file_stat(conn, fname, psbuf); + if (!fsp) + return NULL; + + fsp->desired_access = desired_access; + if (Access) + *Access = DOS_OPEN_RDONLY; + if (paction) + *paction = FILE_WAS_OPENED; + + DEBUG(10,("open_file_shared: stat open for fname = %s share_mode = %x\n", + fname, share_mode )); + return fsp; + } + fsp = file_new(conn); if(!fsp) return NULL; @@ -990,6 +989,13 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", if (fsp_open) fd_close(conn, fsp); file_free(fsp); + /* + * We have detected a sharing violation here + * so return the correct error code + */ + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadshare; + unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION; return NULL; } @@ -1057,6 +1063,13 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", unlock_share_entry_fsp(fsp); fd_close(conn,fsp); file_free(fsp); + /* + * We have detected a sharing violation here, so + * return the correct code. + */ + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadshare; + unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION; return NULL; } @@ -1095,7 +1108,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", /* * We are modifing the file after open - update the stat struct.. */ - if ((truncate_unless_locked(conn,fsp) == -1) || (SMB_VFS_FSTAT(fsp,fsp->fd,psbuf)==-1)) { + if ((SMB_VFS_FTRUNCATE(fsp,fsp->fd,0) == -1) || (SMB_VFS_FSTAT(fsp,fsp->fd,psbuf)==-1)) { unlock_share_entry_fsp(fsp); fd_close(conn,fsp); file_free(fsp); @@ -1433,12 +1446,8 @@ files_struct *open_file_stat(connection_struct *conn, char *fname, SMB_STRUCT_ST */ fsp->mode = psbuf->st_mode; - /* - * Don't store dev or inode, we don't want any iterator - * to see this. - */ - fsp->inode = (SMB_INO_T)0; - fsp->dev = (SMB_DEV_T)0; + fsp->inode = psbuf->st_ino; + fsp->dev = psbuf->st_dev; fsp->size = psbuf->st_size; fsp->vuid = current_user.vuid; fsp->file_pid = global_smbpid; diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 158f1a0ede8..584164e9309 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -2110,8 +2110,10 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ * entries out of the blue when setting ACLs, so a get/set * cycle will drop them. */ - if (the_acl_type == SMB_ACL_TYPE_ACCESS && *puid == psbuf->st_uid) + if (the_acl_type == SMB_ACL_TYPE_ACCESS && *puid == psbuf->st_uid) { + SMB_VFS_SYS_ACL_FREE_QUALIFIER(conn, (void *)puid,tagtype); continue; + } uid_to_sid( &sid, *puid); unix_ug.uid = *puid; owner_type = UID_ACE; diff --git a/source/smbd/process.c b/source/smbd/process.c index 966bb63c1ea..12fd809b784 100644 --- a/source/smbd/process.c +++ b/source/smbd/process.c @@ -344,6 +344,7 @@ force write permissions on print services. #define CAN_IPC (1<<3) #define AS_GUEST (1<<5) #define QUEUE_IN_OPLOCK (1<<6) +#define DO_CHDIR (1<<7) /* define a list of possible SMB messages and their corresponding @@ -373,7 +374,7 @@ static const struct smb_message_struct { /* 0x0e */ { "SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK }, /* 0x0f */ { "SMBmknew",reply_mknew,AS_USER}, /* 0x10 */ { "SMBchkpth",reply_chkpth,AS_USER}, -/* 0x11 */ { "SMBexit",reply_exit,0}, +/* 0x11 */ { "SMBexit",reply_exit,DO_CHDIR}, /* 0x12 */ { "SMBlseek",reply_lseek,AS_USER}, /* 0x13 */ { "SMBlockread",reply_lockread,AS_USER}, /* 0x14 */ { "SMBwriteunlock",reply_writeunlock,AS_USER}, @@ -469,7 +470,7 @@ static const struct smb_message_struct { /* 0x6e */ { NULL, NULL, 0 }, /* 0x6f */ { NULL, NULL, 0 }, /* 0x70 */ { "SMBtcon",reply_tcon,0}, -/* 0x71 */ { "SMBtdis",reply_tdis,0}, +/* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR}, /* 0x72 */ { "SMBnegprot",reply_negprot,0}, /* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0}, /* 0x74 */ { "SMBulogoffX", reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */ @@ -682,7 +683,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize uint16 session_tag = (lp_security() == SEC_SHARE) ? UID_FIELD_INVALID : SVAL(inbuf,smb_uid); connection_struct *conn = conn_find(SVAL(inbuf,smb_tid)); - DEBUG(3,("switch message %s (pid %d)\n",smb_fn_name(type),(int)pid)); + DEBUG(3,("switch message %s (pid %d) conn 0x%x\n",smb_fn_name(type),(int)pid,(unsigned int)conn)); smb_dump(smb_fn_name(type), 1, inbuf, size); if(global_oplock_break) { @@ -754,7 +755,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize return(ERROR_DOS(ERRSRV,ERRaccess)); /* load service specific parameters */ - if (conn && !set_current_service(conn,(flags & AS_USER)?True:False)) + if (conn && !set_current_service(conn,(flags & (AS_USER|DO_CHDIR)?True:False))) return(ERROR_DOS(ERRSRV,ERRaccess)); /* does this protocol need to be run as guest? */ @@ -1077,15 +1078,41 @@ static int setup_select_timeout(void) void check_reload(int t) { static time_t last_smb_conf_reload_time = 0; + static time_t last_load_printers_reload_time = 0; + time_t printcap_cache_time = (time_t)lp_printcap_cache_time(); - if(last_smb_conf_reload_time == 0) + if(last_smb_conf_reload_time == 0) { last_smb_conf_reload_time = t; + /* Our printing subsystem might not be ready at smbd start up. + Then no printer is available till the first printers check + is performed. A lower initial interval circumvents this. */ + if ( printcap_cache_time > 60 ) + last_load_printers_reload_time = t - printcap_cache_time + 60; + else + last_load_printers_reload_time = t; + } if (reload_after_sighup || (t >= last_smb_conf_reload_time+SMBD_RELOAD_CHECK)) { reload_services(True); reload_after_sighup = False; last_smb_conf_reload_time = t; } + + /* 'printcap cache time = 0' disable the feature */ + + if ( printcap_cache_time != 0 ) + { + /* see if it's time to reload or if the clock has been set back */ + + if ( (t >= last_load_printers_reload_time+printcap_cache_time) + || (t-last_load_printers_reload_time < 0) ) + { + DEBUG( 3,( "Printcap cache time expired.\n")); + remove_stale_printers(); + load_printers(); + last_load_printers_reload_time = t; + } + } } /**************************************************************************** diff --git a/source/smbd/reply.c b/source/smbd/reply.c index ac239c7e042..560208ae157 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -31,9 +31,6 @@ extern int Protocol; extern int max_send; extern int max_recv; extern char magic_char; -extern BOOL case_sensitive; -extern BOOL case_preserve; -extern BOOL short_case_preserve; extern int global_oplock_break; unsigned int smb_echo_count = 0; @@ -492,7 +489,9 @@ int reply_ioctl(connection_struct *conn, } SSVAL(p,0,fsp->rap_print_jobid); /* Job number */ srvstr_push(outbuf, p+2, global_myname(), 15, STR_TERMINATE|STR_ASCII); - srvstr_push(outbuf, p+18, lp_servicename(SNUM(conn)), 13, STR_TERMINATE|STR_ASCII); + if (conn) { + srvstr_push(outbuf, p+18, lp_servicename(SNUM(conn)), 13, STR_TERMINATE|STR_ASCII); + } break; } } @@ -881,7 +880,7 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size if (ok) { if ((dirtype&0x1F) == aVOLID) { memcpy(p,status,21); - make_dir_struct(p,"???????????",volume_label(SNUM(conn)),0,aVOLID,0); + make_dir_struct(p,"???????????",volume_label(SNUM(conn)),0,aVOLID,0,conn->case_sensitive); dptr_fill(p+12,dptr_num); if (dptr_zero(p+12) && (status_len==0)) numentries = 1; @@ -901,7 +900,7 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size finished = !get_dir_entry(conn,mask,dirtype,fname,&size,&mode,&date,check_descend); if (!finished) { memcpy(p,status,21); - make_dir_struct(p,mask,fname,size,mode,date); + make_dir_struct(p,mask,fname,size,mode,date,conn->case_sensitive); dptr_fill(p+12,dptr_num); numentries++; } @@ -1570,7 +1569,7 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) } } - if(!mask_match(fname, mask, case_sensitive)) + if(!mask_match(fname, mask, conn->case_sensitive)) continue; if (sys_direntry) { @@ -3515,7 +3514,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp, char * * filename). */ - if((case_sensitive == False) && (case_preserve == True) && + if((conn->case_sensitive == False) && (conn->case_preserve == True) && strequal(newname, fsp->fsp_name)) { char *p; pstring newname_modified_last_component; @@ -3689,7 +3688,7 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, ui DEBUG(3,("rename_internals: case_sensitive = %d, case_preserve = %d, short case preserve = %d, \ directory = %s, newname = %s, last_component_dest = %s, is_8_3 = %d\n", - case_sensitive, case_preserve, short_case_preserve, directory, + conn->case_sensitive, conn->case_preserve, conn->short_case_preserve, directory, newname, last_component_dest, is_short_name)); /* @@ -3700,10 +3699,10 @@ directory = %s, newname = %s, last_component_dest = %s, is_8_3 = %d\n", * the rename (user is trying to change the case of the * filename). */ - if((case_sensitive == False) && - (((case_preserve == True) && + if((conn->case_sensitive == False) && + (((conn->case_preserve == True) && (is_short_name == False)) || - ((short_case_preserve == True) && + ((conn->short_case_preserve == True) && (is_short_name == True))) && strcsequal(directory, newname)) { pstring modified_last_component; @@ -3839,7 +3838,7 @@ directory = %s, newname = %s, last_component_dest = %s, is_8_3 = %d\n", } } - if(!mask_match(fname, mask, case_sensitive)) + if(!mask_match(fname, mask, conn->case_sensitive)) continue; if (sysdir_entry) { @@ -4172,7 +4171,7 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, pstring fname; pstrcpy(fname,dname); - if(!mask_match(fname, mask, case_sensitive)) + if(!mask_match(fname, mask, conn->case_sensitive)) continue; error = ERRnoaccess; diff --git a/source/smbd/server.c b/source/smbd/server.c index 53d07fd905c..343a835be8a 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -545,6 +545,10 @@ static BOOL dump_core(void) DEBUG(0,("Dumping core in %s\n", dname)); + /* Ensure we don't have a signal handler for abort. */ +#ifdef SIGABRT + CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL); +#endif abort(); return(True); } @@ -845,12 +849,13 @@ void build_options(BOOL screen); /* Setup the main smbd so that we can get messages. */ claim_connection(NULL,"",0,True,FLAG_MSG_GENERAL|FLAG_MSG_SMBD); - /* - DO NOT ENABLE THIS TILL YOU COPE WITH KILLING THESE TASKS AND INETD - THIS *killed* LOTS OF BUILD FARM MACHINES. IT CREATED HUNDREDS OF - smbd PROCESSES THAT NEVER DIE - start_background_queue(); - */ + /* only start the background queue daemon if we are + running as a daemon -- bad things will happen if + smbd is launched via inetd and we fork a copy of + ourselves here */ + + if ( is_daemon ) + start_background_queue(); if (!open_sockets_smbd(is_daemon, interactive, ports)) exit(1); diff --git a/source/smbd/service.c b/source/smbd/service.c index 08b66482496..c74537c299e 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -21,12 +21,6 @@ #include "includes.h" extern struct timeval smb_last_time; -extern int case_default; -extern BOOL case_preserve; -extern BOOL short_case_preserve; -extern BOOL case_mangle; -extern BOOL case_sensitive; -extern BOOL use_mangled_map; extern userdom_struct current_user_info; @@ -62,13 +56,7 @@ BOOL set_current_service(connection_struct *conn,BOOL do_chdir) last_conn = conn; - case_default = lp_defaultcase(snum); - case_preserve = lp_preservecase(snum); - short_case_preserve = lp_shortpreservecase(snum); - case_mangle = lp_casemangle(snum); - case_sensitive = lp_casesensitive(snum); magic_char = lp_magicchar(snum); - use_mangled_map = (*lp_mangled_map(snum) ? True:False); return(True); } @@ -357,6 +345,12 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, conn->printer = (strncmp(dev,"LPT",3) == 0); conn->ipc = ((strncmp(dev,"IPC",3) == 0) || strequal(dev,"ADMIN$")); conn->dirptr = NULL; + + /* Case options for the share. */ + conn->case_sensitive = lp_casesensitive(snum); + conn->case_preserve = lp_preservecase(snum); + conn->short_case_preserve = lp_shortpreservecase(snum); + conn->veto_list = NULL; conn->hide_list = NULL; conn->veto_oplock_list = NULL; @@ -794,6 +788,9 @@ void close_cnum(connection_struct *conn, uint16 vuid) { DirCacheFlush(SNUM(conn)); + file_close_conn(conn); + dptr_closecnum(conn); + change_to_root_user(); DEBUG(IS_IPC(conn)?3:1, ("%s (%s) closed connection to service %s\n", @@ -805,9 +802,6 @@ void close_cnum(connection_struct *conn, uint16 vuid) yield_connection(conn, lp_servicename(SNUM(conn))); - file_close_conn(conn); - dptr_closecnum(conn); - /* make sure we leave the directory available for unmount */ vfs_ChDir(conn, "/"); @@ -832,3 +826,27 @@ void close_cnum(connection_struct *conn, uint16 vuid) conn_free(conn); } + +/**************************************************************************** + Remove stale printers +****************************************************************************/ + +void remove_stale_printers( void ) +{ + int snum, iNumServices, printersServiceNum; + const char *pname; + + iNumServices = lp_numservices(); + printersServiceNum = lp_servicenumber( PRINTERS_NAME); + for( snum = 0; snum < iNumServices; snum++) { + /* Never remove PRINTERS_NAME */ + if ( snum == printersServiceNum) + continue; + pname = lp_printername( snum); + /* Is snum a print service and still in the printing subsystem? */ + if ( lp_print_ok( snum) && !pcap_printername_ok( pname, NULL)) { + DEBUG( 3, ( "Removing printer: %s\n", pname)); + lp_killservice( snum); + } + } +} diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 902db2d2886..8a56478929f 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -150,7 +150,7 @@ static int reply_spnego_kerberos(connection_struct *conn, DATA_BLOB auth_data; DATA_BLOB ap_rep, ap_rep_wrapped, response; auth_serversupplied_info *server_info = NULL; - DATA_BLOB session_key; + DATA_BLOB session_key = data_blob(NULL, 0); uint8 tok_id[2]; BOOL foreign = False; DATA_BLOB nullblob = data_blob(NULL, 0); @@ -183,6 +183,7 @@ static int reply_spnego_kerberos(connection_struct *conn, if (!p) { DEBUG(3,("Doesn't look like a valid principal\n")); data_blob_free(&ap_rep); + data_blob_free(&session_key); SAFE_FREE(client); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } @@ -192,6 +193,7 @@ static int reply_spnego_kerberos(connection_struct *conn, DEBUG(3,("Ticket for foreign realm %s@%s\n", client, p+1)); if (!lp_allow_trusted_domains()) { data_blob_free(&ap_rep); + data_blob_free(&session_key); SAFE_FREE(client); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } @@ -249,6 +251,7 @@ static int reply_spnego_kerberos(connection_struct *conn, SAFE_FREE(user); SAFE_FREE(client); data_blob_free(&ap_rep); + data_blob_free(&session_key); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } @@ -263,6 +266,7 @@ static int reply_spnego_kerberos(connection_struct *conn, SAFE_FREE(user); SAFE_FREE(client); data_blob_free(&ap_rep); + data_blob_free(&session_key); return ERROR_NT(ret); } @@ -274,6 +278,8 @@ static int reply_spnego_kerberos(connection_struct *conn, } /* register_vuid keeps the server info */ + /* register_vuid takes ownership of session_key, no need to free after this. + A better interface would copy it.... */ sess_vuid = register_vuid(server_info, session_key, nullblob, client); SAFE_FREE(user); diff --git a/source/smbd/statcache.c b/source/smbd/statcache.c index d996f5e4938..5e78e9a4999 100644 --- a/source/smbd/statcache.c +++ b/source/smbd/statcache.c @@ -22,8 +22,6 @@ #include "includes.h" -extern BOOL case_sensitive; - /**************************************************************************** Stat cache code used in unix_convert. *****************************************************************************/ @@ -50,7 +48,7 @@ static hash_table stat_cache; * */ -void stat_cache_add( const char *full_orig_name, const char *orig_translated_path) +void stat_cache_add( const char *full_orig_name, const char *orig_translated_path, BOOL case_sensitive) { stat_cache_entry *scp; stat_cache_entry *found_scp; @@ -222,7 +220,7 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath, (name[1] == '.' && name[1] == '\0')))) return False; - if (case_sensitive) { + if (conn->case_sensitive) { chk_name = strdup(name); if (!chk_name) { DEBUG(0, ("stat_cache_lookup: strdup failed!\n")); diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 0c6026392c4..738d12e020f 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -24,7 +24,6 @@ #include "includes.h" extern int Protocol; -extern BOOL case_sensitive; extern int smb_read_error; extern fstring local_machine; extern int global_oplock_break; @@ -883,8 +882,8 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, pstrcpy(fname,dname); - if(!(got_match = *got_exact_match = exact_match(fname, mask, case_sensitive))) - got_match = mask_match(fname, mask, case_sensitive); + if(!(got_match = *got_exact_match = exact_match(fname, mask, conn->case_sensitive))) + got_match = mask_match(fname, mask, conn->case_sensitive); if(!got_match && !mangle_is_8_3(fname, False)) { @@ -898,8 +897,8 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, pstring newname; pstrcpy( newname, fname); mangle_map( newname, True, False, SNUM(conn)); - if(!(got_match = *got_exact_match = exact_match(newname, mask, case_sensitive))) - got_match = mask_match(newname, mask, case_sensitive); + if(!(got_match = *got_exact_match = exact_match(newname, mask, conn->case_sensitive))) + got_match = mask_match(newname, mask, conn->case_sensitive); } if(got_match) { @@ -1433,7 +1432,7 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", a different TRANS2 call. */ DEBUG(8,("dirpath=<%s> dontdescend=<%s>\n", conn->dirpath,lp_dontdescend(SNUM(conn)))); - if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),case_sensitive)) + if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),conn->case_sensitive)) dont_descend = True; p = pdata; @@ -1633,7 +1632,7 @@ resume_key = %d resume name = %s continue=%d level = %d\n", a different TRANS2 call. */ DEBUG(8,("dirpath=<%s> dontdescend=<%s>\n",conn->dirpath,lp_dontdescend(SNUM(conn)))); - if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),case_sensitive)) + if (in_list(conn->dirpath,lp_dontdescend(SNUM(conn)),conn->case_sensitive)) dont_descend = True; p = pdata; @@ -2303,7 +2302,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath); } - delete_pending = fsp->directory_delete_on_close; + delete_pending = fsp->is_directory ? fsp->directory_delete_on_close : 0; } else { /* * Original code - this is an open file. @@ -2401,7 +2400,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, if (lp_dos_filetime_resolution(SNUM(conn))) { c_time &= ~1; sbuf.st_atime &= ~1; - sbuf.st_mtime &= ~1; + sbuf.st_ctime &= ~1; sbuf.st_mtime &= ~1; } @@ -2863,66 +2862,6 @@ NTSTATUS set_delete_on_close_over_all(files_struct *fsp, BOOL delete_on_close) } /**************************************************************************** - Returns true if this pathname is within the share, and thus safe. -****************************************************************************/ - -static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in, char *link_dest_out) -{ -#ifdef PATH_MAX - char resolved_name[PATH_MAX+1]; -#else - pstring resolved_name; -#endif - fstring last_component; - pstring link_dest; - pstring link_test; - char *p; - BOOL bad_path = False; - SMB_STRUCT_STAT sbuf; - - pstrcpy(link_dest, link_dest_in); - unix_convert(link_dest,conn,0,&bad_path,&sbuf); - - /* Store the UNIX converted path. */ - pstrcpy(link_dest_out, link_dest); - - p = strrchr(link_dest, '/'); - if (p) { - fstrcpy(last_component, p+1); - *p = '\0'; - } else { - fstrcpy(last_component, link_dest); - pstrcpy(link_dest, "./"); - } - - if (SMB_VFS_REALPATH(conn,link_dest,resolved_name) == NULL) - return -1; - - pstrcpy(link_dest, resolved_name); - pstrcat(link_dest, "/"); - pstrcat(link_dest, last_component); - - if (*link_dest != '/') { - /* Relative path. */ - pstrcpy(link_test, conn->connectpath); - pstrcat(link_test, "/"); - pstrcat(link_test, link_dest); - } else { - pstrcpy(link_test, link_dest); - } - - /* - * Check if the link is within the share. - */ - - if (strncmp(conn->connectpath, link_test, strlen(conn->connectpath))) { - errno = EACCES; - return -1; - } - return 0; -} - -/**************************************************************************** Set a hard link (called by UNIX extensions and by NT rename with HARD link code. ****************************************************************************/ @@ -2962,6 +2901,10 @@ NTSTATUS hardlink_internals(connection_struct *conn, char *oldname, char *newnam return NT_STATUS_OBJECT_NAME_NOT_FOUND; } + if (!check_name(oldname,conn)) { + return NT_STATUS_ACCESS_DENIED; + } + rcdest = unix_convert(newname,conn,last_component_newname,&bad_path_newname,&sbuf2); if (!rcdest && bad_path_newname) { return NT_STATUS_OBJECT_PATH_NOT_FOUND; @@ -2979,12 +2922,17 @@ NTSTATUS hardlink_internals(connection_struct *conn, char *oldname, char *newnam return NT_STATUS_OBJECT_NAME_COLLISION; } + if (!check_name(newname,conn)) { + return NT_STATUS_ACCESS_DENIED; + } + /* No links from a directory. */ if (S_ISDIR(sbuf1.st_mode)) { return NT_STATUS_FILE_IS_A_DIRECTORY; } - if (ensure_link_is_safe(conn, oldname, oldname) != 0) + /* Ensure this is within the share. */ + if (!reduce_name(conn, oldname) != 0) return NT_STATUS_ACCESS_DENIED; DEBUG(10,("hardlink_internals: doing hard link %s -> %s\n", newname, oldname )); @@ -3482,7 +3430,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", case SMB_SET_FILE_UNIX_LINK: { - pstring oldname; + pstring link_target; char *newname = fname; /* Set a symbolic link. */ @@ -3491,18 +3439,37 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", if (!lp_symlinks(SNUM(conn))) return(ERROR_DOS(ERRDOS,ERRnoaccess)); - srvstr_get_path(inbuf, oldname, pdata, sizeof(oldname), -1, STR_TERMINATE, &status); - if (!NT_STATUS_IS_OK(status)) { - return ERROR_NT(status); - } + srvstr_pull(inbuf, link_target, pdata, sizeof(link_target), -1, STR_TERMINATE); - if (ensure_link_is_safe(conn, oldname, oldname) != 0) - return(UNIXERROR(ERRDOS,ERRnoaccess)); + /* !widelinks forces the target path to be within the share. */ + /* This means we can interpret the target as a pathname. */ + if (!lp_widelinks(SNUM(conn))) { + pstring rel_name; + char *last_dirp = NULL; + + unix_format(link_target); + if (*link_target == '/') { + /* No absolute paths allowed. */ + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } + pstrcpy(rel_name, newname); + last_dirp = strrchr_m(rel_name, '/'); + if (last_dirp) { + last_dirp[1] = '\0'; + } else { + pstrcpy(rel_name, "./"); + } + pstrcat(rel_name, link_target); + + if (!check_name(rel_name, conn)) { + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } + } DEBUG(10,("call_trans2setfilepathinfo: SMB_SET_FILE_UNIX_LINK doing symlink %s -> %s\n", - fname, oldname )); + fname, link_target )); - if (SMB_VFS_SYMLINK(conn,oldname,newname) != 0) + if (SMB_VFS_SYMLINK(conn,link_target,newname) != 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); SSVAL(params,0,0); send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); diff --git a/source/smbd/uid.c b/source/smbd/uid.c index 3859298055b..e1864c74caa 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -189,20 +189,26 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) snum = SNUM(conn); + if ((vuser) && !check_user_ok(conn, vuser, snum)) { + DEBUG(2,("change_to_user: SMB user %s (unix user %s, vuid %d) not permitted access to share %s.\n", + vuser->user.smb_name, vuser->user.unix_name, vuid, lp_servicename(snum))); + return False; + } + if (conn->force_user) /* security = share sets this too */ { uid = conn->uid; gid = conn->gid; current_user.groups = conn->groups; current_user.ngroups = conn->ngroups; token = conn->nt_user_token; - } else if ((vuser) && check_user_ok(conn, vuser, snum)) { + } else if (vuser) { uid = conn->admin_user ? 0 : vuser->uid; gid = vuser->gid; current_user.ngroups = vuser->n_groups; current_user.groups = vuser->groups; token = vuser->nt_user_token; } else { - DEBUG(2,("change_to_user: Invalid vuid used %d or vuid not permitted access to share.\n",vuid)); + DEBUG(2,("change_to_user: Invalid vuid used %d in accessing share %s.\n",vuid, lp_servicename(snum) )); return False; } diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index 533220e7dfb..a415e0470e2 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -784,168 +784,127 @@ char *vfs_GetWd(connection_struct *conn, char *path) return (path); } - -/* check if the file 'nmae' is a symlink, in that case check that it point to - a file that reside under the 'dir' tree */ - -static BOOL readlink_check(connection_struct *conn, const char *dir, char *name) -{ - BOOL ret = True; - pstring flink; - pstring cleanlink; - pstring savedir; - pstring realdir; - size_t reallen; - - if (!vfs_GetWd(conn, savedir)) { - DEBUG(0,("couldn't vfs_GetWd for %s %s\n", name, dir)); - return False; - } - - if (vfs_ChDir(conn, dir) != 0) { - DEBUG(0,("couldn't vfs_ChDir to %s\n", dir)); - return False; - } - - if (!vfs_GetWd(conn, realdir)) { - DEBUG(0,("couldn't vfs_GetWd for %s\n", dir)); - vfs_ChDir(conn, savedir); - return(False); - } - - reallen = strlen(realdir); - if (realdir[reallen -1] == '/') { - reallen--; - realdir[reallen] = 0; - } - - if (SMB_VFS_READLINK(conn, name, flink, sizeof(pstring) -1) != -1) { - DEBUG(3,("readlink_check: file path name %s is a symlink\nChecking it's path\n", name)); - if (*flink == '/') { - pstrcpy(cleanlink, flink); - } else { - pstrcpy(cleanlink, realdir); - pstrcat(cleanlink, "/"); - pstrcat(cleanlink, flink); - } - unix_clean_name(cleanlink); - - if (strncmp(cleanlink, realdir, reallen) != 0) { - DEBUG(2,("Bad access attempt? s=%s dir=%s newname=%s l=%d\n", name, realdir, cleanlink, (int)reallen)); - ret = False; - } - } - - vfs_ChDir(conn, savedir); - - return ret; -} - /******************************************************************* Reduce a file name, removing .. elements and checking that - it is below dir in the heirachy. This uses vfs_GetWd() and so must be run - on the system that has the referenced file system. + it is below dir in the heirachy. This uses realpath. ********************************************************************/ -BOOL reduce_name(connection_struct *conn, pstring s, const char *dir) +BOOL reduce_name(connection_struct *conn, pstring fname) { -#ifndef REDUCE_PATHS - return True; +#ifdef REALPATH_TAKES_NULL + BOOL free_resolved_name = True; #else - pstring dir2; - pstring wd; - pstring base_name; - pstring newname; - char *p=NULL; - BOOL relative = (*s != '/'); - - *dir2 = *wd = *base_name = *newname = 0; - - DEBUG(3,("reduce_name [%s] [%s]\n",s,dir)); - - /* We know there are no double slashes as this comes from srvstr_get_path(). - and has gone through check_path_syntax(). JRA */ +#ifdef PATH_MAX + char resolved_name_buf[PATH_MAX+1]; +#else + pstring resolved_name_buf; +#endif + BOOL free_resolved_name = False; +#endif + char *resolved_name = NULL; + size_t con_path_len = strlen(conn->connectpath); + char *p = NULL; - pstrcpy(base_name,s); - p = strrchr_m(base_name,'/'); + DEBUG(3,("reduce_name [%s] [%s]\n", fname, conn->connectpath)); - if (!p) - return readlink_check(conn, dir, s); +#ifdef REALPATH_TAKES_NULL + resolved_name = SMB_VFS_REALPATH(conn,fname,NULL); +#else + resolved_name = SMB_VFS_REALPATH(conn,fname,resolved_name_buf); +#endif - if (!vfs_GetWd(conn,wd)) { - DEBUG(0,("couldn't vfs_GetWd for %s %s\n",s,dir)); - return(False); - } + if (!resolved_name) { + switch (errno) { + case ENOTDIR: + DEBUG(3,("reduce_name: Component not a directory in getting realpath for %s\n", fname)); + return False; + case ENOENT: + { + pstring tmp_fname; + fstring last_component; + /* Last component didn't exist. Remove it and try and canonicalise the directory. */ + + pstrcpy(tmp_fname, fname); + p = strrchr_m(tmp_fname, '/'); + if (p) { + *p++ = '\0'; + fstrcpy(last_component, p); + } else { + fstrcpy(last_component, tmp_fname); + pstrcpy(tmp_fname, "."); + } - if (vfs_ChDir(conn,dir) != 0) { - DEBUG(0,("couldn't vfs_ChDir to %s\n",dir)); - return(False); +#ifdef REALPATH_TAKES_NULL + resolved_name = SMB_VFS_REALPATH(conn,tmp_fname,NULL); +#else + resolved_name = SMB_VFS_REALPATH(conn,tmp_fname,resolved_name_buf); +#endif + if (!resolved_name) { + DEBUG(3,("reduce_name: couldn't get realpath for %s\n", fname)); + return False; + } + pstrcpy(tmp_fname, resolved_name); + pstrcat(tmp_fname, "/"); + pstrcat(tmp_fname, last_component); +#ifdef REALPATH_TAKES_NULL + SAFE_FREE(resolved_name); + resolved_name = strdup(tmp_fname); + if (!resolved_name) { + DEBUG(0,("reduce_name: malloc fail for %s\n", tmp_fname)); + return False; + } +#else +#ifdef PATH_MAX + safe_strcpy(resolved_name_buf, tmp_fname, PATH_MAX); +#else + pstrcpy(pstring resolved_name_buf, tmp_fname); +#endif + resolved_name = resolved_name_buf; +#endif + break; + } + default: + DEBUG(1,("reduce_name: couldn't get realpath for %s\n", fname)); + return False; + } } - if (!vfs_GetWd(conn,dir2)) { - DEBUG(0,("couldn't vfs_GetWd for %s\n",dir)); - vfs_ChDir(conn,wd); - return(False); - } + DEBUG(10,("reduce_name realpath [%s] -> [%s]\n", fname, resolved_name)); - if (p && (p != base_name)) { - *p = 0; - if (strcmp(p+1,".")==0) - p[1]=0; - if (strcmp(p+1,"..")==0) - *p = '/'; + if (*resolved_name != '/') { + DEBUG(0,("reduce_name: realpath doesn't return absolute paths !\n")); + if (free_resolved_name) + SAFE_FREE(resolved_name); + return False; } - if (vfs_ChDir(conn,base_name) != 0) { - vfs_ChDir(conn,wd); - DEBUG(3,("couldn't vfs_ChDir for %s %s basename=%s\n",s,dir,base_name)); - return(False); + if (strncmp(conn->connectpath, resolved_name, con_path_len) != 0) { + DEBUG(2, ("reduce_name: Bad access attemt: %s is a symlink outside the share path", fname)); + if (free_resolved_name) + SAFE_FREE(resolved_name); + return False; } - if (!vfs_GetWd(conn,newname)) { - vfs_ChDir(conn,wd); - DEBUG(2,("couldn't get vfs_GetWd for %s %s\n",s,base_name)); - return(False); + /* Move path the connect path to the last part of the filename. */ + p = resolved_name + con_path_len; + if (*p == '/') { + p++; } - if (p && (p != base_name)) { - pstrcat(newname,"/"); - pstrcat(newname,p+1); + if (!*p) { + pstrcpy(resolved_name, "."); + p = resolved_name; } - { - size_t l = strlen(dir2); - char *last_slash = strrchr_m(dir2, '/'); - - if (last_slash && (last_slash[1] == '\0')) - l--; - - if (strncmp(newname,dir2,l) != 0) { - vfs_ChDir(conn,wd); - DEBUG(2,("Bad access attempt: s=%s dir=%s newname=%s l=%d\n",s,dir2,newname,(int)l)); - return(False); - } - - if (!readlink_check(conn, dir, newname)) { - DEBUG(2, ("Bad access attemt: %s is a symlink outside the share path", s)); - return(False); - } - - if (relative) { - if (newname[l] == '/') - pstrcpy(s,newname + l + 1); - else - pstrcpy(s,newname+l); - } else - pstrcpy(s,newname); + if (!lp_symlinks(SNUM(conn)) && (strcmp(fname, p)!=0)) { + DEBUG(3,("reduce_name: denied: file path name %s is a symlink\n",fname)); + if (free_resolved_name) + SAFE_FREE(resolved_name); + return False; } - vfs_ChDir(conn,wd); - - if (strlen(s) == 0) - pstrcpy(s,"./"); - - DEBUG(3,("reduced to %s\n",s)); + DEBUG(3,("reduce_name: %s reduced to %s\n", fname, p)); + if (free_resolved_name) + SAFE_FREE(resolved_name); return(True); -#endif } diff --git a/source/utils/ntlm_auth_diagnostics.c b/source/utils/ntlm_auth_diagnostics.c index 40c627588de..3489dbca7c8 100644 --- a/source/utils/ntlm_auth_diagnostics.c +++ b/source/utils/ntlm_auth_diagnostics.c @@ -580,7 +580,8 @@ static const struct ntlm_tests { {test_plaintext_lm_broken, "Plaintext LM broken"}, {test_plaintext_nt_broken, "Plaintext NT broken"}, {test_plaintext_nt_only, "Plaintext NT only"}, - {test_plaintext_lm_only, "Plaintext LM only"} + {test_plaintext_lm_only, "Plaintext LM only"}, + {NULL, NULL} }; BOOL diagnose_ntlm_auth(void) |