Red Hat Bugzilla – Bug 802711
dhclient does not correctly escape SSIDs - prevents suspend from working
Last modified: 2012-08-17 14:04:00 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):
Steps to Reproduce:
1. cp attached ifcfg file to /etc/sysconfig/network-scripts
2. Select suspend from user menu
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"
suspend shoud work!
Created attachment 569631 [details]
suspend log demonstrating abort due to dhcpclient fail
Problem is that
are not correct bash strings,
NAME="Auto JoikuSpot_Martin\'s h"
So the problem is not in dhclient but in program/hands that introduced
these ESSID and DEVICE lines.
Ok, I'm reassigning this to NetworkManager as that's probably the cause of these wrong string variables definitions.
(In reply to comment #2)
> Problem is that
> ESSID='JoikuSpot_Martin\'s h'
> are not correct bash strings,
> NAME="Auto JoikuSpot_Martin\'s h"
> 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.
(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.
*** This bug has been marked as a duplicate of bug 846081 ***
*** Bug 848089 has been marked as a duplicate of this bug. ***