[pkg-wpa-devel] Bug#373179: /sbin/wpa_action: ifstate file location is incorrect

Modestas Vainius geromanas at mailas.com
Tue Jun 13 11:03:32 UTC 2006


Package: wpasupplicant
Version: 0.5.3+20060522-2
Severity: important
Tags: patch

Hello,

/sbin/wpa_action attempts to access /etc/network/ifstate file which does not
exist. A correct path is /etc/network/run/ifstate. The attached patch
fixes this.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-amd64-k8
Locale: LANG=lt_LT, LC_CTYPE=lt_LT (charmap=ISO-8859-13)

Versions of packages wpasupplicant depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libncurses5                   5.5-2      Shared libraries for terminal hand
ii  libreadline5                  5.1-7      GNU readline and history libraries
ii  libssl0.9.8                   0.9.8b-2   SSL shared libraries

wpasupplicant recommends no packages.

-- no debconf information
-------------- next part --------------
--- wpa_action.old	2006-06-12 18:52:05.000000000 +0300
+++ wpa_action	2006-06-13 13:12:56.000000000 +0300
@@ -26,6 +26,8 @@
 # action in [CONNECTED|DISCONNECTED|stop] is second argument
 ACTION="$2"
 
+IFSTATE_FILE="/etc/network/run/ifstate"
+
 # network identification string provided by id_str, fallback to "default"
 if [ -z "$WPA_ID_STR" ]; then
 	WPA_ID_STR="default"
@@ -45,7 +47,7 @@
 		if /bin/grep -q "^iface $WPA_ID_STR inet" /etc/network/interfaces; then
 			echo "ifup $IFACE=$WPA_ID_STR"
 			# Map and bring up the IFACE
-			if /bin/grep -q "^$IFACE=$IFACE" /etc/network/ifstate; then
+			if /bin/grep -q "^$IFACE=$IFACE" "$IFSTATE_FILE"; then
 				# Force settings over the unconfigured "master" IFACE
 				/sbin/ifup --force "$IFACE=$WPA_ID_STR"
 			else
@@ -58,7 +60,7 @@
 
 	"DISCONNECTED")
 		log_action
-		if /bin/grep -q "^$IFACE=$WPA_ID_STR" /etc/network/ifstate; then
+		if /bin/grep -q "^$IFACE=$WPA_ID_STR" "$IFSTATE_FILE"; then
 			echo "ifdown $IFACE=$WPA_ID_STR"
 			# Take down the IFACE
 			/sbin/ifdown "$IFACE=$WPA_ID_STR"
@@ -84,7 +86,7 @@
 		fi
 
 		# Take down the IFACE if up
-		if /bin/grep -q "^$IFACE" /etc/network/ifstate; then
+		if /bin/grep -q "^$IFACE" "$IFSTATE_FILE"; then
 			/sbin/ifdown "$IFACE"
 		fi
 		
@@ -109,3 +111,4 @@
 		exit 1
 		;;
 esac
+


More information about the Pkg-wpa-devel mailing list