[Pkg-samba-maint] r1561 - trunk/samba/debian

vorlon at alioth.debian.org vorlon at alioth.debian.org
Tue Nov 13 22:06:41 UTC 2007


Author: vorlon
Date: 2007-11-13 22:06:41 +0000 (Tue, 13 Nov 2007)
New Revision: 1561

Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/samba.postinst
Log:
On Ubuntu, support autopopulating the sambashare group using the existing
members of the admin group; no equivalent handling is done on Debian,
because there doesn't seem to be an appropriate template group we can use
that wouldn't be considered a privilege escalation for those users.



Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2007-11-13 22:01:55 UTC (rev 1560)
+++ trunk/samba/debian/changelog	2007-11-13 22:06:41 UTC (rev 1561)
@@ -11,6 +11,10 @@
     default limit of 100, to support user shares on both upgrades and new
     installs with no need to munge config files.  Thanks to Mathias Gug
     <mathiaz at ubuntu.com> for the patch.  Closes: #443230.
+  * On Ubuntu, support autopopulating the sambashare group using the existing
+    members of the admin group; no equivalent handling is done on Debian,
+    because there doesn't seem to be an appropriate template group we can use
+    that wouldn't be considered a privilege escalation for those users.
 
   [ Debconf translations ]
   * Hebrew added. Closes: #444054
@@ -25,7 +29,7 @@
     reporting and contributions from Launchpad's #156686
     Closes: #449422
 
- -- Steve Langasek <vorlon at debian.org>  Sat, 10 Nov 2007 18:18:48 -0800
+ -- Steve Langasek <vorlon at debian.org>  Tue, 13 Nov 2007 11:55:48 -0800
 
 samba (3.0.26a-1) unstable; urgency=low
 

Modified: trunk/samba/debian/samba.postinst
===================================================================
--- trunk/samba/debian/samba.postinst	2007-11-13 22:01:55 UTC (rev 1560)
+++ trunk/samba/debian/samba.postinst	2007-11-13 22:06:41 UTC (rev 1561)
@@ -128,6 +128,19 @@
 if ! getent group sambashare > /dev/null 2>&1
 then
 	addgroup --system sambashare
+	# Only on Ubuntu, use the "admin" group as a template for the
+	# initial users for this group; Debian has no equivalent group,
+	# so leaving the sambashare group empty is the more secure default
+	if [ -x "`which lsb_release 2>/dev/null`" ] \
+	   && [ "`lsb_release -s -i`" = "Ubuntu" ]
+	then
+		OLDIFS="$IFS"
+		IFS=","
+		for USER in `getent group admin | cut -f4 -d:`; do
+			adduser "$USER" sambashare
+		done
+		IFS="$OLDIFS"
+	fi
 fi
 
 if [ ! -e /var/lib/samba/usershares ]




More information about the Pkg-samba-maint mailing list