Subject: misc/29317: ifconfig.if does not allow parameters with spaces
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <cliff@snipe444.org>
List: netbsd-bugs
Date: 02/09/2005 19:09:01
	Note: There was a bad value `' for the field `Priority'.
	It was set to the default value of `medium'.

>Number:         29317
>Category:       misc
>Synopsis:       ifconfig.if does not allow parameters with spaces
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 09 19:09:01 +0000 2005
>Originator:     Cliff Wright
>Release:        NetBSD 2.0_BETA
>Organization:
	
>Environment:
	
	
System: NetBSD vixen 2.0_BETA NetBSD 2.0_BETA (vixen) #0: Mon Oct 4 22:37:41 PDT 2004 cliff@vixen:/usr/src/sys/arch/i386/compile/vixen i386
Architecture: i386
Machine: i386
>Description:
	
	When adding a variable that contains spaces to an
	/etc/ifconfig.if file the /etc/rc.d/network script does not
	handle the spaces. An example for /etc/ifconfig.ath0:

	ssid example
	mode 11g
	nwkey 'key with spaces'
	192.168.0.1

>How-To-Repeat:
	
	See above example
>Fix:
	
	An eval needs to added before the ifconfig line, as below
	patch shows

--- /etc/rc.d/network.orig	2003-10-12 02:50:05.000000000 -0700
+++ /etc/rc.d/network	2005-02-09 10:44:05.000000000 -0800
@@ -206,7 +206,7 @@
 						eval ${args#*!}
 						;;
 					*)
-						ifconfig $int $args
+						eval ifconfig $int $args
 						;;
 					esac
 				done < /etc/ifconfig.$int

>Unformatted: