[Pkg-samba-maint] r3439 - branches/samba/backports-unofficial/lenny-latest/debian

bubulle at alioth.debian.org bubulle at alioth.debian.org
Sat Apr 10 18:06:45 UTC 2010


Author: bubulle
Date: 2010-04-10 18:06:43 +0000 (Sat, 10 Apr 2010)
New Revision: 3439

Added:
   branches/samba/backports-unofficial/lenny-latest/debian/smbfs.NEWS
Modified:
   branches/samba/backports-unofficial/lenny-latest/debian/changelog
   branches/samba/backports-unofficial/lenny-latest/debian/mount.smbfs
   branches/samba/backports-unofficial/lenny-latest/debian/rules
   branches/samba/backports-unofficial/lenny-latest/debian/smbfs.dirs
   branches/samba/backports-unofficial/lenny-latest/debian/smbfs.files
   branches/samba/backports-unofficial/lenny-latest/debian/smbfs.links
Log:
Re-add smbfs package as there is no cifs-utils in lenny


Modified: branches/samba/backports-unofficial/lenny-latest/debian/changelog
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/changelog	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/changelog	2010-04-10 18:06:43 UTC (rev 3439)
@@ -3,6 +3,7 @@
   * Backport to lenny. Do our best to resync all packaging changes
     with what we have in squeeze
   * Drop PAM profile for winbind (not supported in lenny)
+  * Reintroduce smbfs package (there is no cifs-utils in lenny)
 
  -- Christian Perrier <bubulle at debian.org>  Sat, 13 Mar 2010 12:02:20 +0100
 

Modified: branches/samba/backports-unofficial/lenny-latest/debian/mount.smbfs
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/mount.smbfs	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/mount.smbfs	2010-04-10 18:06:43 UTC (rev 3439)
@@ -113,3 +113,118 @@
 USER="$(reverse_username_workgroup "$USER")"
 
 exec /sbin/mount.cifs "${args[@]}"
