Bug 802711 - dhclient does not correctly escape SSIDs - prevents suspend from working
dhclient does not correctly escape SSIDs - prevents suspend from working
Status: CLOSED DUPLICATE of bug 846081
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
16
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
: 848089 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-13 06:34 EDT by Nick Strugnell
Modified: 2012-08-17 14:04 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-26 08:36:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nick Strugnell 2012-03-13 06:34:35 EDT
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 06:35:39 EDT
Created attachment 569631 [details]
suspend log demonstrating abort due to dhcpclient fail
Comment 2 Jiri Popelka 2012-03-13 07:10:05 EDT
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 08:15:18 EDT
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 08:36:51 EDT
(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 06:04:58 EDT
(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 03:44:32 EDT

*** This bug has been marked as a duplicate of bug 846081 ***
Comment 7 Jiri Popelka 2012-08-17 14:04:00 EDT
*** 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.