Merge lp:~brendan-donegan/checkbox/bug1073335 into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Daniel Manrique
Approved revision: 1807
Merged at revision: 1831
Proposed branch: lp:~brendan-donegan/checkbox/bug1073335
Merge into: lp:checkbox
Diff against target: 39 lines (+8/-2)
2 files modified
debian/changelog (+5/-1)
scripts/create_connection (+3/-1)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1073335
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+134648@code.launchpad.net

Commit message

Fix bug 1073335 - replace forward-slash with asterisk when naming connection files in NetworkManager

Description of the change

As discovered at UDS, because of the way NetworkManager stores connection info (as files in '/etc/NetworkManager/system-connections'), having forward slashes in the name would be somewhat problematic. What NetworkManager itself does to get around this is to replace the forward slash with an asterisk, so we must do the same in create_connection. I tested this by changing the SSID of my network at home to include a forward slash and it still works well.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks simple enough, I don't love having asterisks in filenames but if it's legal and consistent with NetworkManager, I'm OK with it. Thanks!

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Attempt to merge into lp:checkbox failed due to conflicts:

text conflict in debian/changelog

1807. By Brendan Donegan

Merged from trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-11-20 15:58:47 +0000
3+++ debian/changelog 2012-11-21 14:40:31 +0000
4@@ -3,6 +3,10 @@
5 [ Daniel Manrique ]
6 * New version 0.15 for Raring Ringtail development.
7
8+ [ Brendan Donegan ]
9+ * Change forward-slashes to asterisks in the filename of a connection, since
10+ this is what NetworkManager does internally (LP: #1073335)
11+
12 [ Jeff Lane ]
13 * jobs/suspend.txt.in - removed incorrect multiple router requirement for
14 suspend/wireless_after_suspend (LP: #1070333)
15@@ -52,7 +56,7 @@
16 i.e. user-verify or user-interact.
17 * scripts/audio_settings - Use pactl instead of pacmd where possible as it
18 is better maintained than pacmd (LP: #1067026)
19-
20+
21 [Daniel Manrique]
22 * [FEATURE] checkbox/job.py: Fixed intltool warning about unnamed
23 parameters in string, applied pep8 fixes.
24
25=== modified file 'scripts/create_connection'
26--- scripts/create_connection 2012-07-10 16:39:02 +0000
27+++ scripts/create_connection 2012-11-21 14:40:31 +0000
28@@ -145,8 +145,10 @@
29
30 connection_info += ip_sections()
31
32+ # NetworkManager replaces forward-slashes in SSIDs with asterisks
33+ connection_file = args.ssid.replace('/', '*')
34 try:
35- connection_file = open(CONNECTIONS_PATH + args.ssid, 'w')
36+ connection_file = open(CONNECTIONS_PATH + connection_file, 'w')
37 connection_file.write(connection_info)
38 os.fchmod(connection_file.fileno(), 0o600)
39 connection_file.close()

Subscribers

People subscribed via source and target branches