+#!/bin/bash
+# Debian mount.smbfs compatibility wrapper
+# Copyright 2007, Steve Langasek <vorlon at debian.org>
+# Licensed under the GNU General Public License, version 2.  See the
+# file /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+# This script accepts all documented mount options for mount.smbfs,
+# passing through those that are also recognized by mount.cifs,
+# converting those that are not recognized but map to available cifs
+# options, and warning about the use of options for which no equivalent
+# exists.
+
+# known bugs: quoted spaces in arguments are not passed intact
+
+set -e
+
+# reverse the order of username and password in a "username" parameter,
+# taking care to leave any "%password" bit intact
+
+reverse_username_workgroup() {
+	local workgroup password username
+
+	username="$1"
+	case "$username" in
+	*%*)	password="${username#*%}"
+		username="${username%%%*}"
+		;;
+	*) ;;
+	esac
+	case "$username" in
+	*/*)	workgroup="${username#*/}"
+		username="${username%%/*}"
+		;;
+	*) ;;
+	esac
+	if [ -n "$workgroup" ]; then
+		username="$workgroup\\$username"
+	fi
+	if [ -n "$password" ]; then
+		username="$username%$password"
+	fi
+	echo "$username"
+}
+
+
+# parse out the mount options that have been specified using -o, and if
+# necessary, convert them for use by mount.cifs
+
+parse_mount_options () {
+	local OLD_IFS IFS options option username
+	OLD_IFS="$IFS"
+	IFS=","
+	options=""
+	workgroup=""
+	password=""
+
+	for option in $@; do
+		case "$option" in
+		sockopt=* | scope=* | codepage=* | ttl=* | debug=*)
+			echo "Warning: ignoring deprecated smbfs option '$option'" >&2
+			;;
+
+		krb)
+			options="$options${options:+,}sec=krb5"
+			;;
+
+		guest)
+			echo "Warning: mapping 'guest' to 'guest,sec=none'" >&2
+			options="$options${options:+,}guest,sec=none"
+			;;
+
+		# username and workgroup are reversed in username= arguments,
+		# so need to be parsed out
+		username=*/*)
+			IFS="$OLD_IFS"
+			username="${option#username=}"
+			username="$(reverse_username_workgroup "$username")"
+			IFS=","
+			options="$options${options:+,}username=$username"
+			;;
+
+		*)
+			options="$options${options:+,}$option"
+			;;
+		esac
+	done
+	IFS="$OLD_IFS"
+	echo $options
+}
+
+args=()
+while [ "$#" -gt 0 ]; do
+	case "$1" in
+	-o*)
+		arg=${1#-o}
+		shift
+		if [ -z "$arg" ]; then
+			arg=$1
+			shift
+		fi
+		arg="$(parse_mount_options "$arg")"
+		if [ -n "$arg" ]; then
+			args=("${args[@]}" "-o" "$arg")
+		fi
+		;;
+	*)
+		args=("${args[@]}" "$1")
+		shift
+		;;
+	esac
+done
+
+USER="$(reverse_username_workgroup "$USER")"
+
+exec /sbin/mount.cifs "${args[@]}"

Modified: branches/samba/backports-unofficial/lenny-latest/debian/rules
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/rules	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/rules	2010-04-10 18:06:43 UTC (rev 3439)
@@ -68,6 +68,8 @@
 ifeq ($(DEB_HOST_ARCH_OS),linux)
   conf_args += \
 		--with-ctdb=/usr --with-cluster-support=yes \
+		--with-cifsmount \
+		--with-cifsupcall \
 		--with-cifsumount \
 		--with-acl-support \
 		--with-quotas
@@ -129,6 +131,10 @@
   DH_EXTRAS=-Nsmbfs
 endif
 
+ifeq ($(smbfs),no)
+  DH_EXTRAS=-Nsmbfs
+endif
+
 install: DH_OPTIONS=$(DH_EXTRAS)
 install: build
 	dh_testdir
@@ -181,6 +187,10 @@
 	install -m 0755 debian/mount.smbfs $(DESTDIR)/sbin/mount.smbfs
 endif
 
+ifeq ($(mount_cifs),yes)
+	install -m 0755 debian/mount.smbfs $(DESTDIR)/sbin/mount.smbfs
+endif
+
 	# For CUPS to support printing to samba printers, it's necessary
 	#	to make the following symlink (according to
 	#	Erich Schubert <debian at vitavonni.de> in #109509):

Added: branches/samba/backports-unofficial/lenny-latest/debian/smbfs.NEWS
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/smbfs.NEWS	                        (rev 0)
+++ branches/samba/backports-unofficial/lenny-latest/debian/smbfs.NEWS	2010-04-10 18:06:43 UTC (rev 3439)
@@ -0,0 +1,10 @@
+smbfs (2:3.4.5~dfsg-2) unstable; urgency=low
+
+  * As of this version, the mount.cifs binary is no longer setuid.
+    Upstream has always been increasingly unsupportive of this
+    configuration over time. For instance, in bugs like
+    https://bugzilla.samba.org/show_bug.cgi?id=6853, it is clearly
+    mentioned that having it setuid root is discouraged.
+    
+ -- Christian Perrier <bubulle at debian.org>  Sat, 06 Feb 2010 15:09:00 +0100
+    
\ No newline at end of file

Modified: branches/samba/backports-unofficial/lenny-latest/debian/smbfs.dirs
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/smbfs.dirs	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/smbfs.dirs	2010-04-10 18:06:43 UTC (rev 3439)
@@ -1 +1,2 @@
 sbin
+sbin

Modified: branches/samba/backports-unofficial/lenny-latest/debian/smbfs.files
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/smbfs.files	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/smbfs.files	2010-04-10 18:06:43 UTC (rev 3439)
@@ -5,3 +5,10 @@
 usr/share/man/man8/mount.cifs.8
 usr/share/man/man8/umount.cifs.8
 usr/share/man/man8/cifs.upcall.8
+sbin/mount.smbfs
+sbin/mount.cifs
+sbin/umount.cifs
+usr/sbin/cifs.upcall
+usr/share/man/man8/mount.cifs.8
+usr/share/man/man8/umount.cifs.8
+usr/share/man/man8/cifs.upcall.8

Modified: branches/samba/backports-unofficial/lenny-latest/debian/smbfs.links
===================================================================
--- branches/samba/backports-unofficial/lenny-latest/debian/smbfs.links	2010-04-10 17:40:59 UTC (rev 3438)
+++ branches/samba/backports-unofficial/lenny-latest/debian/smbfs.links	2010-04-10 18:06:43 UTC (rev 3439)
@@ -3,3 +3,8 @@
 usr/share/man/man8/umount.cifs.8 usr/share/man/man8/smbumount.8
 usr/share/man/man8/mount.cifs.8 usr/share/man/man8/smbmount.8
 usr/share/man/man8/mount.cifs.8 usr/share/man/man8/mount.smbfs.8
+sbin/mount.smbfs usr/bin/smbmount
+sbin/umount.cifs usr/bin/smbumount
+usr/share/man/man8/umount.cifs.8 usr/share/man/man8/smbumount.8
+usr/share/man/man8/mount.cifs.8 usr/share/man/man8/smbmount.8
+usr/share/man/man8/mount.cifs.8 usr/share/man/man8/mount.smbfs.8





More information about the Pkg-samba-maint mailing list