[Pkg-utopia-commits] r144 - packages/hal/trunk/debian

Sjoerd Simons sjoerd@haydn.debian.org
Sun, 19 Dec 2004 10:38:14 -0700


Author: sjoerd
Date: 2004-12-19 10:37:02 -0700 (Sun, 19 Dec 2004)
New Revision: 144

Modified:
   packages/hal/trunk/debian/changelog
   packages/hal/trunk/debian/hal-unmount.dev
Log:
Sanity check  in hal-unmount.dev

Modified: packages/hal/trunk/debian/changelog
===================================================================
--- packages/hal/trunk/debian/changelog	2004-12-19 16:31:45 UTC (rev 143)
+++ packages/hal/trunk/debian/changelog	2004-12-19 17:37:02 UTC (rev 144)
@@ -4,8 +4,11 @@
     + Added. In /etc/mtab and /proc/mounts some special chars (like space) are
     encoded in octal from. Decode these into normal chars again. Fixes
     problems with spaces in mountpoints (Closes: #284322)
+  * debian/hal-unmount.dev:
+    - Sanity-check $DEVNAME to make sure it begins with a slash, so we don't 
+      get bitten by DEVNAME=-a or DEVNAME="". Thanks to Scott James Remnant
 
- -- Sjoerd Simons <sjoerd@debian.org>  Sat, 18 Dec 2004 22:11:49 +0100
+ -- Sjoerd Simons <sjoerd@debian.org>  Sun, 19 Dec 2004 18:32:47 +0100
 
 hal (0.4.2-2) unstable; urgency=medium
 

Modified: packages/hal/trunk/debian/hal-unmount.dev
===================================================================
--- packages/hal/trunk/debian/hal-unmount.dev	2004-12-19 16:31:45 UTC (rev 143)
+++ packages/hal/trunk/debian/hal-unmount.dev	2004-12-19 17:37:02 UTC (rev 144)
@@ -1,4 +1,8 @@
 #!/bin/sh
+
+# sanity check. DEVNAME should start with a /
+[ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0
+
 # Lazily unmount drives which are removed, but still mounted
 if [ "$ACTION" = remove ] && grep -q "^$DEVNAME" /proc/mounts; then
   if [ -x /usr/bin/pumount ] ; then