Bug 329342 - Network manager forgets the 802.1x settings as soon as the dialog box is closed
Summary: Network manager forgets the 802.1x settings as soon as the dialog box is closed
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: editor (show other bugs)
Version: 0.9.3.2
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-29 00:40 UTC by pogliamarci
Modified: 2013-12-29 10:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (3.60 KB, patch)
2013-12-29 00:40 UTC, pogliamarci
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pogliamarci 2013-12-29 00:40:53 UTC
Created attachment 84316 [details]
Proposed patch

+++ This bug was initially created as a clone of Bug #317568 +++
Sorry for the duplicate, but the product in the original bug was wrong IMHO.

In the "802.1x Security" tab, one checks the "Use 802.1x authentication" box, fills out all of the information - Identity, certificates, private key, and so on - and clicks "Ok". Network manager does not connect to the network. Open the connection settings again, all of the information is gone, and "Use 802.1x authentication" is unchecked.

Trying to dig a bit into the problem, I found out that in the function verify_cert (libnm-util/nm-setting-8021x.c), libnm-util checks for array->data[array->len - 1] == '\0'.

plasma-nm does not properly terminates with a NULL byte the QByteArrays relative to the certificates and private keys when using 802.1x security, causing the reported misbehavior. Adding a trailing '\0' to the involved QByteArrays does solve the problem for me.
Comment 1 Jan Grulich 2013-12-29 10:48:13 UTC
Git commit b3aedbb580df338b2daa16dd8ff6786946fd805f by Jan Grulich.
Committed on 29/12/2013 at 10:47.
Pushed by grulich into branch 'master'.

Add missing terminating character to certificate name
Thanks to Marcello Pogliani

M  +6    -6    lib/editor/security802-1x.cpp

http://commits.kde.org/plasma-nm/b3aedbb580df338b2daa16dd8ff6786946fd805f