Bug 802711 - dhclient does not correctly escape SSIDs - prevents suspend from working
Summary: dhclient does not correctly escape SSIDs - prevents suspend from working
Keywords:
Status: CLOSED DUPLICATE of bug 846081
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 848089 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-13 10:34 UTC by Nick Strugnell
Modified: 2012-08-17 18:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-26 12:36:51 UTC
Type: ---


Attachments (Terms of Use)
ifcfg that triggers the error (290 bytes, text/plain)
2012-03-13 10:34 UTC, Nick Strugnell
no flags Details
suspend log demonstrating abort due to dhcpclient fail (6.62 KB, text/x-log)
2012-03-13 10:35 UTC, Nick Strugnell
no flags Details

Description Nick Strugnell 2012-03-13 10:34:35 UTC
Created attachment 569629 [details]
ifcfg that triggers the error

Description of problem:
/usr/lib64/pm-utils/sleep.d/56dhclient fails on SSIDs that contain an apostrophe. This results in suspend and hibernate aborting.

Version-Release number of selected component (if applicable):
dhclient-4.2.3-6.P2.fc16.x86_64

How reproducible:
Always

Steps to Reproduce:
1. cp attached ifcfg file to /etc/sysconfig/network-scripts
2. Select suspend from user menu
3. 
  
Actual results:
Screensaver activates but machine does not suspend. Inspection of /var/log/pm-suspend.log shows that 56dhclient returned an exit status of 2, causing suspend to abort. 

Further investigation shows that dhclient barfed on the ifcfg containing the SSID "Auto JoikuSpot_Martin\'s h"

Expected results:
suspend shoud work!

Additional info:

Comment 1 Nick Strugnell 2012-03-13 10:35:39 UTC
Created attachment 569631 [details]
suspend log demonstrating abort due to dhcpclient fail

Comment 2 Jiri Popelka 2012-03-13 11:10:05 UTC
Problem is that
ESSID='JoikuSpot_Martin\'s h'
or
DEVICE=Auto_JoikuSpot_Martin's_h
are not correct bash strings,
while
NAME="Auto JoikuSpot_Martin\'s h"
is.

So the problem is not in dhclient but in program/hands that introduced
these ESSID and DEVICE lines.

Comment 3 Jiri Popelka 2012-03-15 12:15:18 UTC
Ok, I'm reassigning this to NetworkManager as that's probably the cause of these wrong string variables definitions.

Comment 4 Jirka Klimes 2012-03-26 12:36:51 UTC
(In reply to comment #2)
> Problem is that
> ESSID='JoikuSpot_Martin\'s h'
> or
> DEVICE=Auto_JoikuSpot_Martin's_h
> are not correct bash strings,
> while
> NAME="Auto JoikuSpot_Martin\'s h"
> is.
> 
> So the problem is not in dhclient but in program/hands that introduced
> these ESSID and DEVICE lines.

Yeah, the ESSID and DEVICE are not placed in double quotes, that results in bash failing on the file.
However, NetworkManager *does* put the string in double quotes when it contains an apostrophe (or other special characters). So, the ifcfg file from the Description was probably modified manually.

Closing as not a bug. Feel free to reopen if NM (nm-connection-editor) creates
invalid ifcfg-* files.

Comment 5 Jiri Popelka 2012-08-07 10:04:58 UTC
(In reply to comment #4)
> However, NetworkManager *does* put the string in double quotes when it
> contains an apostrophe (or other special characters). So, the ifcfg file
> from the Description was probably modified manually.

Seems that system-config-network was the culprit, see bug #846081.

Comment 6 Jiri Popelka 2012-08-16 07:44:32 UTC

*** This bug has been marked as a duplicate of bug 846081 ***

Comment 7 Jiri Popelka 2012-08-17 18:04:00 UTC
*** Bug 848089 has been marked as a duplicate of this bug. ***


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