--- autofs-4.1.4+debian.orig/debian/autofs-ldap.README.Debian +++ autofs-4.1.4+debian/debian/autofs-ldap.README.Debian @@ -0,0 +1,15 @@ +automount master map in LDAP +---------------------------- + +Currently I simply ship what upstream (ie essentially RedHat) is packaging. +It has been pointed out that autofs_ldap_master has issues, a solution entirely +in the init script as we had bevore (using ldapsearch or such) would be +preferred. Sadly, since I can't test it, I wasn't able to "port" our old patches +to the new autofs init script. + +Also, there seem to be at least two different schemes in use for this purpose. + +Since I have hardly any knowledge on LDAP and can't test LDAP stuff neither, +I'd appreciate help on this matter. + + -- Arthur Korn Mon, 18 Oct 2004 14:26:08 +0200 --- autofs-4.1.4+debian.orig/debian/auto.master.md5sum +++ autofs-4.1.4+debian/debian/auto.master.md5sum @@ -0,0 +1 @@ +a0e3fc444b0824664ffc04826e2f3c97 build-tree/autofs-4.1.4_beta2/samples/auto.master --- autofs-4.1.4+debian.orig/debian/autofs.default.md5sum +++ autofs-4.1.4+debian/debian/autofs.default.md5sum @@ -0,0 +1 @@ +424c4415a458ca32a56e88f847a80690 debian/autofs.default --- autofs-4.1.4+debian.orig/debian/autofs.postinst +++ autofs-4.1.4+debian/debian/autofs.postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +[ -f /etc/default/autofs ] && . /etc/default/autofs + +if [ "$1" = "configure" ]; then + ucf /usr/share/autofs/conffiles/auto.master /etc/auto.master + ucf /usr/share/autofs/conffiles/auto.misc /etc/auto.misc + ucf /usr/share/autofs/conffiles/auto.net /etc/auto.net + ucf /usr/share/autofs/conffiles/auto.smb /etc/auto.smb + ucf /usr/share/autofs/conffiles/autofs.default /etc/default/autofs +fi + +if [ -x "/etc/init.d/autofs" ]; then + update-rc.d autofs defaults 19 > /dev/null +fi + +mkdirs() { + if [ ! -d /var/autofs ]; then + mkdir /var/autofs + fi + if [ ! -d /var/autofs/misc ]; then + mkdir /var/autofs/misc + fi +} +if [ "$1" = "configure" ]; then + if [ -z "$2" -o "$2" = "" ]; then + # + # First time this has been installed on this machine, + # or the pkg was previously purged. + # + mkdirs + if [ -x "/etc/init.d/autofs" ]; then + /etc/init.d/autofs start + fi + else + # upgrade + if [ -x "/etc/init.d/autofs" ]; then + if [ -z "$AUTOFS_DONT_RESTART_ON_UPGRADES" ]; then + invoke-rc.d autofs restart + fi + fi + fi +fi + +#DEBHELPER# --- autofs-4.1.4+debian.orig/debian/rules +++ autofs-4.1.4+debian/debian/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f + +.PHONY: binary binary-arch binary-indep clean checkroot + +export CFLAGS=-Wall -g -DLDAP_DEPRECATED + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS+=-O0 +else + CFLAGS+=-O2 +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIPARGS= --no-act +endif + +SHELL=/bin/bash + +build: build.stamp +build.stamp: configure + dh_testdir + $(MAKE) + touch $@ + +configure: configure.stamp +configure.stamp: + dh_testdir + dpatch apply-all + ./configure --prefix=/usr --mandir=/usr/share/man \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --disable-mount-locking + touch $@ + +clean: + dh_testdir + rm -f *.stamp + $(MAKE) clean + rm -f config.log config.status Makefile.conf include/config.h + dpatch deapply-all + dh_clean debian/init + +binary: binary-indep binary-arch +binary-indep: +binary-arch: build + dh_testroot + dh_testdir + dh_clean + + dh_installdirs + + $(MAKE) install INSTALLROOT=$(CURDIR)/debian/autofs + + dh_installdirs etc/apm/event.d + cp -a debian/event.d debian/autofs/etc/apm/event.d/autofs + chmod +x debian/autofs/etc/apm/event.d/autofs + + # Do the final stuff + dh_movefiles --sourcedir=debian/autofs + dh_installdirs --package=autofs-ldap etc/ldap/schema + cp -a samples/autofs.schema debian/autofs-ldap/etc/ldap/schema + cp -a samples/rc.autofs debian/init + dh_installdocs -X README.options -X README.patches + dh_installman + dh_installchangelogs CHANGELOG + dh_installexamples + dh_installmodules + dh_installinit --noscripts -- defaults 20 + + # Move all files that will be managed by ucf + dh_installdirs usr/share/autofs/conffiles + mv debian/autofs/etc/auto.{master,misc,net,smb} debian/autofs/usr/share/autofs/conffiles/ + mv debian/autofs/etc/default/autofs debian/autofs/usr/share/autofs/conffiles/autofs.default + cp -a debian/auto.{master,misc,net,smb}.md5sum debian/autofs/usr/share/autofs/conffiles/ + cp -a debian/autofs.default.md5sum debian/autofs/usr/share/autofs/conffiles/ + + dh_link + dh_strip $(STRIPARGS) + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb --- autofs-4.1.4+debian.orig/debian/autofs.postrm +++ autofs-4.1.4+debian/debian/autofs.postrm @@ -0,0 +1,23 @@ +#!/bin/sh + +#DEBHELPER# +if [ "$1" = "purge" ] ; then + update-rc.d autofs remove >/dev/null + if [ -d /var/autofs/misc ]; then + rmdir /var/autofs/misc + fi + if [ -d /var/autofs ]; then + rmdir --ignore-fail-on-non-empty /var/autofs + fi + + for FILE in /etc/auto.master /etc/auto.misc /etc/auto.net /etc/auto.smb /etc/default/autofs; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f $FILE$ext + done + rm -f $FILE + if [ -x /usr/bin/ucf ]; then + ucf --purge $FILE + fi + done +fi --- autofs-4.1.4+debian.orig/debian/control +++ autofs-4.1.4+debian/debian/control @@ -0,0 +1,60 @@ +Source: autofs +Section: utils +Priority: extra +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Jan Christoph Nordholz +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5), libhesiod-dev, libldap-dev, autoconf, dpatch + +Package: autofs +Architecture: any +Depends: ${shlibs:Depends}, ucf +Recommends: nfs-common, module-init-tools +Conflicts: autofs +Description: kernel-based automounter for Linux + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS + style automounter under Linux. Automounter version 4 + (autofs4) has to be enabled when compiling the kernel. + Debian packaged kernels have it enabled. + +Package: autofs-hesiod +Architecture: any +Depends: ${shlibs:Depends}, autofs +Conflicts: autofs-hesiod +Description: Hesiod map support for autofs + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS style + automounter under Linux. Automounter version 4 (autofs4) has to be + enabled when compiling the kernel. Debian packaged kernels have it + enabled. + . + This package provides support for Hesiod filsys entries within autofs. + These entries are used extensively at MIT, and may also be used at other + sites. + +Package: autofs-ldap +Architecture: any +Depends: ${shlibs:Depends}, autofs, ldap-utils +Conflicts: autofs-ldap +Description: LDAP map support for autofs + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS style + automounter under Linux. Automounter version 4 (autofs4) has to be + enabled when compiling the kernel. Debian packaged kernels have it + enabled. + . + This package provides support for LDAP queries in autofs so that + you can use automount maps stored on an LDAP server. --- autofs-4.1.4+debian.orig/debian/autofs.prerm +++ autofs-4.1.4+debian/debian/autofs.prerm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +[ -f /etc/default/autofs ] && . /etc/default/autofs + +if [ "$1" = "failed-upgrade" ]; then + set +e +fi + +if [ -x "/etc/init.d/autofs" ]; then + if [ "$1" = "remove" -o -z "$AUTOFS_DONT_RESTART_ON_UPGRADES" ]; then + invoke-rc.d autofs stop + fi +fi + +#DEBHELPER# +exit 0 --- autofs-4.1.4+debian.orig/debian/changelog +++ autofs-4.1.4+debian/debian/changelog @@ -0,0 +1,1158 @@ +autofs (4.1.4+debian-2.1ubuntu1) hardy; urgency=low + + * Fixed auto.net to deal with cases where a host exports the + same directory several times (with different options, for example). + The patch was added to debain/patches (LP: #111612). + * Ubuntu core maintainer munge. + + -- Morten Kjeldgaard Wed, 09 Apr 2008 16:47:39 +0200 + +autofs (4.1.4+debian-2.1) unstable; urgency=low + + * Non-maintainer upload. + * High-urgency upload for RC bugfix. + * Add -DLDAP_DEPRECATED to CFLAGS, to fix compatibility with OpenLDAP + 2.4 on 64-bit architectures. Closes: #463419. + + -- Steve Langasek Sat, 08 Mar 2008 01:36:09 -0800 + +autofs (4.1.4+debian-2) unstable; urgency=low + + * Add virtual package autofs to provide for smooth transitions + between the upcoming experimental autofs5 package and this one. + * Drop conflict with an ancient samba version - the PTS doesn't + even go back that far. + * Add a short explanation of the expected output of a program map + to autofs.5. Closes: #406700. + * Add an LSB header to the init script. + * Add Recommends: module-init-tools. Closes: #416597. + + -- Jan Christoph Nordholz Thu, 28 Jun 2007 23:28:49 +0200 + +autofs (4.1.4+debian-1) unstable; urgency=low + + * New maintainer, thanks to Steinar for his work! Closes: #404073. + * Migrate patch system to dpatch and clean up the build system. + This requires the upload of a new upstream tarball, though the + actual contents (in terms of code) haven't changed. + * Add watch file. + * New patches: + * 080_auto_smb_probe_credentials + Introduce a default location for samba credential files. + Slightly modified version of the patch suggested by Ashar Voultoiz, + thanks! Closes: #346314. + Add an accompanying documentation paragraph to README.Debian. + * 081_auto_net_showmount_quotes + Make auto.net abort properly if the showmount binary is not + available (as we don't depend on nfs-common, we have to cope with + such cases). Thanks to Yaroslav Halchenko! Closes: #400593. + * 082_samples_makefile_typo + Minor typo fix. + + -- Jan Christoph Nordholz Sun, 07 Jan 2007 01:12:29 +0100 + +autofs (4.1.4-13) unstable; urgency=low + + * Remove 077_fix_nfs_submounts_with_2_6_18 in favor of + 077_dont_create_remote_dirs, which is upstream's version of the fix and + solves the problem properly. (Closes: #396191) + * 078_locking_fix_1: Patch from upstream we should have included ages ago, + fixes some locking issues. + * 079_no_unlink_upstream: Patch from upstream, adds a few safeguards to make + sure automount doesn't accidentially unlink a file when it wants to remove + a directory. (This should normally never happen, but extra safeguards are + always a good idea.) + + -- Steinar H. Gunderson Fri, 10 Nov 2006 15:54:00 +0100 + +autofs (4.1.4-12) unstable; urgency=medium + + * 077_fix_nfs_submounts_with_2_6_18: New patch from Michael Gernoth; fixes + issues with mounting read-only NFS submounts with 2.6.18 and newer + kernels. (Closes: #393663) + * Set SHELL=/bin/bash in debian/rules, as we use bashisms. (Closes: #379578) + + -- Steinar H. Gunderson Wed, 25 Oct 2006 23:53:50 +0200 + +autofs (4.1.4-11) unstable; urgency=low + + * 072_fix_auto_net_sort: Update auto.net with regard to new sort syntax; + patch from Shawn Willden. (Closes: #339132) + * 073_configurable_locking (and giving --disable-automount-locking to + configure): Disable autofs' locking, since Debian's mount should already + do the appropriate locking itself; hopefully this fixes some of the + deadlock bugs. (Closes: #316378, #365208) + * 074_auto_smb_cifs: New patch adapted from upstream, uses cifs instead of + smbfs for auto.smb. (Closes: #374745) + * 075_auto_net_escape_hash: New patch from upstream, escapes the '#' + character to avoid it being treated as a comment. + * 076_ldap_deprecated: New patch from upstream, fixes a segfault when using + deprecated LDAP calls on amd64. + * Fix typo in README.Debian; patch from Kobayashi Noritada. + (Closes: #363457) + + -- Steinar H. Gunderson Sat, 1 Jul 2006 12:25:42 +0200 + +autofs (4.1.4-10) unstable; urgency=low + + * 070_fix_regex_typo: New patch from Olleg Samoylov; fixes a typo (+ that + should have been escaped in a regex). (Closes: #348519) + * 071_fix_ldap_mounts: New patch from the Ubuntu packages; fixes problems + with LDAP mounts being incorrectly detected as program mounts. + * Bump Standards-version to 3.7.2 (no changes needed). + * Use invoke-rc.d in postinst and prerm instead of running /etc/init.d + scripts directly. + + -- Steinar H. Gunderson Mon, 15 May 2006 03:33:27 +0200 + +autofs (4.1.4-9) unstable; urgency=low + + * 069_support_spaces_in_smb_share_names: New patch from Thomas Adamcik; + support spaces in SMB share names. (Closes: #353921) + * Update debhelper compatibility level to v5 (no changes needed, except + bumping the build-dependency on debhelper). + * Remove a bashism in the postrm (fixes a lintian warning). + * Updated FSF's postal address in the debian/copyright file. + + -- Steinar H. Gunderson Tue, 21 Feb 2006 23:48:43 +0100 + +autofs (4.1.4-8) unstable; urgency=low + + * Added a debian/compat file instead of setting DH_COMPAT. + * When purging, check if /usr/bin/ucf exists, and don't use it if it + doesn't. (Closes: #330556) + * Ship .md5sum files for ucf with the md5sums from the conffiles in sarge, + so the user won't be asked by ucf on the initial upgrade from sarge to + an ucf-enabled version. (Closes: #331688) + + -- Steinar H. Gunderson Thu, 6 Oct 2005 14:42:32 +0200 + +autofs (4.1.4-7) unstable; urgency=low + + * Remove lots of old cruft for upgrading from various versions between woody + and sarge, also removing our dependency on debconf. + + -- Steinar H. Gunderson Fri, 5 Aug 2005 01:01:51 +0200 + +autofs (4.1.4-6) unstable; urgency=low + + * 065_fix_master_map_in_ldap: Changed patch: Don't export LDAPURI/LDAPBASE + if they aren't set, patch from Rik Theys. + * Include Vietnamese translation of debconf templates, by Clytie Siddall. + (Closes: #313131) + * 068_fix_invalid_rpcgen_code: New patch, do odd sed tricks around + libc6-dev bug #315198, which causes FTBFS with gcc-4.0. (Closes: #317519) + (Temporary fix until glibc 2.3.5-1 hits unstable, of course.) + * Bump Standards-Version to 3.6.2.0 (no changes needed). + + -- Steinar H. Gunderson Sat, 9 Jul 2005 12:14:14 +0200 + +autofs (4.1.4-5) unstable; urgency=low + + * 067_ldap_no_first_message: New patch from upstream, turns a non-critical + error into a warning. (Closes: #315465) + + -- Steinar H. Gunderson Sat, 2 Jul 2005 20:51:01 +0200 + +autofs (4.1.4-4) unstable; urgency=low + + * 066_canonicalise_mount_points: New patch, from Stuart Caie and + Francesco Paolo Lovergine: Expand any symlinks in the mount point, to + make sure unmounting works correctly. (Closes: #263757, #278076) + * 067_allow_disabling_bind_mounts: New patch, adds an option "symlink" + to NFS mounts to signal that any bind mount is to be replaced with a + symlink instead. (Closes: #128171) + * Make autofs start at level 19 instead of level 20 during boot, to make + sure if comes before other dæmons that might rely on it. (Closes: #252114) + + -- Steinar H. Gunderson Sat, 11 Jun 2005 02:53:17 +0200 + +autofs (4.1.4-3) unstable; urgency=low + + * 065_fix_master_map_in_ldap: Fix problems where auto.master is in LDAP, + patch from Christopher Huhn. (Closes: #306829) + + -- Steinar H. Gunderson Fri, 10 Jun 2005 00:52:28 +0200 + +autofs (4.1.4-2) unstable; urgency=low + + * Support options on "+"-included NIS maps in auto.master. + (Closes: #278229, #280809) + + -- Steinar H. Gunderson Fri, 10 Jun 2005 00:30:42 +0200 + +autofs (4.1.4-1) unstable; urgency=low + + * New upstream version. Again obsoletes most of the local patches. + (Closes: #312526) + * Update debian/script/vars to reflect the new upstream version. + * 060_non_replicated_ping: Updated with new version from upstream, matches + new upstream version. + * 061_multi_parse_fix: New patch from upstream, fixes parsing of + multi-mounts. + * 063_misc_fixes: New patch from upstream, fixes various small leaks and + problems. + * 020_auto_net_path_sortlocale_mountoptions: Removed rsize and wsize + overrides, as they are obsolete now. (Closes: #304226) + * Use ucf for /etc/auto.{master,net,misc} and /etc/default/autofs. + (Closes: #280109) + * Include Czech translation of debconf templates, by Jakub Kasparec. + (Closes: #312147) + + -- Steinar H. Gunderson Thu, 9 Jun 2005 12:58:43 +0200 + +autofs (4.1.3+4.1.4beta2-10) unstable; urgency=medium + + * 062_fix_memory_leak: Fix a memory leak in 060_non_replicated_ping. + + -- Steinar H. Gunderson Fri, 13 May 2005 13:39:52 +0200 + +autofs (4.1.3+4.1.4beta2-9) unstable; urgency=medium + + * One more upload for sarge, the last one didn't do it. urgency=medium as + last time. + * 061_replicated_server: New patch, another backport from autofs 4.1.4 final + by Daniel Andre Vaquero (thanks!). Fixes more problems with replicated + hosts. (Really Closes: #297359) + + -- Steinar H. Gunderson Fri, 13 May 2005 00:01:36 +0200 + +autofs (4.1.3+4.1.4beta2-8) unstable; urgency=medium + + * Last upload for sarge, with one last patch. urgency=medium as requested + by the release team. + * 060_non_replicated_ping: New patch, backport from autofs 4.1.4 final by + Daniel Andre Vaquero. Fixes problems with NFS mounts failing, and + replicated hosts not working. (Closes: #297359, #304245) + + -- Steinar H. Gunderson Wed, 11 May 2005 13:38:41 +0200 + +autofs (4.1.3+4.1.4beta2-7) unstable; urgency=low + + * Remove join_lines script, it is no longer relevant. + * Remove spare patches 043_nsswitch_and_auto.master_in_ldap and + 044_handle_ldif_continued_lines_in_init_script from source distribution, + they are no longer relevant. + * Add NEWS.Debian file, documenting that the default master map is now + empty. (Closes: #277444, #280264, #279539) + * 059_fix_underscoretodot_handling: New patch, fix checking of + $UNDERSCORETODOT in the init script. Thanks to Ladislav Dobias for the bug + report and the patch. (Closes: #301358) + + -- Steinar H. Gunderson Sat, 2 Apr 2005 14:29:06 +0200 + +autofs (4.1.3+4.1.4beta2-6) unstable; urgency=high + + * Still more bugfixes to reach sarge. Still urgency=high as I'm afraid + britney will miss the urgency otherwise. + * New Debconf template translations: + * Japanese, thanks to OHURO Makato. (Closes: #296685) + * French, thanks to Jean-Luc Coulon. (Closes: #297013) + * Brazilian Portugese, thanks to Andre Luis Lopes. (Closes: #297046) + * 058_handle_noeol_in_auto_master: Insert a newline at the end of the read + auto.master, to handle auto.master files without a trailing newline. + (Closes: #298649) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 17:57:00 +0200 + +autofs (4.1.3+4.1.4beta2-5) unstable; urgency=high + + * Rushed extra-release right after beta2-4 to get some last-minute + bugfixes into sarge. (Note to self: dcut rm 'autofs*', not dcut rm + 'autofs\*'.) + * 055_stop_on_name_not_inode: Stop on --name automount instead of + --exec $DAEMON, to (hopefully) get rid of the upgrade problems once + and for all. Thanks to Adam Conrad for suggesting the fix. + * 056_auto_net_use_bash_not_sh, 057_auto_smb_use_bash_not_sh: New patches, + use #!/bin/bash in auto.net and auto.smb, as they contain bashisms. + (Closes: #295723, #300092) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 16:26:17 +0200 + +autofs (4.1.3+4.1.4beta2-4) unstable; urgency=high + + * Urgency=high, fixes RC-bugs. + * 054_no_set_e_in_init_script: New patch, back down on "set -e" in the + init.d script, which caused failures at lot of different unexpected + points. (Closes: #300703, #295480, #299298) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 15:58:20 +0200 + +autofs (4.1.3+4.1.4beta2-3) unstable; urgency=low + + * Urgency=high, fixes RC-bugs. + * 053_handle_tabs_in_nsswitch_conf: New patch, revert grep in nsswitch.conf + to the version we had in 4.1.3, so tabs work again. + (Closes: #269238, #296243) + * Remove leading article from the autofs package description. + + -- Steinar H. Gunderson Mon, 21 Feb 2005 12:36:31 +0100 + +autofs (4.1.3+4.1.4beta2-2) unstable; urgency=high + + * Urgency=high, closes an RC bug. + * Call db_stop in postinst and config at the end, to avoid hangs on some + machines on installation. (Closes: #295477) + + -- Steinar H. Gunderson Wed, 16 Feb 2005 13:20:03 +0100 + +autofs (4.1.3+4.1.4beta2-1) unstable; urgency=high + + * Urgency=high as previous versions were broken with regard to upgrading + (ie. a non-reported RC bug; see below). + * New upstream release, includes and thus obsoletes almost all + Debian-specific patches. (Thanks! :-) ) For reference, patches that + were not deleted: + - 020_auto_net_path_sortlocale_mountoptions: changed (removed last + bugfixes as they are already there, kept option changes). + - 037_let_debian_rules_decide_on_CFLAGS: kept. + - 042_default_auto_master_all_commented_out: kept, adapted so it + applies against new version. + * Update debian/script/vars to reflect the new upstream version. + * New patch 052_292762_dont_lsmod_on_monolithic_kernels: + Init script now works properly on monolithic kernels. (Closes: #292762) + * build_dir/TODO doesn't exist anymore, remove from debian/docs. + * There is now a README.gentoo, so don't include README* in debian/docs, + include each element by itself. + * Stop autofs in prerm again, so upgrades actually work cleanly even + if the inode of /usr/sbin/automount was changed; there is now a new flag + AUTOFS_DONT_RESTART_ON_UPGRADES you can set in /etc/default/autofs to + suppress the restart on upgrade if you need manual treatment of this. + * If upgrading from 4.1.3-[56789], which had the broken behaviour of not + stopping in prerm, stop autofs in preinst. Unfortunately, if there has + been more than one of these versions installed without reboot (e.g. + installed -8, upgraded to -9), "/etc/init.d/autofs stop" might be broken, + so we'll display a debconf notice and let the administrator clean up. + (Add dh_installdebconf to debian/rules for this.) + * lintian (and Tollef) complained that the debconf note was not properly + internationalized, so add dependency on po-debconf and run + debconf-gettextize so it is internationalizable. + + -- Steinar H. Gunderson Tue, 15 Feb 2005 17:32:59 +0100 + +autofs (4.1.3-9) unstable; urgency=medium + + * event.d script now sends SIGUSR1 (which makes autofs expire any unused + file system) instead of simply stopping autofs on suspend, which can + fail and gets ugly on restarting. (Closes: #291721) + + -- Steinar H. Gunderson Sun, 23 Jan 2005 01:41:37 +0100 + +autofs (4.1.3-8) unstable; urgency=high + + * urgency=high as of current sarge release policy. (Previous upload was + urgency=low by mistake.) + * Rename 050_maps_without_trailing_newline.diff to + 051_maps_without_trailing_newline.diff (since there was already a 050 + patch I missed last time). + * 049_parse_sun.diff: Update to fix the "can't handle trailing whitespace" + problem for non-multimaps as well. (The previous fix solved the problem, + but for multimaps only.) (Closes: #280120, #280234) + + -- Steinar H. Gunderson Mon, 20 Dec 2004 17:08:23 +0100 + +autofs (4.1.3-7) unstable; urgency=low + + * New maintainer. Thanks to Arthur Korn for maintaining the package earlier, + and to the QA team for taking good care of the package. :-) (Closes: #279872) + * 050_maps_without_trailing_newline.diff: Handle file maps that + do not end in a newline. (Closes: #282981) + * Removed unused misc and perl substitutions from Depends. + * Fixed spelling error in autofs-ldap.README.Debian + (lintian warning). + * Ignore CVS/ paths when locating source and patches during build, + patch from Petter Reinholdtsen. (Closes: #211943) + + -- Steinar H. Gunderson Sat, 18 Dec 2004 02:23:46 +0100 + +autofs (4.1.3-6) unstable; urgency=high + + * Direct map disabling missed in previous upload :-/ + New patch is 050.disable_direct_maps.diff + (closes: #279627) + + -- Francesco Paolo Lovergine Tue, 7 Dec 2004 13:20:30 +0100 + +autofs (4.1.3-5) unstable; urgency=high + + * QA upload. Maintainer set to QA team. ITA #279872 pending. + Urgency due to number of relevant bugs present. + + * Changed 000_autofs_4.1.3_signal-race-fix to prevent locks when trying + to shutdown a mount. + (closes: #279898,#242791) + * Now direct maps are disabled by default and can be enabled via /etc/default/autofs + (closes: #279627) + * Failure in autofs4 module loading does not break installation, in case of static support. + Changed 045_module_loading_set_e patch for that. + (closes: #280276) + * Removed active action from patch 040_init_script_policy_conformance_and_backwards_compatibility + (closes: #282621) + * NEWS.Debian introduced to explain changes in NIS automaps. + (closes: #279490) + * Patch introduced to better parse maps with trailing spaces/tabs and smbfs multimaps. + (closes: #279892,#279561) + * Added a patch to manage sizelimit problems in LDAP searches. + See 048_ldap-search-limit.diff for details. + (closes: #280666) + * Now stopping autofs on removing only in prerm. Not sure it's the best hack. + (closes: #163729) + * Parsing problem was already solved in recent sources, so closing. Suggested patch does not apply. + (closes: #258464) + + -- Francesco Paolo Lovergine Mon, 6 Dec 2004 14:16:21 +0100 + +autofs (4.1.3-4) unstable; urgency=low + + * rc.autofs.in: fixed timeout option parsing regex, closes: #277342, #277277 + * rc.autofs.in: corrected regex that scanned for "automount:" lines in + nsswitch.conf, closes: #277320 + + -- Arthur Korn Thu, 21 Oct 2004 22:00:22 +0200 + +autofs (4.1.3-3) unstable; urgency=low + + * rc.autfs.in: use set -e for policy compliance and error catching + * rc.autfs.in: modprobe for autofs4 if autofs support not present yet + * modprobe/modules: remove modprobe config files vor 2.4 and 2.6 + closes: #274380 + * replace autofs-ldap.README.Debian, autofs master maps in LDAP probably + don't work at all currently. Nobody stepped up to help me on that, so it + will keep rotting now. LDAP-savy help welcome. + + -- Arthur Korn Mon, 18 Oct 2004 14:18:49 +0200 + +autofs (4.1.3-2) experimental; urgency=low + + * rc.autofs.in closes: #273224 + - load /etc/default/autofs, added default/autofs from 3.*, + closes: #217205, #219134 + - create pid files in /var/run/autofs/ + - check for existance of /etc/$map file for compatibility with 3.* autofs + - on stop check if daemon has really been killed for all pid files + - reload/restart|force-reload changed to work as in 3.* (ie policy + conform). + - made handling of short-form (ie not $maptype:$map) map specifiers in + master maps compatible with debian autofs 3.* init. + - getschemes falls back on "files" if no automount key is listed in + nsswitch.conf. + - catnismaps() checks for existence of ypcat and put both fallbacks for + nis master map in getnismounts() + - timeout options in master map supersede setting in daemonoptions and + TIMEOUT, closes: #94776, #155418 + - fixed logic for restarts again (#161401, #127779) + - make stop use start-stop-daemon's --retry feature, closes: #254810 + * auto.master: comment everything out => autofs defaults to not mount + itself anywhere. closes: #211970 + * event.d script uses init script stop action for umounting stuff + * lookup_ldap.c: applied patch by Jun Futagawa to show cause of ldap errors. + + -- Arthur Korn Mon, 27 Sep 2004 21:41:49 +0200 + +autofs (4.1.3-1) experimental; urgency=low + + * New Upstream source, closes: #240060, #221966, #256864 + - mount_autofs passes mount options down (eg timeout), closes: #137746 + - rewritten logging/debugging statements, quieter now, closes: #21501, #144233 + - RedHat LDAP patch merged, closes: #214495, #252294 + - Upstream ships a LDAP schema now, included. + * The following upstream patches are applied: + - autofs-4.1.3-bad_chdir.patch + - autofs-4.1.3-mtab_lock.patch + - autofs-4.1.3-non_block_ping.patch + - autofs-4.1.3-signal-race-fix.patch + - autofs-4.1.3-sock-leak-fix.patch + * Description updated. + + -- Arthur Korn Sat, 4 Sep 2004 02:06:57 +0200 + +autofs (3.9.99-4.0.0pre10-18) unstable; urgency=medium + + * modprobe & modules: replaced that install directive with a direct alias. + The prior solution caused an infinite loop if autofs was not compiled in + and autofs4 was not enabled at all in the kernel config. automount 4 + requires autofs4 anyway. closes: #269817, #181912 + + -- Arthur Korn Fri, 3 Sep 2004 20:47:32 +0200 + +autofs (3.9.99-4.0.0pre10-17) unstable; urgency=medium + + * Adopted package, closes: #269203 + * added debian/modprobe to get autofs4 (not autofs) loaded on 2.6 kernels, + closes: #255609 + * rules: configure target dependet on source.make stamp instead of configure + stamp + * don't call mount with a -o option if there are no options + (patch 045_handle_empty_options_in_changer_ext2_generic_modules) + closes: #211851 + * refuse to start automounter on / + (patch 046_dont_start_automount_on_root), closes: #70892 + * init.d: on restart stop automounters even if theyer command line contains + runs of spaces (patch + 048_reload_didnt_stop_automounters_with_runs_of_spaces_in_commandline), + thanks to Peter Gruber closes: #127779 + * init.d: start automounters for nisplus maps (patch + 047_start_automounter_for_nisplus_maps_too) by Peter Gruber + * mount_program.c: repeated the last letter of map output (patch + 049_program_mount_repeated_last_character_of_map_output) by + Eirik Fuller, closes: #134707 + * control: Recommends nfs-common. Probably needed for showmount. makes sense + anyway. closes: #161047 + * Bumped Standards-Version to 3.6.1 without changes + + -- Arthur Korn Wed, 1 Sep 2004 23:02:42 +0200 + +autofs (3.9.99-4.0.0pre10-16) unstable; urgency=low + + * Correctly handle LDIF output with continued lines + in the function `getldapmounts' in the init script + by using the script `/usr/share/autofs/join_lines'. + (patch 044_handle_ldif_continued_lines_in_init_script) + (closes: Bug#217837) + + -- Daniel Lutz Sat, 1 Nov 2003 20:42:53 +0100 + +autofs (3.9.99-4.0.0pre10-15) unstable; urgency=low + + * Extended the package descriptions of the main package + and the sub-packages. + (closes: Bug#209435) + * Added support for /etc/nsswitch.conf. + (patch 043_nsswitch_and_auto.master_in_ldap) + * Added support for auto.master as LDAP map. + (patch 043_nsswitch_and_auto.master_in_ldap) + (closes: Bug#193028) + + -- Daniel Lutz Sat, 11 Oct 2003 20:33:32 +0200 + +autofs (3.9.99-4.0.0pre10-14) unstable; urgency=low + + * lookup_ldap.c: Try LDAP version 3 before version 2, + correct call to `ldap_simple_bind_s', more verbose + LDAP errors. Patch by Chris Jantzen + (patch 042_ldap_version) + (closes: Bug#190815) + + -- Daniel Lutz Sat, 26 Apr 2003 23:08:12 +0200 + +autofs (3.9.99-4.0.0pre10-13) unstable; urgency=low + + * autofs(5): document use of mount option "gid=" + (patch 040_document_gid_option_in_autofs_5) + (closes: Bug#29852) + * /etc/auto.net: + - set "nonstrict" option by default + - sort with locale "LC_ALL=C" + (patch 041_nonstrict_and_sort_in_auto_net) + (closes: Bug#173876, Bug#160738) + + -- Daniel Lutz Tue, 18 Feb 2003 20:19:24 +0100 + +autofs (3.9.99-4.0.0pre10-12) unstable; urgency=low + + * Added reference to /usr/share/common-licenses/GPL + in copyright file. + * Removed full stop character from first line of the + "Description:" field of package `autofs'. + * Removed debian/conffiles (not needed with DH_COMPAT=3) + * Removed argument `--noscripts' from `dh_installmodules' + in debian/rules. (closes: Bug#175155) + * Updated manpages. + (patch 039_updated_manpages) + (closes: Bug#117226, Bug#117654) + * Updated debian/autofs-ldap.README.Debian + * Updated debian/README.debian + (closes: Bug#175156) + + -- Daniel Lutz Mon, 10 Feb 2003 00:17:01 +0100 + +autofs (3.9.99-4.0.0pre10-11) unstable; urgency=low + + * Remove file `debian/init' in target `clean' of debian/rules. + * /etc/init.d/autofs: rewrite of `process_master_file' (correct + handling of `line_options', correct handling of ldap entries, + correct handling of relative paths, support for map type + specifier, ignore direct maps), warning comment on `localoptions' + (patch 038_rewrite_process_master_file) + (closes: Bug#64147, Bug#129187, Bug#129382, Bug#134003, Bug#163084, Bug#177362) + + -- Daniel Lutz Sat, 8 Feb 2003 23:21:42 +0100 + +autofs (3.9.99-4.0.0pre10-10) unstable; urgency=low + + * Updated URL in manpage automount(8) + (patch 033_corrected_url_in_manpage_automount_8) + * Call to `mount' in `mount_changer.c' had too many arguments. + (patch 034_corrected_mount_call_in_mount_changer_c) + (closes: Bug#154890) + * Fixed parsing error in function `mount_mount' of `mount_nfs.c'. + (patch 035_fixed_parsing_error_in_mount_nfs_c) + (closes: Bug#154168) + * Removed bashism from `debian/scripts/vars.build': explicitly + read into variable `REPLY'. + (closes: Bug#147431) + * In `mount_afs.c': Remove trailing slash from path (if existing). + (patch 036_remove_trailing_slash_in_mount_afs_c) + (closes: Bug#141775) + * Applied patch by Aaron M. Ucko to `lookup_hesiod.c' for support + of hesiod priorities. + (patch 037_support_hesiod_priorities_in_lookup_hesiod_c) + (closes: Bug#137763) + + -- Daniel Lutz Mon, 9 Sep 2002 21:04:01 +0200 + +autofs (3.9.99-4.0.0pre10-9) unstable; urgency=low + + * Corrected handling of `-D' options in /etc/init.d/autofs. + (patch 029_handle_d_options_in_init_script_correctly) + Corrected corresponding text in the manpages automount(8) + and autofs(5). + (patch 030_corrections_in_manpages_autofs_5_and_automount_8) + (closes: Bug#159722, Bug#128274) + * Added `/etc/default/autofs' to debian/conffiles (i. e. marked + it as configuration file). + * Check in /etc/init.d/autofs if `/etc/default/autofs' exists. + (patch 031_check_if_etc_default_autofs_exists_in_init_script) + * Documented option `nonstrict' in autofs(5). + (patch 032_document_nonstrict_option_in_autofs_5) + (closes: Bug#139940) + + -- Daniel Lutz Thu, 5 Sep 2002 18:34:57 +0200 + +autofs (3.9.99-4.0.0pre10-8) unstable; urgency=low + + * Changed `Standards-Version' from 3.5.6 to 3.5.7. + * Added /etc/default/autofs and adapted init script. + (patch 027_timeout_default_in_init_script) + (closes: Bug#159527) + * Exclude references to other nis maps in nis maps (avoid + self-references -> inf. loop) in /etc/init.d/autofs + (patch 028_exclude_references_to_other_nis_maps) + (closes: Bug#130738) + + -- Daniel Lutz Tue, 4 Sep 2002 13:51:00 +0200 + +autofs (3.9.99-4.0.0pre10-7) unstable; urgency=low + + * Added `automount.schema' (installed in /etc/ldap/schema). + (closes: Bug#143564) + * Added README.Debian to autofs-ldap package explaining + how to use it. (Documentation not yet complete.) + (closes: Bug#155074) + + -- Daniel Lutz Tue, 3 Sep 2002 17:44:30 +0200 + +autofs (3.9.99-4.0.0pre10-6) unstable; urgency=low + + * Better handling of options in functin `munge_options' + in /etc/init.d/autofs. The `timeout' options are brought + into a suitable form for further processing by awk. Dashes + in front of options are removed (even if preceeded by spaces). + (patch 026_corrections_in_munge_options) + (closes: Bug#99788, Bug#76927) + + -- Daniel Lutz Tue, 3 Sep 2002 12:11:08 +0200 + +autofs (3.9.99-4.0.0pre10-5) unstable; urgency=low + + * Check for executability of map in /etc/init.d/autofs + (patch 021_check_for_executability_of_map) + (closes: Bug#150439) + * Clarified comment about daemon options in /etc/init.d/autofs + (patch 022_clarify_comment_about_daemon_options) + (closes: Bug#150340) + * Check for specific types (hesiod and ldap) before files and + programs in /etc/init.d/autofs + (patch 023_check_for_specific_types_before_files_and_programs) + Preserve order of mount options in awk section in + /etc/init.d/autofs. (Workaround so that ldap arguments work.) + (patch 024_preserve_order_of_mount_options) + (closes: Bug#147774) + * Allow dashes in options in the file /etc/auto.master. This is + achieved by removing dashes in front of options manually using + a sed script instead of having the dash in the record sepration + characters of the awk script. (/etc/init.d/autofs) + (patch 025_allow_dashes_in_options) + (closes: Bug#134874) + + -- Daniel Lutz Mon, 2 Sep 2002 20:18:24 +0200 + +autofs (3.9.99-4.0.0pre10-4) unstable; urgency=low + + * Applied the patch included in Bug#146829 and Bug#157428. + (closes: Bug#146829, Bug#157428) + + -- Daniel Lutz Mon, 2 Sep 2002 19:47:38 +0200 + +autofs (3.9.99-4.0.0pre10-3) unstable; urgency=low + + * Corrected handling of start/reload/stop in init.d script + so that only a single automount process per mount point + is started instead of multiple. The problem existed because + no .pid files were created. Now the `--pid-file' option + is passed to automount. (closes: Bug#145665, Bug#131078) + * Information about the command line is no more available + in the .pid file. Instead, the init.d script reads this + information from `ps ax'. So changes in /etc/auto.master + should now be handled correctly. (closes: Bug#97192) + * Better readable console messages from init.d script. + (closes: Bug#140925) + * Kill old, not yet stopped automount processes in postinst script + while upgrading, since older versions of the prerm script + didn't stop them while upgrading. + Actually we would need a loop for making sure all are stopped. + But this could lead us to an endless loop if a process couldn't + be stopped. + * Added tests for /etc/init.d/autofs if update-rc.d or + /etc/init.d/autofs {start|restart} is called. + * Adapted code for stopping autofs in prerm script to current + debhelper fashion: always stop /etc/init.d/autofs (that is, + also stop while upgrading). + * Target `make-diff' in debian/sys-build.mk: + Call $(CLEAN_TARGET) in $(BUILD_TREE).orig, too, so that + .orig files created by patch(1) are removed in all these + directories. + + -- Daniel Lutz Sat, 4 May 2002 16:43:50 +0200 + +autofs (3.9.99-4.0.0pre10-2) unstable; urgency=low + + * Really call dh_installmodules, so the file is actually installed. + (closes: Bug#89286) + + -- Daniel Lutz Wed, 1 May 2002 20:00:04 +0200 + +autofs (3.9.99-4.0.0pre10-1) unstable; urgency=low + + * New maintainer (closes: Bug#131639) + * Added missing `"' at line 5 in autofs.event.d (closes: Bug#128177) + + -- Daniel Lutz Fri, 5 Apr 2002 17:52:32 +0200 + +autofs (3.9.99-4.0.0pre10-0) unstable; urgency=low + + * New upstream. The upstream version is actually 4.0.0pre10, but having + the version munged like this allows for upgrade from 3.x to this, and + eventualy from this to the final 4.0. Closes: #63375. + * Document -D in automount(8). Closes: #112172. + * Add support for ext3 mounts(this is just a symlink to mount_ext2.so), + so that fsck can be run on them. Closes: #119937. + * Add apm script, so unused automount file systems get unmounted on + suspend. Closes: #48499 + * Make messages in the init script more policy compliant. Closes: + #121949. + * Oops. Call dh_installmodules, so the file is actually installed. + Closes: #89286(for real this time). + * Restarting the init script does a full stop/start, instead of a + reload. Closes: #84695. + * Fix error that would cause empty pid files to be created. Closes: + #122071. + * Apply patch from bug, to allow for ldap maps in init script. Closes: + #118845. + + -- Adam Heath Tue, 16 Oct 2001 10:33:36 -0500 + +autofs (3.1.7-3) unstable; urgency=low + + * Oops. forgot to include debian/autofs.modules. Closes: #89286. + + -- Adam Heath Sun, 4 Jun 2001 00:25:46 -0500 + +autofs (3.1.7-2) unstable; urgency=low + + * Add hesiod support, as a separate package. Closes: #87068, #98134. + * Add ldap support, as a separate package. Closes: #87068. + * Fix init script handling of -t and --timeout. Closes: #93061. + * Add /etc/modutils/autofs, so that autofs4 is tried, before autofs. + Closes: #89286. + * For maps that start with /, assume they are files, and don't + start an autofs daemon if they don't exist. Closes: #74075. + * Add autoconf to build-depends. Closes: #73674. + * Added depends on nis >= 3.7-1, which includes code to wait until + ypbind is done, before continuing. Closes: #44584, #62142. + * If a map starts with "!", assume it is a program, instead of the + previous default being to assume yp. + + -- Adam Heath Sun, 20 May 2001 14:03:48 -0500 + +autofs (3.1.7-1) unstable; urgency=low + + * New upstream release. Closes: #66200. + * Uses dbs now. + * Remove OPEN_MAX from the program. Closes: #74726(rc), #75909(rc), + #78183(rc). + + -- Adam Heath Fri, 5 Jan 2001 01:15:54 -0600 + +autofs (3.1.4-10) unstable; urgency=low + + * Fixed reference to autofs(5) in /etc/auto.master. Closes: #67791. + * Fixed overrun of memory when multipl nfs hosts are defined. Also, + order of arguments to memset was reversed. Closes: #67427. + * Fixed --timeout processing in -9. Closes: #67505. + * Added support to the init script for detecting hesiod maps. Closes: + #69348. + * Added Build-Depends on debhelper. Closes: #70155. + * Fixed typos in README.smbfs. Closes: #71900. + * Create /var/run/autofs in /etc/init.d/autofs, if it doesn't exist. + Closes: #71951. + * Use $localoptions, instead of $local_options. Closes: #72296. + + -- Adam Heath Sun, 1 Oct 2000 23:57:33 -0500 + +autofs (3.1.4-9) frozen unstable; urgency=low + + * Another code unification. Options are now 'munged' with an awk script, + instead of shell and sed. Closes: #67294. + + -- Adam Heath Sun, 16 Jul 2000 20:14:41 -0500 + +autofs (3.1.4-8) frozen unstable; urgency=low + + * Updated auto.misc so that removable, writable devices are mounted + with the sync option. Closes: #65077. + * Unified the parsing logic, so now both file and nis based auto.master + parsing goes thru the same function. As an added benefit, this allows + for nested nis auto masters. Closes: #66606, #66761, #66527. + * Allow for nis auto masters to reference files as the source for a map, + and for file auto masters to reference nis as the source. Closes: + #66288, #66436, #66532, #66800. + * Added -nodev,nosuid to removable devices in auto.misc. Closes: #66556. + * Updated documentation(man 8 autofs) saying that you need to add + '+map [options]' to auto.master. Closes: #65590. + * Added a 'active' option to the init script. + * Used the internal active function introduced above, to only remove + pid files of automounts that have terminated, when calling the init + script with stop. Closes: #64212. + * Removed odd $map munging that is no longer needed with the unified + parsing. Closes: #62679. + + -- Adam Heath Thu, 6 Jul 2000 19:47:45 -0500 + +autofs (3.1.4-7) frozen unstable; urgency=low + + * Remove the '-' from the options specified in auto.master. + * Don't pass the $map thru basename. + * Don't fail on purge if other files exist in /var/autofs. + + -- Adam Heath Thu, 22 Jun 2000 22:56:11 -0500 + +autofs (3.1.4-6) frozen unstable; urgency=low + + * I got a private mail, saying the patch in the previous upload for + options being allowed on the daemon was incorrect. Investigated, + corrected, so this is the real fix for those 4 bugs. Txs go to + * Applied the very helpful patch included in bug#65102 from + Martin Dickopp . Closes: #65102(rc). + * Major changes to the init script, to make it do what previous + versions did(mainly, options in the master file) + * Better purge handling in postrm. + + -- Adam Heath Sat, 3 Jun 2000 19:45:04 -0500 + +autofs (3.1.4-5) frozen unstable; urgency=low + + * Allow for options to be passed to the daemon. Closes: #62954, #63164, + #64608, #64825. + * Create /var/autofs/misc when upgrading from old versions. Closes: + #62956, #64538. + + -- Adam Heath Wed, 31 May 2000 02:11:08 -0500 + +autofs (3.1.4-4) frozen unstable; urgency=low + + * Changed /mnt/amnt to /var/autofs. + * Change default config to use /var/autofs/misc instead of /misc, + which doesn't exist. Why there was never a bug filed on this, I'll + never know. + * PID files are now in /var/run/autofs/. + * My fix for bugs 40032, 410078, and 57225(in 3.1.4-1) was wrong, as I + edited samples/rc.autofs, not rc.autofs.in. Closes: #62717, #62774, + #62785, #62842. + * Handle upgrades from different versions better in postinst. + * Patch modules/mount_nfs.c to handle multiple hosts, to work around + broken /sbin/mount. + + -- Adam Heath Thu, 20 Apr 2000 20:09:29 -0500 + +autofs (3.1.4-3) frozen unstable; urgency=low + + * Fix pid file handling when the amnt dir is more than 1 level deep. + _ -> __, / -> _: Closes: #62647. + + -- Adam Heath Wed, 19 Apr 2000 19:11:52 -0500 + +autofs (3.1.4-2) frozen unstable; urgency=low + + * Fix call of update-rc.d in postinst. Closes: #62649, #62652, #62653, + #62655, #62666. + * Only mkdir /mnt/amnt if this is a first time install. Closes: #62678. + + -- Adam Heath Wed, 19 Apr 2000 12:44:37 -0500 + +autofs (3.1.4-1) frozen unstable; urgency=low + + * New maintainer. + * Acknowledge nmu fixed bugs. Closes: #34576, #38200, #44366, #46638, + #52716, #55066, #56316, #57347. + * Add -r(--no-restart-on-upgrade). Closes: #54859. + * Depends on procps. Closes: #53237. + * Bugs fixed upstream in 3.1.4: + * Arguments not passed to forked process, because of strtok. Closes: + #44586, #44767. + * Uses upstream init script, as it supports debian. Closes: #42945, + #41876, #47471. + * Applied slightly modified version of patch from bug report, to pass ro + option to fsck.ext2. Closes: #43633. + * Fix race condition during unmount. Closes: #52132. + * Conflicts with samba <= 2.0.6, as that version is needed to be used by + mount_generic. Closes: #54788. + * If /etc/auto.master exists, don't use nis. You can add +auto.master to + to /etc/auto.master if you want to combine nis and a local mapping. + Also set the type to yp in getmounts(). Closes: #40032, 41008, #57225. + * The upstream init script does not do module probing, as the old init + script used to. I don't feel it is this pkg's domain to do a modprobe. + Closes: #60542. + * Check to see if the directory already exists, before attempting to make + it ourselves. Closes: #21567. + * Reassign bug #31251, which deals with mounting a directory from multiple + hosts to mount. + * Make /mnt/amnt during configure, and remove when purging. + * Modify upstream init script to support force-reload. + * Linitian clean. + + -- Adam Heath Sun, 16 Apr 2000 14:56:09 -0500 + +autofs (3.1.4-0.1) frozen unstable; urgency=low + + * Non-maintainer upload + * New upstream version: fixes smbfs problems, and a proper + init.d-script that supports Debian. Closes: Bug#56316 + * Remove debian init-script, it's obsolete now + * Don't stop autofs in prerm, since debhelper apparently does that + now as well. Sigh. Closes: Bug#57347 + + -- Wichert Akkerman Fri, 18 Feb 2000 19:00:03 +0100 + +autofs (3.1.3-2.1) frozen unstable; urgency=low + + * NMU + * Fixed typos/runaway linebreaks in init.d script. closes: #46638, #52716 + * includes pristine upstream source. closes: #44366 + * Previously fixed but unmarked bug -- closes: #38200 + + -- Randolph Chung Wed, 27 Oct 1999 19:31:44 -0700 + +autofs (3.1.3-2) frozen unstable; urgency=low + + * auto.misc is now installed properly + * YP auto.master is not used unless local auto.master has +auto.master in it + (closes bug #40032) + * fixed sed bug in initscript (closes bug #40100) + * should now include mount_smbfs.so (closes bug #31866) + + -- Justin Maurer Sun, 6 Jun 1999 22:24:22 -0500 + +autofs (3.1.3-1) frozen unstable; urgency=low + + * new version + * uploaded from Linx Expo 1999 + + -- Justin Maurer Fri, 21 May 1999 10:38:27 -0500 + +autofs (3.1.1-8) frozen unstable; urgency=low + + * fix lintian bug for FHS + * include new autofs script bug #33397 + + -- Justin Maurer Sat, 24 Apr 1999 23:24:06 -0500 + +autofs (3.1.1-7) frozen unstable; urgency=low + + * upload to fix bad -6 package(s) + + -- Justin Maurer Tue, 5 Jan 1999 22:16:32 -0500 + +autofs (3.1.1-6) frozen unstable; urgency=low + + * new maintainer + * fixed critical security bug #31422, /etc/auto.amnt + * commented out examples by default (#31422 again) + + -- Justin Maurer Tue, 5 Jan 1999 16:59:02 -0500 + +autofs (3.1.1-5) frozen unstable; urgency=low + + * Reset mountoptions properly so options don't `leak' to other mountpoints + * Don't abort prematurely when reloading autofs + + -- Wichert Akkerman Thu, 31 Dec 1998 14:35:37 +0100 + +autofs (3.1.1-4) frozen unstable; urgency=low + + * Hopefully finally fix timeout problems now, using patch from + Zdenek Kabelac + + -- Wichert Akkerman Wed, 23 Dec 1998 00:36:32 +0100 + +autofs (3.1.1-3) frozen unstable; urgency=low + + * Fix status when option are given, patch by Peter Kundrat + * Fix some problems with timeouts + + -- Wichert Akkerman Mon, 2 Nov 1998 16:08:31 +0100 + +autofs (3.1.1-2) unstable; urgency=low + + * Don't show grep in the status (Bug# 21279) + * Don't use the function() bashism (Bug# 25350) + * Hopefully fix timeouts + * Rename directory for sample automount-map from misc to amnt + * Add NFS-mirror for ftp.debian.org to the sample automount-map + + -- Wichert Akkerman Tue, 1 Sep 1998 21:58:14 +0200 + +autofs (3.1.1-1) unstable; urgency=low + + * Upstream bugfix for NFS mounts + * Clean more aggresively + * Don't show the grep in the list of active mount points (race) + * Show correct command when stopping automount + + -- Wichert Akkerman Sat, 11 Apr 1998 02:22:26 +0200 + +autofs (3.1.0-1) unstable; urgency=low + + * New upstream version + * Clean debhelper files in clean target (lintian) + * Link modules against libc (lintian) + + -- Wichert Akkerman Mon, 6 Apr 1998 14:02:03 +0200 + +autofs (0.3.14-6) unstable; urgency=low + + * Fixed error in determening pid-file for automount + * Added timeout option + * Fixed error in checking for autofs support (Bug# 17710, 14077, 13955) + * Fixed status report (Bug# 15589) + * Switched to debhelper (Bug# 15435) + * Policy version 2.4.0.0 + * Changed FSF address in copyright file + + -- Wichert Akkerman Mon, 2 Feb 1998 12:21:44 +0100 + +autofs (0.3.14-5) unstable; urgency=low + + * Minor cosmetic fix (Bug# 13882) + + -- Wichert Akkerman Wed, 15 Oct 1997 11:19:07 +0200 + +autofs (0.3.14-4) unstable; urgency=low + + * Really fix error in /etc/init.d/autofs now + * Better comment on the PRUNEPATH option + * Use pristine sources + + -- Wichert Akkerman Mon, 29 Sep 1997 19:39:12 +0200 + +autofs (0.3.14-3) unstable; urgency=low + + * Fixed error in /etc/init.d/autofs + + -- Wichert Akkerman Mon, 29 Sep 1997 18:54:23 +0200 + +autofs (0.3.14-2) unstable; urgency=low + + * New maintainer + * Added optional pruning of mount options with NIS maps + + -- Wichert Akkerman Mon, 29 Sep 1997 18:09:52 +0200 + +autofs (0.3.14-1) unstable; urgency=low + + * Revise control file + * Check if autofs is available at all before trying to start autofs + * New upstream release + + -- Christoph Lameter Sun, 21 Sep 1997 19:07:49 -0700 + +autofs (0.3.13-1) unstable; urgency=low + + * New upstream release + + -- Christoph Lameter Thu, 18 Sep 1997 11:37:21 -0700 + +autofs (0.3.11-2) unstable; urgency=low + + * #13047: Build with YPLIBS=-lnsl + + -- Christoph Lameter Mon, 15 Sep 1997 21:50:01 -0700 + +autofs (0.3.11-1) unstable; urgency=low + + * New upstream release + + -- Christoph Lameter Sat, 13 Sep 1997 16:18:24 -0700 + +autofs (0.3.10-1) unstable; urgency=low + + * Miquel S. provided new init.d script. Fixed up a bit by me. + * Upstream update. + + -- Christoph Lameter Thu, 11 Sep 1997 18:37:40 -0700 + +autofs (0.3.8-2) unstable; urgency=low + + * David Engel: Missing ! in init.d for NIS support, RC number changed to + 21 + + -- Christoph Lameter Wed, 10 Sep 1997 21:58:09 -0700 + +autofs (0.3.8-1) unstable; urgency=low + + * Upstream update which incorporates some changes I submitted (most + notably the documentation) and which might fix a problem with + hangs. /etc/auto.amd has been renamed to /etc/auto.misc + + -- Christoph Lameter Tue, 9 Sep 1997 18:24:09 -0700 + +autofs (0.3.7-5) unstable; urgency=low + + * Build with egcc + * Make the example floppy mount fstype=auto (Joey) in order to be able to + mount arbitrary floppy formats automatically + + -- Christoph Lameter Mon, 8 Sep 1997 11:45:45 -0700 + +autofs (0.3.7-4) unstable; urgency=low + + * Reload function of the /etc/init.d/autofs script will not disturb active + running automounters. Complete rework of init.d script + * Review by hpa + * Wrote manpages. + * More examples and corrected some incorrect inferences from Solaris code. + * Changes to startup output after consultation via irc with Joey Hess. + + -- Christoph Lameter Sun, 7 Sep 1997 17:14:41 -0700 + +autofs (0.3.7-3) unstable; urgency=low + + * Fix init.d script and provided a restart function following jh + suggestions. + * Fix dependency on NIS reported by Joeyh + + -- Christoph Lameter Sat, 6 Sep 1997 22:29:33 -0700 + +autofs (0.3.7-2) unstable; urgency=low + + * Tested and works. + * Provide example configuration to access the archives at ftp.kernel.org + as a file in /amd/kernel. + + -- Christoph Lameter Sat, 6 Sep 1997 21:33:53 -0700 + +autofs (0.3.7-1) unstable; urgency=low + + * Initial Release. Untested. Maintainer wanted. + + -- Christoph Lameter Sat, 6 Sep 1997 10:44:44 -0700 --- autofs-4.1.4+debian.orig/debian/autofs.examples +++ autofs-4.1.4+debian/debian/autofs.examples @@ -0,0 +1,3 @@ +samples/auto.master +samples/auto.misc +samples/auto.net --- autofs-4.1.4+debian.orig/debian/autofs.default +++ autofs-4.1.4+debian/debian/autofs.default @@ -0,0 +1,20 @@ +# Timeout value in seconds (default: 300) +TIMEOUT=300 + +# Direct maps are only partially implemented +# and could silently break things. See /usr/share/doc/autofs/README.direct for information +# about current limitations and check your configurations before enabling them. +DISABLE_DIRECT=1 + +# The LDAP URI for auto.master +# (e. g. LDAPURI="ldap://ldapserver.example.com/") +#LDAPURI= + +# The LDAP base for auto.master +# (e. g. LDAPBASE="ou=auto.master,ou=Automount,dc=example,dc=com") +#LDAPBASE= + +# Restart autofs automatically on upgrades -- normally, you want this, but +# if you have critical files on autofs-mounted directories (the new autofs +# .deb file, for instance), you may want to set this to 1 +#AUTOFS_DONT_RESTART_ON_UPGRADES= --- autofs-4.1.4+debian.orig/debian/autofs-ldap.files +++ autofs-4.1.4+debian/debian/autofs-ldap.files @@ -0,0 +1,2 @@ +usr/lib/autofs/lookup_ldap.so +usr/lib/autofs/autofs-ldap-auto-master --- autofs-4.1.4+debian.orig/debian/copyright +++ autofs-4.1.4+debian/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Christoph Lameter clameter@debian.org on +Sat, 6 Sep 1997 10:44:44 -0700. + +It was downloaded from ftp://ftp.kernel.org/pub/linux/daemons/autofs + +Upstream development is taking place over the autofs mailing list at +linux.kernel.org: http://linux.kernel.org/mailman/listinfo/autofs + +Copyright Holder: Transmeta Corporation + +License: + + Copyright (C) 1997 Transmeta Corporation -- All Rights Reserved + + 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; either version 2 of the License, or + (at your option) any later version. + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL file. --- autofs-4.1.4+debian.orig/debian/autofs-ldap.docs +++ autofs-4.1.4+debian/debian/autofs-ldap.docs @@ -0,0 +1,2 @@ +README.ldap +debian/README.ldap_master --- autofs-4.1.4+debian.orig/debian/autofs-ldap.examples +++ autofs-4.1.4+debian/debian/autofs-ldap.examples @@ -0,0 +1,2 @@ +samples/ldap* +samples/auto.master.ldap --- autofs-4.1.4+debian.orig/debian/autofs.docs +++ autofs-4.1.4+debian/debian/autofs.docs @@ -0,0 +1,12 @@ +README +README.changer +README.direct +README.ghosting +README.init +README.ldap +README.ncpfs +README.options +README.patches +README.replicated-server +README.smbfs +CREDITS --- autofs-4.1.4+debian.orig/debian/README.ldap_master +++ autofs-4.1.4+debian/debian/README.ldap_master @@ -0,0 +1,78 @@ +autofs for Debian - support for LDAP +------------------------------------ + +This package installed a suitable LDAP schema for OpenLDAP +to /etc/ldap/schema/automount.ldap. For using it, you need +to add the following line into your /etc/ldap/slapd.conf: + + include /etc/ldap/schema/automount.schema + +Before this line, the schemas core.schema and cosine.schema +need to be included, since automount.schema depends on them. + +You can manage your auto.master map in your LDAP directory +as well as all other maps. + +For using an auto.master map, you need to define the +variables LDAPURI and LDAPBASE in /etc/default/autofs. +Additionally, you need to activate it in /etc/nsswitch.conf: + + automount: ldap + +(If you don't use /etc/nsswitch.conf, the autofs init script +looks for auto.master in your LDAP directory, as long as +neither /etc/auto.master nor an auto.master NIS map exist.) + +You could implement auto.master in the LDAP directory as +following: + + # The base node for autofs + dn: ou=Automount,dc=example,dc=com + ou: Automount + objectClass: top + objectClass: organizationalUnit + + # The auto.master map + dn: ou=auto.master,ou=Automount,dc=example,dc=com + ou: auto.master + objectClass: top + objectClass: automountMap + + # The entry /data in auto.master + dn: cn=/data,ou=auto.master,ou=Automount,dc=example,dc=com + cn: /data + objectClass: top + objectClass: automount + automountInformation: ldap:ldapserver.example.com:ou=auto.data,ou=Automount,dc=example,dc=com rsize=8192,wsize=8192 + +This would correspond to the following entry in /etc/auto.master: + + /data ldap:ldapserver.example.com:ou=auto.data,ou=Automount,dc=example,dc=com rsize=8192,wsize=8192 + +Appropriate LDAP entries could look like this: + + # The auto.data map + dn: ou=auto.data,ou=Automount,dc=example,dc=com + ou: auto.data + objectClass: top + objectClass: automountMap + + # The entry foo in auto.data + dn: cn=foo,ou=auto.data,ou=Automount,dc=example,dc=com + cn: foo + objectClass: top + objectClass: automount + automountInformation: -rw,intr,soft,quota nfsserver.example.com:/export/data/foo + + # The entry bar in auto.data + dn: cn=bar,ou=auto.data,ou=Automount,dc=example,dc=com + cn: bar + objectClass: top + objectClass: automount + automountInformation: -rw,intr,soft,quota nfsserver.example.com:/export/data/bar + +This would correspond to the following entries in /etc/auto.data: + + foo -rw,intr,soft,quota nfsserver.example.com:/export/data/foo + bar -rw,intr,soft,quota nfsserver.example.com:/export/data/bar + --- autofs-4.1.4+debian.orig/debian/NEWS +++ autofs-4.1.4+debian/debian/NEWS @@ -0,0 +1,11 @@ +autofs (4.1.3+4.1.4beta2-7) unstable; urgency=low + + * autofs for Debian now ships with an empty /etc/auto.master by default. + This is different from what was used in woody, which means that people + who never changed this file will get different results from woody; in + particular, /var/autofs/misc is no longer mounted by default. This also + affects the default behaviour when using NIS maps. + + For more details, please see the README.Debian file. + + -- Steinar H. Gunderson Sat, 2 Apr 2005 14:29:06 +0200 --- autofs-4.1.4+debian.orig/debian/autofs-hesiod.files +++ autofs-4.1.4+debian/debian/autofs-hesiod.files @@ -0,0 +1,2 @@ +usr/lib/autofs/lookup_hesiod.so +usr/lib/autofs/parse_hesiod.so --- autofs-4.1.4+debian.orig/debian/auto.net.md5sum +++ autofs-4.1.4+debian/debian/auto.net.md5sum @@ -0,0 +1 @@ +0acd3943236c9eae496eb815610c25db build-tree/autofs-4.1.4_beta2/samples/auto.net --- autofs-4.1.4+debian.orig/debian/event.d +++ autofs-4.1.4+debian/debian/event.d @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +# only run this script if the system is going into suspend +if [ "$1" != "suspend" ]; then + exit 0 +fi + +# Expire any automounted file systems when suspending. We don't stop autofs, +# since there might still be lots of active files on these filesystems (so +# stopping might easily fail). + +# Each automount daemon leaves its pid in one of these files +for i in /var/run/autofs/*.pid; do + pid=`head -n 1 $i 2>/dev/null` + [ "$pid" = "" ] && continue + # SIGUSR1 makes the daemon unmount any unused filesystems without + # quitting + kill -USR1 $pid +done --- autofs-4.1.4+debian.orig/debian/README.Debian +++ autofs-4.1.4+debian/debian/README.Debian @@ -0,0 +1,29 @@ +autofs for Debian +----------------- + +You will need to have the AUTOFS4 filesystem compiled as a module or statically +for your kernel. Earlier autofs modules won't work properly. + +A major feature of autofs is that it is compatible with Solaris automount +syntax. If you are connecting your Debian machine to a Solaris server +using NIS/YP, automount and NFS, then there is a simple recipe: +/etc/init.d/autofs checks for the existance of /etc/auto.master. If it +does not exist then it tries to use NIS to get the master automount map, +if an "automount: nis" entry in /etc/nsswitch.conf is present. + +You can alternatively add '+auto.master' to the list of +entries in /etc/auto.master, if your NIS server distributes the NIS +master map with this name. This is the preferred technique to +import NIS maps, because you can mix local and NIS maps. + +The admin on the Solaris server should have a master automount map +available as auto.master over NIS (check with "ypcat auto.master"). This +will list all the directories available for automounting on your network. + +Direct maps are currently disabled by default, due to its incomplete support +which could create a few problems. You can enable them by setting +DISABLE_DIRECT=0 in /etc/default/autofs, at your own risk. + +Since 4.1.4+debian, the default auto.smb map will look for samba credentials +files called /etc/auto.smb.$targethost and pass it to smbmount if it finds a +matching one. --- autofs-4.1.4+debian.orig/debian/auto.misc.md5sum +++ autofs-4.1.4+debian/debian/auto.misc.md5sum @@ -0,0 +1 @@ +3ffaa132f47cf5075192cf6c21abf037 build-tree/autofs-4.1.4_beta2/samples/auto.misc --- autofs-4.1.4+debian.orig/debian/autofs.dirs +++ autofs-4.1.4+debian/debian/autofs.dirs @@ -0,0 +1 @@ +var/run/autofs --- autofs-4.1.4+debian.orig/debian/compat +++ autofs-4.1.4+debian/debian/compat @@ -0,0 +1 @@ +5 --- autofs-4.1.4+debian.orig/debian/auto.smb.md5sum +++ autofs-4.1.4+debian/debian/auto.smb.md5sum @@ -0,0 +1 @@ +eec3f773e09846b7d4325f0ce20ab5bd build-tree/autofs-4.1.4_beta2/samples/auto.smb --- autofs-4.1.4+debian.orig/debian/watch +++ autofs-4.1.4+debian/debian/watch @@ -0,0 +1,2 @@ +version=3 +ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-(4[^-]*)\.tar\.bz2 --- autofs-4.1.4+debian.orig/debian/patches/061_multi_parse_fix.dpatch +++ autofs-4.1.4+debian/debian/patches/061_multi_parse_fix.dpatch @@ -0,0 +1,60 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 061_multi_parse_fix.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/modules/parse_sun.c .A/modules/parse_sun.c +--- .B/modules/parse_sun.c 2005-04-05 12:42:42.000000000 +0000 ++++ .A/modules/parse_sun.c 2007-01-07 21:36:35.000000000 +0000 +@@ -766,7 +766,16 @@ + { + const char *p = (char *) mapent; + int multi = 0; +- int first_chunk = 0; ++ int not_first_chunk = 0; ++ ++ if (!p) { ++ crit("check_is_multi: unexpected NULL map entry pointer"); ++ return 0; ++ } ++ ++ /* If first character is "/" it's a multi-mount */ ++ if (*p == '/') ++ return 1; + + while (*p) { + p = skipspace(p); +@@ -779,7 +788,7 @@ + * path that begins with '/' indicates a mutil-mount + * entry. + */ +- if (first_chunk) { ++ if (not_first_chunk) { + if (*p == '/' || *p == '-') { + multi = 1; + break; +@@ -796,7 +805,7 @@ + * after which it's a multi mount. + */ + p += chunklen(p, check_colon(p)); +- first_chunk++; ++ not_first_chunk++; + } + + return multi; +@@ -883,7 +892,12 @@ + return 1; + } + +- path = dequote(p, l = chunklen(p, 0)); ++ if (*p != '/') { ++ l = 0; ++ path = dequote("/", 1); ++ } else ++ path = dequote(p, l = chunklen(p, 0)); ++ + if (!path) { + error(MODPREFIX "out of memory"); + free(myoptions); --- autofs-4.1.4+debian.orig/debian/patches/073_configurable_locking.dpatch +++ autofs-4.1.4+debian/debian/patches/073_configurable_locking.dpatch @@ -0,0 +1,173 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 073_configurable_locking.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/configure .A/configure +--- .B/configure 2005-04-06 15:24:37.000000000 +0000 ++++ .A/configure 2007-01-07 21:36:36.000000000 +0000 +@@ -842,6 +842,7 @@ + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-ext-env disable search in environment for substitution variable ++--disable-mount-locking disable use of locking when spawning mount command + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4308,6 +4309,23 @@ + fi + + # ++# Disable use of locking when spawning mount command ++# ++# Check whether --enable-mount-locking or --disable-mount-locking was given. ++if test "${enable_mount_locking+set}" = set; then ++ enableval="$enable_mount_locking" ++ ++else ++ enableval=yes ++fi; ++if test x$enable_mount_locking = xyes -o x$enableval = xyes; then ++ cat >>confdefs.h <<\_ACEOF ++#define ENABLE_MOUNT_LOCKING 1 ++_ACEOF ++ ++fi ++ ++# + # Write Makefile.conf and include/config.h + # + ac_config_headers="$ac_config_headers include/config.h" +diff -Naur .B/configure.in .A/configure.in +--- .B/configure.in 2005-04-06 15:24:37.000000000 +0000 ++++ .A/configure.in 2007-01-07 21:36:36.000000000 +0000 +@@ -167,6 +167,16 @@ + fi + + # ++# Disable use of locking when spawning mount command ++# ++AC_ARG_ENABLE(mount-locking, ++--disable-mount-locking disable use of locking when spawning mount command,, ++ enableval=yes) ++if test x$enable_mount_locking = xyes -o x$enableval = xyes; then ++ AC_DEFINE(ENABLE_MOUNT_LOCKING, 1) ++fi ++ ++# + # Write Makefile.conf and include/config.h + # + AC_CONFIG_HEADER(include/config.h) +diff -Naur .B/daemon/spawn.c .A/daemon/spawn.c +--- .B/daemon/spawn.c 2005-02-10 12:56:53.000000000 +0000 ++++ .A/daemon/spawn.c 2007-01-07 21:36:36.000000000 +0000 +@@ -322,6 +322,7 @@ + return do_spawn(logpri, 0, prog, (const char **) argv); + } + ++#ifdef ENABLE_MOUNT_LOCKING + int spawnll(int logpri, const char *prog, ...) + { + va_list arg; +@@ -342,3 +343,4 @@ + + return do_spawn(logpri, 1, prog, (const char **) argv); + } ++#endif +diff -Naur .B/include/automount.h .A/include/automount.h +--- .B/include/automount.h 2005-01-26 13:03:02.000000000 +0000 ++++ .A/include/automount.h 2007-01-07 21:36:36.000000000 +0000 +@@ -121,9 +121,13 @@ + + int aquire_lock(void); + void release_lock(void); +-int spawnll(int logpri, const char *prog, ...); + int spawnl(int logpri, const char *prog, ...); +-int spawnv(int logpri, const char *prog, const char *const *argv); ++#ifdef ENABLE_MOUNT_LOCKING ++int spawnll(int logpri, const char *prog, ...); ++#else ++#define spawnll spawnl ++#endif ++int spawnv(int ogpri, const char *prog, const char *const *argv); + void reset_signals(void); + void ignore_signals(void); + void discard_pending(int sig); +diff -Naur .B/include/config.h.in .A/include/config.h.in +--- .B/include/config.h.in 2004-02-03 15:23:21.000000000 +0000 ++++ .A/include/config.h.in 2007-01-07 21:36:36.000000000 +0000 +@@ -25,3 +25,5 @@ + #undef HAVE_SLOPPY_MOUNT + + #undef ENABLE_EXT_ENV ++ ++#undef ENABLE_MOUNT_LOCKING +diff -Naur .B/patches/util-linux-2.12a-flock.patch .A/patches/util-linux-2.12a-flock.patch +--- .B/patches/util-linux-2.12a-flock.patch 1970-01-01 00:00:00.000000000 +0000 ++++ .A/patches/util-linux-2.12a-flock.patch 2007-01-07 21:36:36.000000000 +0000 +@@ -0,0 +1,30 @@ ++--- util-linux-2.12a/mount/fstab.c.flock 2005-09-17 01:36:03.000000000 +0800 +++++ util-linux-2.12a/mount/fstab.c 2005-09-17 01:41:12.000000000 +0800 ++@@ -488,7 +488,7 @@ lock_mtab (void) { ++ } ++ /* proceed anyway */ ++ } ++- we_created_lockfile = 1; +++ we_created_lockfile = fd; ++ } else { ++ static int tries = 0; ++ ++@@ -510,9 +510,8 @@ lock_mtab (void) { ++ MOUNTED_LOCK); ++ sleep(1); ++ } +++ close(fd); ++ } ++- ++- close(fd); ++ } ++ } ++ ++@@ -520,6 +519,7 @@ lock_mtab (void) { ++ void ++ unlock_mtab (void) { ++ if (we_created_lockfile) { +++ close(we_created_lockfile); ++ unlink (MOUNTED_LOCK); ++ we_created_lockfile = 0; ++ } +diff -Naur .B/patches/util-linux-2.12q-flock.patch .A/patches/util-linux-2.12q-flock.patch +--- .B/patches/util-linux-2.12q-flock.patch 1970-01-01 00:00:00.000000000 +0000 ++++ .A/patches/util-linux-2.12q-flock.patch 2007-01-07 21:36:36.000000000 +0000 +@@ -0,0 +1,29 @@ ++--- util-linux-2.12q/mount/fstab.c.flock 2005-09-17 01:10:37.000000000 +0800 +++++ util-linux-2.12q/mount/fstab.c 2005-09-17 01:16:51.000000000 +0800 ++@@ -417,6 +417,7 @@ ++ unlock_mtab (void) { ++ if (we_created_lockfile) { ++ unlink (MOUNTED_LOCK); +++ close(we_created_lock_file); ++ we_created_lockfile = 0; ++ } ++ } ++@@ -528,6 +529,7 @@ ++ } ++ /* proceed anyway */ ++ } +++ we_created_lock_file = fd; ++ } else { ++ static int tries = 0; ++ ++@@ -549,9 +551,8 @@ ++ MOUNTED_LOCK); ++ sleep(1); ++ } +++ close(fd); ++ } ++- ++- close(fd); ++ } ++ } ++ --- autofs-4.1.4+debian.orig/debian/patches/00list +++ autofs-4.1.4+debian/debian/patches/00list @@ -0,0 +1,30 @@ +020_auto_net_path_sortlocale_mountoptions +037_let_debian_rules_decide_on_CFLAGS +042_default_auto_master_all_commented_out +060_non_replicated_ping +061_multi_parse_fix +062_fix_memory_leak +063_misc_fixes +064_support_options_on_nis_maps +065_fix_master_map_in_ldap +066_canonicalise_mount_points +067_allow_disabling_bind_mounts +067_ldap_no_first_message +068_fix_invalid_rpcgen_code +069_support_spaces_in_smb_share_names +070_fix_regex_typo +071_fix_ldap_mounts +072_fix_auto_net_sort +073_configurable_locking +074_auto_smb_cifs +075_auto_net_escape_hash +076_ldap_deprecated +077_dont_create_remote_dirs +078_locking_fix_1 +079_no_unlink_upstream +080_auto_smb_probe_credentials +081_auto_net_showmount_quotes +082_samples_makefile_typo +083_clarify_program_map_outputsyntax +084_init_lsb_header +085-auto.net-lp111612.dpatch --- autofs-4.1.4+debian.orig/debian/patches/020_auto_net_path_sortlocale_mountoptions.dpatch +++ autofs-4.1.4+debian/debian/patches/020_auto_net_path_sortlocale_mountoptions.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 020_auto_net_path_sortlocale_mountoptions.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.net .A/samples/auto.net +--- .B/samples/auto.net 2005-04-05 13:02:09.000000000 +0000 ++++ .A/samples/auto.net 2007-01-07 21:36:35.000000000 +0000 +@@ -11,7 +11,7 @@ + + # add "nosymlink" here if you want to suppress symlinking local filesystems + # add "nonstrict" to make it OK for some filesystems to not mount +-opts="-fstype=nfs,hard,intr,nodev,nosuid" ++opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,async" + + # Showmount comes in a number of names and varieties. "showmount" is + # typically an older version which accepts the '--no-headers' flag --- autofs-4.1.4+debian.orig/debian/patches/070_fix_regex_typo.dpatch +++ autofs-4.1.4+debian/debian/patches/070_fix_regex_typo.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 070_fix_regex_typo.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in +--- .B/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 ++++ .A/samples/rc.autofs.in 2007-01-07 21:36:36.000000000 +0000 +@@ -148,7 +148,7 @@ + cat /etc/auto.master | awk '{print $0}' | sed -e '/^#/d' -e '/^$/d' | ( + while read auto_master_in + do +- if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then ++ if [ "`echo $auto_master_in | grep '^\+'`" = "" ]; then + echo $auto_master_in + else + cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d' | ( --- autofs-4.1.4+debian.orig/debian/patches/071_fix_ldap_mounts.dpatch +++ autofs-4.1.4+debian/debian/patches/071_fix_ldap_mounts.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 071_fix_ldap_mounts.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in +--- .B/samples/rc.autofs.in 2007-01-07 21:36:36.000000000 +0000 ++++ .A/samples/rc.autofs.in 2007-01-07 21:36:36.000000000 +0000 +@@ -319,7 +319,7 @@ + maptype=`echo $map | cut -f1 -d:` + # Handle degenerate map specifiers + if [ "$maptype" = "$map" ] ; then +- if [ "$map" = "hesiod" -o "$map" = "userhome" ] ; then ++ if [ "$map" = "hesiod" -o "$map" = "userhome" -o "$map" = "ldap" ] ; then + maptype=$map + map= + elif [ "$map" = "multi" ] ; then --- autofs-4.1.4+debian.orig/debian/patches/078_locking_fix_1.dpatch +++ autofs-4.1.4+debian/debian/patches/078_locking_fix_1.dpatch @@ -0,0 +1,82 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 078_locking_fix_1.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/daemon/spawn.c .A/daemon/spawn.c +--- .B/daemon/spawn.c 2007-01-07 21:36:36.000000000 +0000 ++++ .A/daemon/spawn.c 2007-01-07 21:36:36.000000000 +0000 +@@ -214,14 +214,15 @@ + sigfillset(&allsignals); + sigprocmask(SIG_BLOCK, &allsignals, &oldsig); + +- if (pipe(pipefd)) ++ if (pipe(pipefd)) { ++ if (use_lock) ++ release_lock(); ++ sigprocmask(SIG_SETMASK, &oldsig, NULL); + return -1; ++ } + + f = fork(); +- if (f < 0) { +- sigprocmask(SIG_SETMASK, &oldsig, NULL); +- return -1; +- } else if (f == 0) { ++ if (f == 0) { + reset_signals(); + close(pipefd[0]); + dup2(pipefd[1], STDOUT_FILENO); +@@ -243,6 +244,8 @@ + + if (f < 0) { + close(pipefd[0]); ++ if (use_lock) ++ release_lock(); + sigprocmask(SIG_SETMASK, &oldsig, NULL); + return -1; + } +@@ -287,11 +290,11 @@ + if (waitpid(f, &status, 0) != f) + status = -1; /* waitpid() failed */ + +- sigprocmask(SIG_SETMASK, &oldsig, NULL); +- + if (use_lock) + release_lock(); + ++ sigprocmask(SIG_SETMASK, &oldsig, NULL); ++ + return status; + } + } +diff -Naur .B/lib/lock.c .A/lib/lock.c +--- .B/lib/lock.c 2005-01-17 15:09:28.000000000 +0000 ++++ .A/lib/lock.c 2007-01-07 21:36:36.000000000 +0000 +@@ -208,9 +208,6 @@ + */ + static int wait_for_lockf(const char *lockf) + { +- struct timespec t = { 0, WAIT_INTERVAL }; +- struct timespec r; +- int ts_size = sizeof(struct timespec); + int tries = WAIT_TRIES; + int status = 0; + struct stat st; +@@ -218,10 +215,13 @@ + while (tries-- && !status) { + status = stat(lockf, &st); + if (!status) { ++ struct timespec t = { 0, WAIT_INTERVAL }; ++ struct timespec r; ++ + while (nanosleep(&t, &r) == -1 && errno == EINTR) { + if (got_term) + return 0; +- memcpy(&t, &r, ts_size); ++ memcpy(&t, &r, sizeof(struct timespec)); + } + } + } --- autofs-4.1.4+debian.orig/debian/patches/065_fix_master_map_in_ldap.dpatch +++ autofs-4.1.4+debian/debian/patches/065_fix_master_map_in_ldap.dpatch @@ -0,0 +1,22 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 065_fix_master_map_in_ldap.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in +--- .B/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 ++++ .A/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 +@@ -175,7 +175,11 @@ + function getldapmounts() + { + if [ -x @@autofslibdir@@/autofs-ldap-auto-master ]; then ++ [ ! -z $LDAPURI ] && export LDAPURI="$LDAPURI" ++ [ ! -z $LDAPBASE ] && export LDAPBASE="$LDAPBASE" + @@autofslibdir@@/autofs-ldap-auto-master 2> /dev/null ++ @@autofslibdir@@/autofs-ldap-auto-master -m automountMap \ ++ -e automount -n ou -k cn -v automountInformation 2> /dev/null + fi + } + --- autofs-4.1.4+debian.orig/debian/patches/084_init_lsb_header.dpatch +++ autofs-4.1.4+debian/debian/patches/084_init_lsb_header.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 84_init_lsb_header.dpatch by +## +## DP: Add an LSB-conformant header to the initscript. + +@DPATCH@ + +--- autofs-4.1.4+debian/samples/rc.autofs.in.orig 2007-07-05 16:43:32.000000000 +0200 ++++ autofs-4.1.4+debian/samples/rc.autofs.in 2007-07-05 16:43:42.000000000 +0200 +@@ -9,6 +9,16 @@ + # On most distributions, this file should be called: + # /etc/rc.d/init.d/autofs or /etc/init.d/autofs + # ++### BEGIN INIT INFO ++# Provides: autofs ++# Required-Start: $local_fs ++# Required-Stop: $local_fs ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Short-Description: automount daemon ++# Description: daemon to mount (possibly remote) filesystems ++# automatically upon entering the mountpoint ++### END INIT INFO + + # For Redhat-ish systems + # --- autofs-4.1.4+debian.orig/debian/patches/042_default_auto_master_all_commented_out.dpatch +++ autofs-4.1.4+debian/debian/patches/042_default_auto_master_all_commented_out.dpatch @@ -0,0 +1,18 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 042_default_auto_master_all_commented_out.dpatch by +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.master .A/samples/auto.master +--- .B/samples/auto.master 2005-01-04 14:36:54.000000000 +0000 ++++ .A/samples/auto.master 2007-01-07 21:36:35.000000000 +0000 +@@ -7,5 +7,5 @@ + # For details of the format look at autofs(5). + #/misc /etc/auto.misc --timeout=60 + #/smb /etc/auto.smb +-/misc /etc/auto.misc +-/net /etc/auto.net ++#/misc /etc/auto.misc ++#/net /etc/auto.net --- autofs-4.1.4+debian.orig/debian/patches/074_auto_smb_cifs.dpatch +++ autofs-4.1.4+debian/debian/patches/074_auto_smb_cifs.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 074_auto_smb_cifs.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.smb .A/samples/auto.smb +--- .B/samples/auto.smb 2007-01-07 21:36:36.000000000 +0000 ++++ .A/samples/auto.smb 2007-01-07 21:36:36.000000000 +0000 +@@ -5,7 +5,7 @@ + # This file must be executable to work! chmod 755! + + key="$1" +-opts="-fstype=smbfs" ++opts="-fstype=cifs" + + for P in /bin /sbin /usr/bin /usr/sbin + do --- autofs-4.1.4+debian.orig/debian/patches/060_non_replicated_ping.dpatch +++ autofs-4.1.4+debian/debian/patches/060_non_replicated_ping.dpatch @@ -0,0 +1,228 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 060_non_replicated_ping.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/modules/mount_nfs.c .A/modules/mount_nfs.c +--- .B/modules/mount_nfs.c 2005-04-05 12:42:42.000000000 +0000 ++++ .A/modules/mount_nfs.c 2007-01-07 21:36:35.000000000 +0000 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #define MODULE_MOUNT + #include "automount.h" +@@ -105,28 +106,117 @@ + + return 1; + } ++ ++/* ++ * If the entry doesn't contain a ',' or doesn't contain more than ++ * one ':' then @what is not a replicated server entry. ++ */ ++static int inline is_replicated_entry(char *what) ++{ ++ return strchr(what, ',') || ++ (strchr(what, ':') != strrchr(what, ':')); ++} ++ ++/* ++ * Check to see if the 'host:path' or 'host' is on the local machine ++ * Returns < 0 if there is a host lookup problem, otherwise returns 0 ++ * if it's not a local mount, and returns > 0 if it is a local mount. ++ */ ++int is_local_mount(const char *hostpath) ++{ ++ struct hostent *he; ++ char **haddr; ++ char *delim; ++ char *hostname; ++ int hostnamelen; ++ int local = 0; ++ ++ debug(MODPREFIX "is_local_mount: %s", hostpath); ++ delim = strpbrk(hostpath,":"); ++ ++ if (delim) ++ hostnamelen = delim - hostpath; ++ else ++ hostnamelen = strlen(hostpath); ++ ++ hostname = malloc(hostnamelen+1); ++ strncpy(hostname, hostpath, hostnamelen); ++ hostname[hostnamelen] = '\0'; ++ he = gethostbyname(hostname); ++ if (!he) { ++ error(MODPREFIX "host %s: lookup failure", hostname); ++ return -1; ++ } ++ ++ for (haddr = he->h_addr_list; *haddr; haddr++) { ++ local = is_local_addr(hostname, *haddr, he->h_length); ++ if (local < 0) ++ return local; ++ if (local) { ++ debug(MODPREFIX "host %s: is localhost", ++ hostname); ++ return local; ++ } ++ } ++ return 0; ++} ++ + /* + * Given a mount string, return (in the same string) the +- * best mount to use based on weight/locality/rpctime ++ * best mount to use based on locality/weight/rpctime. ++ * ++ * If longtimeout is set to 0 then we only do 100 ms pings to hosts. In ++ * the event that this fails, we call ourself recursively with the ++ * longtimeout option set to 1. In this case we ping for up to 10s and ++ * skip logic for detecting if a localhost has been passed. (if a local ++ * host had been passed, we would have returned that mount as the best ++ * mount. The skipping of local maps in this case is an optimization). ++ * + * - return -1 and what = '\0' on error, + * 1 and what = local mount path if local bind, + * else 0 and what = remote mount path + */ +-int get_best_mount(char *what, const char *original, int longtimeout, int skiplocal) ++int get_best_mount(char *what, const char *original, int longtimeout) + { + char *p = what; + char *winner = NULL; + int winner_weight = INT_MAX, local = 0; + double winner_time = 0; +- char *delim; ++ char *delim, *pstrip; + int sec = (longtimeout) ? 10 : 0; + int micros = (longtimeout) ? 0 : 100000; ++ int skiplocal = longtimeout; /* clearly local is not available */ + + if (!p) { + *what = '\0'; + return -1; + } + ++ /* ++ * If only one mountpoint has been passed in, we don't need to ++ * do anything except strip whitespace from the end of the string. ++ */ ++ if (!is_replicated_entry(p)) { ++ for (pstrip = p+strlen(p) - 1; pstrip >= p; pstrip--) ++ if (isspace(*pstrip)) ++ *pstrip = '\0'; ++ ++ /* Check if the host is the localhost */ ++ if (is_local_mount(p) > 0) { ++ debug(MODPREFIX "host %s: is localhost", p); ++ ++ /* Strip off hostname and ':' */ ++ delim = strchr(p,':'); ++ while (delim && *delim != '\0') { ++ delim++; ++ *what = *delim; ++ what++; ++ } ++ return 1; ++ } ++ return 0; ++ } ++ + while (p && *p) { + char *next; + unsigned int ping_stat = 0; +@@ -171,37 +261,17 @@ + /* p points to a server, "next is our next parse point */ + if (!skiplocal) { + /* Check if it's localhost */ +- struct hostent *he; +- char **haddr; +- +- he = gethostbyname(p); +- if (!he) { +- error(MODPREFIX "host %s: lookup failure", p); +- p = next; +- continue; +- } +- +- /* Check each host in round robin list */ +- for (haddr = he->h_addr_list; *haddr; haddr++) { +- local = is_local_addr(p, *haddr, he->h_length); +- +- if (local < 0) +- continue; +- +- if (local) { +- winner = p; +- break; +- } +- } +- ++ local = is_local_mount(p); + if (local < 0) { + local = 0; + p = next; + continue; + } + +- if (local) ++ if (local) { ++ winner = p; + break; ++ } + } + + /* ping each (or the) entry to see if it's alive. */ +@@ -214,6 +284,7 @@ + /* First unweighted or only host is alive so set winner */ + if (!winner) { + winner = p; ++ winner_time = 1; + /* No more to check, return it */ + if (!next || !*next) + break; +@@ -256,7 +327,7 @@ + */ + if (!local && winner_weight == INT_MAX) { + /* We had more than one contender and none responded in time */ +- if (winner_time != 0 && winner_time > 500) { ++ if (winner_time == 0 || winner_time > 500) { + /* We've already tried a longer timeout */ + if (!longtimeout) { + /* Reset string and try again */ +@@ -267,16 +338,14 @@ + "retrying with longer timeout", + original); + +- return get_best_mount(what, original, 1, 1); ++ return get_best_mount(what, original, 1); + } + } + } + +- /* No winner found so bail */ +- if (!winner) { +- *what = '\0'; +- return 0; +- } ++ /* No winner found so return first */ ++ if (!winner) ++ winner = what; + + /* + * We now have our winner, copy it to the front of the string, +@@ -395,7 +464,7 @@ + /* No colon, take this as a bind (local) entry */ + local = 1; + } else if (!nosymlink) { +- local = get_best_mount(whatstr, what, 0, 0); ++ local = get_best_mount(whatstr, what, 0); + if (!*whatstr) { + warn(MODPREFIX "no host elected"); + return 1; --- autofs-4.1.4+debian.orig/debian/patches/066_canonicalise_mount_points.dpatch +++ autofs-4.1.4+debian/debian/patches/066_canonicalise_mount_points.dpatch @@ -0,0 +1,24 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 066_canonicalise_mount_points.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in +--- .B/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 ++++ .A/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 +@@ -244,6 +244,13 @@ + continue + fi + ++ # If possible, canonicalise the path so it will always unmount ++ # cleanly. ++ link=`readlink -f "$dir"` ++ if [ ! -z "$link" ]; then ++ dir="$link" ++ fi ++ + # Do not include a map if it is a duplicate, maps on top of + # another map or another map, maps on top of it. + for knownmap in $knownmaps --- autofs-4.1.4+debian.orig/debian/patches/067_allow_disabling_bind_mounts.dpatch +++ autofs-4.1.4+debian/debian/patches/067_allow_disabling_bind_mounts.dpatch @@ -0,0 +1,77 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 067_allow_disabling_bind_mounts.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/modules/mount_bind.c .A/modules/mount_bind.c +--- .B/modules/mount_bind.c 2005-01-10 13:28:29.000000000 +0000 ++++ .A/modules/mount_bind.c 2007-01-07 21:36:35.000000000 +0000 +@@ -107,7 +107,7 @@ + if (options == NULL || *options == '\0') + options = "defaults"; + +- if (bind_works) { ++ if (bind_works && strcmp(options, "symlink") != 0) { + int status, existed = 1; + + debug(MODPREFIX "calling mkdir_path %s", fullpath); +diff -Naur .B/modules/mount_nfs.c .A/modules/mount_nfs.c +--- .B/modules/mount_nfs.c 2007-01-07 21:36:35.000000000 +0000 ++++ .A/modules/mount_nfs.c 2007-01-07 21:36:35.000000000 +0000 +@@ -391,7 +391,8 @@ + char *whatstr; + char *nfsoptions = NULL; + int local, err; +- int nosymlink = 0; ++ int nosymlink = 0; /* Actually misnamed, should be "nobind" now */ ++ int symlink = 0; /* Prefer symlinks to bind mounts? */ + int ro = 0; /* Set if mount bind should be read-only */ + + debug(MODPREFIX "root=%s name=%s what=%s, fstype=%s, options=%s", +@@ -405,7 +406,10 @@ + strcpy(whatstr, what); + + /* Extract "nosymlink" pseudo-option which stops local filesystems +- from being symlinked */ ++ from being bind mounted, and "symlink" pseudo-option which does not ++ do the exact opposite, but rather makes any bind mount into a ++ symlink instead. (Both nosymlink and symlink at the same time ++ make no sense, of course.) */ + if (options) { + const char *comma; + char *nfsp; +@@ -446,6 +450,8 @@ + #endif + if (strncmp("nosymlink", cp, end - cp + 1) == 0) + nosymlink = 1; ++ else if (strncmp("symlink", cp, end - cp + 1) == 0) ++ symlink = 1; + else { + /* Check for options that also make sense + with bind mounts */ +@@ -457,8 +463,8 @@ + } + } + +- debug(MODPREFIX "nfs options=\"%s\", nosymlink=%d, ro=%d", +- nfsoptions, nosymlink, ro); ++ debug(MODPREFIX "nfs options=\"%s\", nosymlink=%d, symlink=%d, ro=%d", ++ nfsoptions, nosymlink, symlink, ro); + } + + local = 0; +@@ -490,7 +496,11 @@ + if (local) { + /* Local host -- do a "bind" */ + +- const char *bind_options = ro ? "ro" : ""; ++ const char *bind_options; ++ if (symlink) ++ bind_options = "symlink"; ++ else ++ bind_options = ro ? "ro" : ""; + + debug(MODPREFIX "%s is local, doing bind", name); + --- autofs-4.1.4+debian.orig/debian/patches/083_clarify_program_map_outputsyntax.dpatch +++ autofs-4.1.4+debian/debian/patches/083_clarify_program_map_outputsyntax.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 083_clarify_program_map_outputsyntax.dpatch +## +## DP: Explicitly mention that the queried key has to be omitted in the output of +## DP: program maps. + +@DPATCH@ +--- autofs-4.1.4+debian.orig/man/autofs.5 2007-06-30 00:29:12.000000000 +0200 ++++ autofs-4.1.4+debian/man/autofs.5 2007-06-30 00:30:27.000000000 +0200 +@@ -153,7 +153,8 @@ + .B program + map will be called as a script with the key as an argument. It may + return no lines of output if there's an error, or one or more lines +-containing a map (with \\ quoting line breaks). ++containing a map (starting with the second column, i.e. omitting the ++key, and quoting line breaks with \\). + .P + To use a + .B program --- autofs-4.1.4+debian.orig/debian/patches/076_ldap_deprecated.dpatch +++ autofs-4.1.4+debian/debian/patches/076_ldap_deprecated.dpatch @@ -0,0 +1,265 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 076_ldap_deprecated.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/aclocal.m4 .A/aclocal.m4 +--- .B/aclocal.m4 2003-09-29 08:22:35.000000000 +0000 ++++ .A/aclocal.m4 2007-01-07 21:36:36.000000000 +0000 +@@ -9,8 +9,8 @@ + AC_DEFUN(AF_PATH_INCLUDE, + [AC_PATH_PROGS($1,$2,$3,$4) + if test -n "$$1"; then +- AC_DEFINE(HAVE_$1) +- AC_DEFINE_UNQUOTED(PATH_$1, "$$1") ++ AC_DEFINE(HAVE_$1,1,[define if you have $1]) ++ AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1]) + HAVE_$1=1 + else + HAVE_$1=0 +@@ -28,7 +28,7 @@ + [if test -n "$MOUNT" ; then + AC_MSG_CHECKING([if mount accepts the -s option]) + if "$MOUNT" -s > /dev/null 2>&1 ; then +- AC_DEFINE(HAVE_SLOPPY_MOUNT) ++ AC_DEFINE(HAVE_SLOPPY_MOUNT, 1, [define if the mount command supports the -s option]) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +diff -Naur .B/configure .A/configure +--- .B/configure 2007-01-07 21:36:36.000000000 +0000 ++++ .A/configure 2007-01-07 21:36:36.000000000 +0000 +@@ -1359,11 +1359,13 @@ + test -n "$MOUNT" || MOUNT="/bin/mount" + + if test -n "$MOUNT"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_MOUNT 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_MOUNT "$MOUNT" + _ACEOF + +@@ -1418,11 +1420,13 @@ + test -n "$UMOUNT" || UMOUNT="/bin/umount" + + if test -n "$UMOUNT"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_UMOUNT 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_UMOUNT "$UMOUNT" + _ACEOF + +@@ -1476,11 +1480,13 @@ + done + + if test -n "$E2FSCK"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_E2FSCK 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_E2FSCK "$E2FSCK" + _ACEOF + +@@ -1534,11 +1540,13 @@ + done + + if test -n "$E3FSCK"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_E3FSCK 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_E3FSCK "$E3FSCK" + _ACEOF + +@@ -1556,7 +1564,8 @@ + echo "$as_me:$LINENO: checking if mount accepts the -s option" >&5 + echo $ECHO_N "checking if mount accepts the -s option... $ECHO_C" >&6 + if "$MOUNT" -s > /dev/null 2>&1 ; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_SLOPPY_MOUNT 1 + _ACEOF + +@@ -3403,6 +3412,7 @@ + fi; + if test -z "$HAVE_LDAP"; then + HAVE_LDAP=0 ++ LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1" + echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5 + echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6 + if test "${ac_cv_lib_ldap_ldap_init+set}" = set; then +@@ -4302,7 +4312,8 @@ + enableval=yes + fi; + if test x$enable_ext_env = xyes; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define ENABLE_EXT_ENV 1 + _ACEOF + +@@ -4319,7 +4330,8 @@ + enableval=yes + fi; + if test x$enable_mount_locking = xyes -o x$enableval = xyes; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define ENABLE_MOUNT_LOCKING 1 + _ACEOF + +diff -Naur .B/configure.in .A/configure.in +--- .B/configure.in 2007-01-07 21:36:36.000000000 +0000 ++++ .A/configure.in 2007-01-07 21:36:36.000000000 +0000 +@@ -118,6 +118,7 @@ + ) + if test -z "$HAVE_LDAP"; then + HAVE_LDAP=0 ++ LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1" + AC_CHECK_LIB(ldap, ldap_init, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap -llber -lresolv", , + -llber -lresolv $LIBS) + fi +@@ -163,7 +164,7 @@ + --disable-ext-env disable search in environment for substitution variable,, + enableval=yes) + if test x$enable_ext_env = xyes; then +- AC_DEFINE(ENABLE_EXT_ENV, 1) ++ AC_DEFINE(ENABLE_EXT_ENV, 1, [leave this alone]) + fi + + # +@@ -173,7 +174,7 @@ + --disable-mount-locking disable use of locking when spawning mount command,, + enableval=yes) + if test x$enable_mount_locking = xyes -o x$enableval = xyes; then +- AC_DEFINE(ENABLE_MOUNT_LOCKING, 1) ++ AC_DEFINE(ENABLE_MOUNT_LOCKING, 1, [disable mount table locking -- use this if your maps contain recursive mounts -- EXPERIMENTAL]) + fi + + # +diff -Naur .B/include/config.h.in .A/include/config.h.in +--- .B/include/config.h.in 2007-01-07 21:36:36.000000000 +0000 ++++ .A/include/config.h.in 2007-01-07 21:36:36.000000000 +0000 +@@ -1,29 +1,80 @@ +-#ident "$Id: config.h.in,v 1.4 2004/02/03 15:23:21 raven Exp $" +-/* -*- c -*- +- * +- * config.h.in: Pattern file for autofs to be filled in by configure +- * +- */ ++/* include/config.h.in. Generated from configure.in by autoheader. */ + +-/* Program paths */ ++/* leave this alone */ ++#undef ENABLE_EXT_ENV ++ ++/* disable mount table locking -- use this if your maps contain recursive ++ mounts -- EXPERIMENTAL */ ++#undef ENABLE_MOUNT_LOCKING ++ ++/* define if you have E2FSCK */ ++#undef HAVE_E2FSCK ++ ++/* define if you have E3FSCK */ ++#undef HAVE_E3FSCK ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* define if you have MOUNT */ + #undef HAVE_MOUNT +-#undef PATH_MOUNT + ++/* define if the mount command supports the -s option */ ++#undef HAVE_SLOPPY_MOUNT ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDINT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDLIB_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRING_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_STAT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TYPES_H ++ ++/* define if you have UMOUNT */ + #undef HAVE_UMOUNT +-#undef PATH_UMOUNT + +-#undef HAVE_SMBMOUNT +-#undef PATH_SMBMOUNT ++/* Define to 1 if you have the header file. */ ++#undef HAVE_UNISTD_H + +-#undef HAVE_E2FSCK ++/* Define to the address where bug reports for this package should be sent. */ ++#undef PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#undef PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#undef PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#undef PACKAGE_TARNAME ++ ++/* Define to the version of this package. */ ++#undef PACKAGE_VERSION ++ ++/* define if you have E2FSCK */ + #undef PATH_E2FSCK + +-#undef HAVE_E3FSCK ++/* define if you have E3FSCK */ + #undef PATH_E3FSCK + +-/* Define this option if mount(8) supports the -s (sloppy) option */ +-#undef HAVE_SLOPPY_MOUNT ++/* define if you have MOUNT */ ++#undef PATH_MOUNT + +-#undef ENABLE_EXT_ENV ++/* define if you have UMOUNT */ ++#undef PATH_UMOUNT + +-#undef ENABLE_MOUNT_LOCKING ++/* Define to 1 if you have the ANSI C header files. */ ++#undef STDC_HEADERS --- autofs-4.1.4+debian.orig/debian/patches/063_misc_fixes.dpatch +++ autofs-4.1.4+debian/debian/patches/063_misc_fixes.dpatch @@ -0,0 +1,82 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 063_misc_fixes.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/lib/cache.c .A/lib/cache.c +--- .B/lib/cache.c 2005-02-06 06:00:53.000000000 +0000 ++++ .A/lib/cache.c 2007-01-07 21:36:35.000000000 +0000 +@@ -337,8 +337,10 @@ + if (!path) + return; + +- if (is_mounted(_PATH_MOUNTED, path)) ++ if (is_mounted(_PATH_MOUNTED, path)) { ++ free(path); + continue; ++ } + + if (me->age < age) { + mapent_hash[i] = me->next; +diff -Naur .B/modules/lookup_file.c .A/modules/lookup_file.c +--- .B/modules/lookup_file.c 2005-04-06 15:14:23.000000000 +0000 ++++ .A/modules/lookup_file.c 2007-01-07 21:36:35.000000000 +0000 +@@ -157,6 +157,10 @@ + break; + + case st_compare: ++ if (kptr - key > KEY_MAX_LEN) { ++ state = st_badent; ++ break; ++ } + if (ch == '\n') + state = st_begin; + else if (isspace(ch) && !escape) { +diff -Naur .B/modules/parse_sun.c .A/modules/parse_sun.c +--- .B/modules/parse_sun.c 2007-01-07 21:36:35.000000000 +0000 ++++ .A/modules/parse_sun.c 2007-01-07 21:36:35.000000000 +0000 +@@ -680,6 +680,10 @@ + "mounting root %s, mountpoint %s, what %s, fstype %s, options %s\n", + root, mountpoint, what, fstype, options); + ++ /* A malformed entry of the form key /xyz will trigger this case */ ++ if (!what || *what == '\0') ++ return 1; ++ + if (!strcmp(fstype, "nfs")) { + rv = mount_nfs->mount_mount(root, mountpoint, strlen(mountpoint), + what, fstype, options, mount_nfs->context); +@@ -695,6 +699,18 @@ + return rv; + } + ++static int key_exists(struct multi_mnt *list, char *path, int pathlen) ++{ ++ struct multi_mnt *mmptr = list; ++ ++ while (mmptr && pathlen == strlen(mmptr->path)) { ++ if (!strncmp(mmptr->path, path, pathlen)) ++ return 1; ++ mmptr = mmptr->next; ++ } ++ return 0; ++} ++ + /* + * Build list of mounts in shortest -> longest order. + * Pass in list head and return list head. +@@ -725,6 +741,12 @@ + mmptr = mmptr->next; + } + ++ /* if a multimount entry has duplicate keys, it is invalid */ ++ if (key_exists(mmptr, path, plen)) { ++ free(new); ++ return NULL; ++ } ++ + if (old) + old->next = new; + new->next = mmptr; --- autofs-4.1.4+debian.orig/debian/patches/072_fix_auto_net_sort.dpatch +++ autofs-4.1.4+debian/debian/patches/072_fix_auto_net_sort.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 072_fix_auto_net_sort.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.net .A/samples/auto.net +--- .B/samples/auto.net 2007-01-07 21:36:35.000000000 +0000 ++++ .A/samples/auto.net 2007-01-07 21:36:36.000000000 +0000 +@@ -37,7 +37,7 @@ + # Newer distributions get this right + SHOWMOUNT="$SMNT --no-headers -e $key" + +-$SHOWMOUNT | LC_ALL=C sort +0 | \ ++$SHOWMOUNT | LC_ALL=C sort -k 1 | \ + awk -v key="$key" -v opts="$opts" -- ' + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } --- autofs-4.1.4+debian.orig/debian/patches/077_dont_create_remote_dirs.dpatch +++ autofs-4.1.4+debian/debian/patches/077_dont_create_remote_dirs.dpatch @@ -0,0 +1,205 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 077_dont_create_remote_dirs.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/daemon/automount.c .A/daemon/automount.c +--- .B/daemon/automount.c 2005-03-06 09:43:55.000000000 +0000 ++++ .A/daemon/automount.c 2007-01-07 21:36:36.000000000 +0000 +@@ -79,6 +79,32 @@ + static int handle_packet_expire(const struct autofs_packet_expire *pkt); + static int umount_all(int force); + ++static int do_mkdir(const char *path, mode_t mode) ++{ ++ int status; ++ struct stat st; ++ ++ status = stat(path, &st); ++ if (status == 0) { ++ if (!S_ISDIR(st.st_mode)) { ++ errno = ENOTDIR; ++ return 0; ++ } ++ return 1; ++ } ++ ++ if (contained_in_local_fs(path)) { ++ if (mkdir(path, mode) == -1) { ++ if (errno == EEXIST) ++ return 1; ++ return 0; ++ } ++ return 1; ++ } ++ ++ return 0; ++} ++ + int mkdir_path(const char *path, mode_t mode) + { + char *buf = alloca(strlen(path) + 1); +@@ -91,19 +117,9 @@ + bp += cp - lcp; + lcp = cp; + *bp = '\0'; +- if (mkdir(buf, mode) == -1) { +- /* If it already exists, make sure it's a directory */ +- if (errno == EEXIST) { +- struct stat st; +- +- if (stat(buf, &st) == 0 && !S_ISDIR(st.st_mode)) +- errno = ENOTDIR; +- else { +- /* last component, return -1 */ +- if (*cp != '\0') +- continue; +- } +- } ++ if (!do_mkdir(buf, mode)) { ++ if (*cp != '\0') ++ continue; + return -1; + } + } +diff -Naur .B/include/automount.h .A/include/automount.h +--- .B/include/automount.h 2007-01-07 21:36:36.000000000 +0000 ++++ .A/include/automount.h 2007-01-07 21:36:36.000000000 +0000 +@@ -34,6 +34,8 @@ + #define SLOPPY + #endif + ++#define AUTOFS_SUPER_MAGIC 0x00000187L ++ + #define DEFAULT_TIMEOUT (5*60) /* 5 minutes */ + #define AUTOFS_LOCK "/var/lock/autofs" /* To serialize access to mount */ + #define MOUNTED_LOCK _PATH_MOUNTED "~" /* mounts' lock file */ +@@ -272,6 +274,7 @@ + /* mount table utilities */ + struct mnt_list { + char *path; ++ char *fs_name; + char *fs_type; + pid_t pid; + time_t last_access; +@@ -282,6 +285,7 @@ + struct mnt_list *reverse_mnt_list(struct mnt_list *list); + struct mnt_list *get_base_mnt_list(struct mnt_list *list); + void free_mnt_list(struct mnt_list *list); ++int contained_in_local_fs(const char *path); + int is_mounted(const char *table, const char *path); + int has_fstab_option(const char *path, const char *opt); + int allow_owner_mount(const char *); +diff -Naur .B/lib/mounts.c .A/lib/mounts.c +--- .B/lib/mounts.c 2005-01-17 15:09:28.000000000 +0000 ++++ .A/lib/mounts.c 2007-01-07 21:36:36.000000000 +0000 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + + #include "automount.h" +@@ -35,7 +36,6 @@ + struct mntent *mnt; + struct mnt_list *ent, *mptr, *last; + struct mnt_list *list = NULL; +- struct stat st; + int len; + + if (!path || !pathlen || pathlen > PATH_MAX) +@@ -91,6 +91,14 @@ + } + strcpy(ent->path, mnt->mnt_dir); + ++ ent->fs_name = malloc(strlen(mnt->mnt_fsname) + 1); ++ if (!ent->fs_name) { ++ endmntent(tab); ++ free_mnt_list(list); ++ return NULL; ++ } ++ strcpy(ent->fs_name, mnt->mnt_fsname); ++ + ent->fs_type = malloc(strlen(mnt->mnt_type) + 1); + if (!ent->fs_type) { + endmntent(tab); +@@ -105,16 +113,6 @@ + } + endmntent(tab); + +- mptr = list; +- while (mptr) { +- mptr->last_access = time(NULL); +- +- if (stat(mptr->path, &st) != -1) +- mptr->last_access = st.st_atime; +- +- mptr = mptr->next; +- } +- + return list; + } + +@@ -242,6 +240,9 @@ + if (this->path) + free(this->path); + ++ if (this->fs_name) ++ free(this->fs_name); ++ + if (this->fs_type) + free(this->fs_type); + +@@ -282,7 +283,48 @@ + + return ret; + } +- ++ ++int contained_in_local_fs(const char *path) ++{ ++ struct mnt_list *mnts, *this; ++ size_t pathlen = strlen(path); ++ struct statfs fs; ++ int rv, ret; ++ ++ if (!path || !pathlen || pathlen > PATH_MAX) ++ return 0; ++ ++ mnts = get_mnt_list(_PATH_MOUNTED, "/", 1); ++ if (!mnts) ++ return 0; ++ ++ ret = 0; ++ ++ for (this = mnts; this != NULL; this = this->next) { ++ size_t len = strlen(this->path); ++ ++ if (!strncmp(path, this->path, len)) { ++ if (len > 1 && pathlen > len && path[len] != '/') ++ continue; ++ rv = statfs(this->path, &fs); ++ if (rv != -1 && fs.f_type == AUTOFS_SUPER_MAGIC) ++ ret = 1; ++ else if (this->fs_name[0] == '/') { ++ if (strlen(this->fs_name) > 1) { ++ if (this->fs_name[1] != '/') ++ ret = 1; ++ } else ++ ret = 1; ++ } ++ break; ++ } ++ } ++ ++ free_mnt_list(mnts); ++ ++ return ret; ++} ++ + int is_mounted(const char *table, const char *path) + { + int ret = 0; --- autofs-4.1.4+debian.orig/debian/patches/068_fix_invalid_rpcgen_code.dpatch +++ autofs-4.1.4+debian/debian/patches/068_fix_invalid_rpcgen_code.dpatch @@ -0,0 +1,21 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 068_fix_invalid_rpcgen_code.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/lib/Makefile .A/lib/Makefile +--- .B/lib/Makefile 2005-01-09 09:16:43.000000000 +0000 ++++ .A/lib/Makefile 2007-01-07 21:36:36.000000000 +0000 +@@ -39,6 +39,10 @@ + + mount_xdr.c: mount.h + $(RPCGEN) -c -o mount_xdr.c mount.x ++ sed -i -e 's/IXDR_GET_LONG(\([^)]*\))/((long)IXDR_GET_U_INT32(\1))/' mount_xdr.c ++ sed -i -e 's/IXDR_PUT_LONG(\([^)]*\),\([^)]*\))/((long)IXDR_PUT_INT32(\1,(long)(\2)))/' mount_xdr.c ++ sed -i -e 's/IXDR_GET_SHORT(\([^)]*\))/((short)IXDR_GET_U_INT32(\1))/' mount_xdr.c ++ sed -i -e 's/IXDR_PUT_SHORT(\([^)]*\),\([^)]*\))/((long)IXDR_PUT_INT32(\1,(long)(\2)))/' mount_xdr.c + + mount_xdr.o: mount_xdr.c + $(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c --- autofs-4.1.4+debian.orig/debian/patches/069_support_spaces_in_smb_share_names.dpatch +++ autofs-4.1.4+debian/debian/patches/069_support_spaces_in_smb_share_names.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 069_support_spaces_in_smb_share_names.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.smb .A/samples/auto.smb +--- .B/samples/auto.smb 2005-04-05 13:02:09.000000000 +0000 ++++ .A/samples/auto.smb 2007-01-07 21:36:36.000000000 +0000 +@@ -20,7 +20,7 @@ + + $SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- ' + BEGIN { ORS=""; first=1 } +- /Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 } ++ /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 } + END { if (!first) print "\n"; else exit 1 } + ' + --- autofs-4.1.4+debian.orig/debian/patches/085-auto.net-lp111612.dpatch +++ autofs-4.1.4+debian/debian/patches/085-auto.net-lp111612.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 085-auto.net-lp111612 by Morten Kjeldgaard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix problem with directories exported multiple times to different +## DP: hosts (LP: #111612). + +@DPATCH@ + +--- samples/auto.net 2008-04-09 16:32:59.000000000 +0200 ++++ foo/samples/auto.net 2008-04-09 16:34:29.000000000 +0200 +@@ -37,7 +37,7 @@ + # Newer distributions get this right + SHOWMOUNT="$SMNT --no-headers -e $key" + +-$SHOWMOUNT | LC_ALL=C sort -k 1 | \ ++$SHOWMOUNT | LC_ALL=C cut -d' ' -f1 | LC_ALL=C sort -k 1 | \ + awk -v key="$key" -v opts="$opts" -- ' + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } --- autofs-4.1.4+debian.orig/debian/patches/075_auto_net_escape_hash.dpatch +++ autofs-4.1.4+debian/debian/patches/075_auto_net_escape_hash.dpatch @@ -0,0 +1,16 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 075_auto_net_escape_hash.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.net .A/samples/auto.net +--- .B/samples/auto.net 2007-01-07 21:36:36.000000000 +0000 ++++ .A/samples/auto.net 2007-01-07 21:36:36.000000000 +0000 +@@ -42,4 +42,4 @@ + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } + END { if (!first) print "\n"; else exit 1 } +- ' ++ ' | sed 's/#/\\#/g' --- autofs-4.1.4+debian.orig/debian/patches/079_no_unlink_upstream.dpatch +++ autofs-4.1.4+debian/debian/patches/079_no_unlink_upstream.dpatch @@ -0,0 +1,55 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 079_no_unlink_upstream.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/daemon/automount.c .A/daemon/automount.c +--- .B/daemon/automount.c 2007-01-07 21:36:36.000000000 +0000 ++++ .A/daemon/automount.c 2007-01-07 21:36:37.000000000 +0000 +@@ -232,16 +232,38 @@ + static int rm_unwanted_fn(const char *file, const struct stat *st, int when, void *arg) + { + int rmsymlink = *(int *) arg; ++ struct stat newst; + + if (when == 0) { + if (st->st_dev != ap.dev) + return 0; +- } else { +- info("rm_unwanted: %s\n", file); +- if (S_ISDIR(st->st_mode)) +- rmdir(file); +- else if (!S_ISLNK(st->st_mode) || rmsymlink) +- unlink(file); ++ return 1; ++ } ++ ++ if (lstat(file, &newst)) { ++ crit ("rm_unwanted: unable to stat file, possible race " ++ "condition."); ++ return 0; ++ } ++ ++ if (newst.st_dev != ap.dev) { ++ crit ("rm_unwanted: file %s has the wrong device, possible " ++ "race condition.",file); ++ return 0; ++ } ++ ++ if (S_ISDIR(newst.st_mode)) { ++ if (rmdir(file)) { ++ info ("rm_unwanted: unable to remove directory" ++ " %s", file); ++ return 0; ++ } ++ } else if (S_ISREG(newst.st_mode)) { ++ crit ("rm_unwanted: attempting to remove files from a mounted " ++ "directory."); ++ return 0; ++ } else if (S_ISLNK(newst.st_mode) && rmsymlink) { ++ unlink(file); + } + + return 1; --- autofs-4.1.4+debian.orig/debian/patches/080_auto_smb_probe_credentials.dpatch +++ autofs-4.1.4+debian/debian/patches/080_auto_smb_probe_credentials.dpatch @@ -0,0 +1,37 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 080_auto_smb_probe_credentials.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.smb .A/samples/auto.smb +--- .B/samples/auto.smb 2007-01-07 21:36:36.000000000 +0000 ++++ .A/samples/auto.smb 2007-01-07 21:36:37.000000000 +0000 +@@ -5,7 +5,9 @@ + # This file must be executable to work! chmod 755! + + key="$1" +-opts="-fstype=cifs" ++mountopts="-fstype=cifs" ++smbopts="" ++credfile="/etc/auto.smb.$key" + + for P in /bin /sbin /usr/bin /usr/sbin + do +@@ -18,7 +20,14 @@ + + [ -x $SMBCLIENT ] || exit 1 + +-$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- ' ++if [ -e $credfile ]; then ++ mountopts="$mountopts,credentials=$credfile" ++ smbopts="-A $credfile" ++else ++ smbopts="-N" ++fi ++ ++$SMBCLIENT $smbopts -gL $key 2>/dev/null| awk -v key="$key" -v opts="$mountopts" -F'|' -- ' + BEGIN { ORS=""; first=1 } + /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 } + END { if (!first) print "\n"; else exit 1 } --- autofs-4.1.4+debian.orig/debian/patches/062_fix_memory_leak.dpatch +++ autofs-4.1.4+debian/debian/patches/062_fix_memory_leak.dpatch @@ -0,0 +1,32 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 062_fix_memory_leak.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/modules/mount_nfs.c .A/modules/mount_nfs.c +--- .B/modules/mount_nfs.c 2007-01-07 21:36:35.000000000 +0000 ++++ .A/modules/mount_nfs.c 2007-01-07 21:36:35.000000000 +0000 +@@ -145,16 +145,20 @@ + he = gethostbyname(hostname); + if (!he) { + error(MODPREFIX "host %s: lookup failure", hostname); ++ free(hostname); + return -1; + } + + for (haddr = he->h_addr_list; *haddr; haddr++) { + local = is_local_addr(hostname, *haddr, he->h_length); +- if (local < 0) ++ if (local < 0) { ++ free(hostname); + return local; ++ } + if (local) { + debug(MODPREFIX "host %s: is localhost", + hostname); ++ free(hostname); + return local; + } + } --- autofs-4.1.4+debian.orig/debian/patches/037_let_debian_rules_decide_on_CFLAGS.dpatch +++ autofs-4.1.4+debian/debian/patches/037_let_debian_rules_decide_on_CFLAGS.dpatch @@ -0,0 +1,34 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 037_let_debian_rules_decide_on_CFLAGS.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/Makefile.rules .A/Makefile.rules +--- .B/Makefile.rules 2004-01-29 16:01:22.000000000 +0000 ++++ .A/Makefile.rules 2007-01-07 21:36:35.000000000 +0000 +@@ -17,15 +17,15 @@ + # Compilers, linkers and flags + # The STRIP defined here *must not* remove any dynamic-loading symbols + +-ifdef DEBUG +-CFLAGS = -O2 -g -DDEBUG +-LDFLAGS = -g ++#ifdef DEBUG ++#CFLAGS = -O2 -g -DDEBUG ++#LDFLAGS = -g + STRIP = : +-else +-CFLAGS = -O3 -fomit-frame-pointer -Wall +-LDFLAGS = -s +-STRIP = strip --strip-debug +-endif ++#else ++#CFLAGS = -O3 -fomit-frame-pointer -Wall ++#LDFLAGS = -s ++#STRIP = strip --strip-debug ++#endif + + CC = gcc + CXX = g++ --- autofs-4.1.4+debian.orig/debian/patches/064_support_options_on_nis_maps.dpatch +++ autofs-4.1.4+debian/debian/patches/064_support_options_on_nis_maps.dpatch @@ -0,0 +1,45 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 064_support_options_on_nis_maps.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in +--- .B/samples/rc.autofs.in 2005-04-11 11:30:54.000000000 +0000 ++++ .A/samples/rc.autofs.in 2007-01-07 21:36:35.000000000 +0000 +@@ -129,7 +129,17 @@ + else + map="$1" + fi +- /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d' ++ ++ # Append the map's options at the _start_ if there are any options already ++ # (ie. myopt -> $2,myopt), otherwise just append them at the end. ++ if [ -z "$2" ]; then ++ /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d' ++ else ++ /usr/bin/ypcat -k "$map" 2> /dev/null | ++ sed -e '/^#/d' -e '/^$/d' \ ++ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]\+-\([^ \t]\+\)/\1 \2 $2,\3/" \ ++ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]*$/\1 \2 $2/" ++ fi + } + + function getfilemounts() +@@ -141,10 +151,11 @@ + if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then + echo $auto_master_in + else +- for nismap in `cat /etc/auto.master | grep '^\+' | +- sed -e '/^#/d' -e '/^$/d'`; do +- catnismap `echo "$nismap" | sed -e 's/^\+//'` +- done ++ cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d' | ( ++ while read map options; do ++ catnismap `echo "$map" | sed -e 's/^\+//'` $options ++ done ++ ) + fi + done + ) --- autofs-4.1.4+debian.orig/debian/patches/067_ldap_no_first_message.dpatch +++ autofs-4.1.4+debian/debian/patches/067_ldap_no_first_message.dpatch @@ -0,0 +1,28 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 067_ldap_no_first_message.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/modules/lookup_ldap.c .A/modules/lookup_ldap.c +--- .B/modules/lookup_ldap.c 2005-02-27 05:37:14.000000000 +0000 ++++ .A/modules/lookup_ldap.c 2007-01-07 21:36:35.000000000 +0000 +@@ -437,7 +437,7 @@ + + e = ldap_first_entry(ldap, result); + if (!e) { +- crit(MODPREFIX "got answer, but no first entry for %s", query); ++ debug(MODPREFIX "got answer, but no first entry for %s", query); + ldap_msgfree(result); + ldap_unbind(ldap); + return CHE_MISSING; +@@ -545,7 +545,7 @@ + + e = ldap_first_entry(ldap, result); + if (!e) { +- crit(MODPREFIX "got answer, but no first entry for %s", query); ++ debug(MODPREFIX "got answer, but no first entry for %s", query); + ldap_msgfree(result); + ldap_unbind(ldap); + return CHE_MISSING; --- autofs-4.1.4+debian.orig/debian/patches/082_samples_makefile_typo.dpatch +++ autofs-4.1.4+debian/debian/patches/082_samples_makefile_typo.dpatch @@ -0,0 +1,18 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 082_samples_makefile_typo.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/Makefile .A/samples/Makefile +--- .B/samples/Makefile 2005-01-04 14:36:54.000000000 +0000 ++++ .A/samples/Makefile 2007-01-07 21:36:37.000000000 +0000 +@@ -42,6 +42,6 @@ + install -c autofs-ldap-auto-master -m 755 $(INSTALLROOT)$(autofslibdir) + endif + +-clean): ++clean: + rm -f *.o *.s autofs-ldap-auto-master rc.autofs + --- autofs-4.1.4+debian.orig/debian/patches/081_auto_net_showmount_quotes.dpatch +++ autofs-4.1.4+debian/debian/patches/081_auto_net_showmount_quotes.dpatch @@ -0,0 +1,19 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 081_auto_net_showmount_quotes.dpatch +## +## DP: No description. + +@DPATCH@ + +diff -Naur .B/samples/auto.net .A/samples/auto.net +--- .B/samples/auto.net 2007-01-07 21:36:36.000000000 +0000 ++++ .A/samples/auto.net 2007-01-07 21:36:37.000000000 +0000 +@@ -32,7 +32,7 @@ + done + done + +-[ -x $SMNT ] || exit 1 ++[ -x "$SMNT" ] || exit 1 + + # Newer distributions get this right + SHOWMOUNT="$SMNT --no-headers -e $key"