Package: linux-wlan-ng
Version: 0.2.4+svn20060808-2
Severity: normal
Tags: patch

The check for hotplug or not inside /etc/wlan/shared uses [ -x ]
on the output from a cat command that potentially is empty.
This will return "true" if the cat output is empty:
[ -x "" ] returns false, but
[ -x ] returns true, and
[ -x `cat /dev/null` ] returns true as well.
Adding double quotes around the cat output will make the test 
correctly return false when there is no hotplug binary.

This bug was reported in Ubuntu, https://launchpad.net/bugs/50138
but will there cause an error, instead of silently return true.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages linux-wlan-ng depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  udev                         0.093-1     /dev/ and hotplug management daemo
ii  wireless-tools               28-1        Tools for manipulating Linux Wirel

Versions of packages linux-wlan-ng recommends:
pn  linux-wlan-ng-doc             <none>     (no description available)

-- no debconf information
--- shared.orig 2006-08-22 13:36:39.000000000 +0200
+++ shared      2006-09-05 00:00:16.000000000 +0200
@@ -75,7 +75,7 @@
 
 if [ ! -n "$WLAN_UDEV" ] ; then
 if [ -f /proc/sys/kernel/hotplug -a \
-       -x `cat /proc/sys/kernel/hotplug` -a \
+       -x "`cat /proc/sys/kernel/hotplug`" -a \
        -f /etc/hotplug/wlan.agent ] ; then
        HAS_HOTPLUG=y
 else

Reply via email to