Bug 234756 - Underquoting of arguments to iwconfig in ifup-wireless
Summary: Underquoting of arguments to iwconfig in ifup-wireless
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: FC7Target
TreeView+ depends on / blocked
 
Reported: 2007-04-01 13:35 UTC by Robert Bogomip
Modified: 2014-03-17 03:06 UTC (History)
1 user (show)

Fixed In Version: 8.52-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-13 22:42:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Bogomip 2007-04-01 13:35:18 UTC
Description of problem:
When file /etc/sysconfig/network-scripts/1 exists, ifup-wireless fails to pass
correct arguments to iwconfig.

Version-Release number of selected component (if applicable):
Discovered on FC6, x86_64 but appears to be present on a FC5 release too.

How reproducible:
Always

Steps to Reproduce:
1. # touch /etc/sysconfig/network-scripts/{1,2,3,4}
2. # ifup ra0
3. # iwconfig ra0
  
Actual results:
The encryption key is set to $DEFAULTKEY (as sepecified in ifcfg-ra0)

Expected results:
The encryption key should be set to the `$DEFAULTKEY'th key from ifcfg-ra0
(i.e., assuming $DEFAULTKEY is 2, the 2nd key (which would be $KEY2)).


Additional info:
This is caused by ifup-wireless having lines like:

  [ -n "$DEFAULTKEY" ] && iwconfig $DEVICE key [${DEFAULTKEY}]

When a file called 1 is present, bash's filename expansion will strip the square
brackets from [1]. Files with shell metacharacters in them should be quoted:

  [ -n "$DEFAULTKEY" ] && iwconfig $DEVICE key "[${DEFAULTKEY}]"

There are many places where these double quotes need to be added.
Hmmmm.

Comment 1 Bill Nottingham 2007-04-13 22:42:10 UTC
Fixed in CVS, will be in 8.52-1.


Note You need to log in before you can comment on or make changes to this bug.