Network connection cannot be saved as system setting if connection name contains a "/" character

Bug #259714 reported by Benjamin Woods
4
Affects Status Importance Assigned to Milestone
Network Manager Applet
Fix Released
Low
network-manager-applet (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: network-manager-gnome

When attempting to save my existing network connection as a system setting (so that it will load on boot without the need to log in), I receive an error: "Adding connection failed: Saving connection failed..".

Steps to reproduce:
1. Use gnome-network-manager (I was in Ubuntu Intrepid 8.10 alpha 4)
2. Right click on notification area icon and select "Edit connections..."
3. Add a new connection named "test / conn" with any details but do not specify it as a system setting (notice that it saves with no error and would work)
4. Edit the connection again, but this time tick the "System setting" box (notice the error described above)

Actual results:
The following is listed in the syslog:
nm-system-settings: Error chowning '/etc/NetworkManager/system-connections/test / conn': 2
nm-system-settings: Error while saving connection: Failed to create file '/etc/NetworkManager/system-connections/test / conn.I4ZZFU': No such file or directory

Expected results:
The connection should be correctly saved as a system setting and a file "/etc/NetworkManager/system-connections/test / conn" should be created.

Does this happen every time?
Yes, as long as the connection name includes a "/" character

Other information:
This should be fixed by making the command which creates the connection file in the "/etc/NetworkManager/system-connections/" folder insensitive to special characters.

I am unsure if this is a Ubuntu specific bug or if it is an upstream issue. I have also filed this bug in the gnome bugtracker at the following address: http://bugzilla.gnome.org/show_bug.cgi?id=548608

Revision history for this message
Cédric Jeanneret deactivated (cjeanneret-c2c-deactivated) wrote :

hm.... "/" is a VERY special caracter, as it's the separator for your filesystem tree.... just try to do a "touch /tmp/my/super/file" and you'll see...

Revision history for this message
Benjamin Woods (woodsb02-gmail) wrote :

Yes, I agree. However it is possible to have an ESSID with a "/" in it. So there should be a decided way to deal with this. You can't just say, the Linux filesystem cannot deal with "/" so we will stop you from saving any wireless connection details with a "/" in their name. Perhaps replace them with a "_" and have it search for them too when try to find the details?

Revision history for this message
Cédric Jeanneret deactivated (cjeanneret-c2c-deactivated) wrote :

in this way, you're right :->
-> maybe NM should save files with another name, for example connexion name instead of essid (as we can name our connexion).
I guess it's indeed an upstream bug, as we can reproduce this in other distributions.
good luck ;)

Revision history for this message
Benjamin Woods (woodsb02-gmail) wrote :

Internux,

The thing is NM does save files using the connection name and not the ESSID. However, the default connection name given is "Auto ESSID" where you replace ESSID with the actual essid. In creating this default connection name, network manager should replace any "/" characters in the ESSID with an "_" and also prevent users manually typing a "/" character in that field.

See screenshot for how I solved the problem manually. (I renamed the connection name). The problem is that the error messages received are a bit cryptic and don't inform you that it is a problem with the given connection name.

Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

This is fixed in Jaunty. Thanks for reporting.

Changed in network-manager-applet:
importance: Undecided → Unknown
status: New → Unknown
status: New → Fix Released
importance: Undecided → Low
Changed in network-manager-applet:
status: Unknown → Fix Released
Changed in network-manager-applet:
importance: Unknown → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.