Summary: | WPA-EAP MSCHAPv2 password stored in KWallet cannot be changed once set (20110616 nm09 snapshot) | ||
---|---|---|---|
Product: | [Unmaintained] Network Management | Reporter: | Kevin Kofler <kevin.kofler> |
Component: | Wireless | Assignee: | Will Stephenson <wstephenson> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | collura, lamarque, laurent.rineau, rajeeshknambiar |
Priority: | NOR | ||
Version: | 0.9 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Do not insert wep key incorrectly, instead replace on Edit
Patch against NetworkManager |
Description
Kevin Kofler
2011-06-25 22:53:18 UTC
You are using NM version above 0.8.9997, right? O guess NM newer than that is not saving secrets when Plasma NM calls the update on the connection. If it true it explains both this bug and bug 276485. I'm using NetworkManager-0.8.9997-4.git20110620.fc15. Well, nothing is updated when Plasma NM uses NM > 0.8.999. Plasma NM calls NM's update method passing the correct map with the new settings but NM does not update anything. I will have to investigate more what is happening. (In reply to comment #3) > Well, nothing is updated when Plasma NM uses NM > 0.8.999. Plasma NM calls NM's > update method passing the correct map with the new settings but NM does not > update anything. I will have to investigate more what is happening. Hmmm latest NM git version saves settings correctly. When I call the NM's DBus method to update the connection some time later NM's calls the secret agent to save the old secret instead of the new one. This seems to be a bug in NM, can you reproduce it with nm-applet? nm-applet is not saving secrets here, so I cannot test it. (In reply to comment #4) > (In reply to comment #3) > > Well, nothing is updated when Plasma NM uses NM > 0.8.999. Plasma NM calls NM's > > update method passing the correct map with the new settings but NM does not > > update anything. I will have to investigate more what is happening. > > Hmmm latest NM git version saves settings correctly. When I call the NM's DBus > method to update the connection some time later NM's calls the secret agent to > save the old secret instead of the new one. This seems to be a bug in NM, can > you reproduce it with nm-applet? nm-applet is not saving secrets here, so I > cannot test it. Ok, that is getting wierd, something NM saves the connection's settings sometimes not :-/ I can also reproduce the issue with kde-plasma-networkmanagement-0.9-0.53.20110616git.nm09.fc15 from Fedora (which doesn't use nm-compat patches), but no issue with nm-applet (NetworkManager-gnome-0.8.9997-4.git20110620). I guess I spoke too soon. If I "OK" from KCM module, WEP secrets are getting saved correctly. So, I can't reproduce this. Created attachment 61382 [details]
Do not insert wep key incorrectly, instead replace on Edit
I can reproduce this issue for WEP as well - just tried adding a new Adhoc connection with WEP Hex keys, saving connection secrets into kwallet. Next time changing the WEP key is not affected. Debugged and found couple of issues: 1. WepWidget::writeConfig() is doing d->keys.insert, which causes new key to be pushed into currentIndex, instead of replacing it. Attached patch hopefully fix it. 2. OrgFreedesktopNetworkManagerSettingsConnectionInterface::Update() is probably not saving the new secrets correctly, OR 3. OrgFreedesktopNetworkManagerSettingsConnectionInterface::GetSecrets() called in NMDBusSettingsConnectionProvider::getConnectionSecrets() is not getting correct values, but old unchanged value. Not sure how to debug 2 and 3. Git commit 473fadaa9c86a481f479945f230b5cb7741b0a1c by Lamarque V. Souza. Committed on 27/06/2011 at 21:58. Pushed by lvsouza into branch 'nm09'. Do not insert wep key incorrectly, instead replace on Edit. Thanks Rajeesh K Nambiar for this patch. CCBUG: 276486 M +1 -1 libs/ui/security/wepwidget.cpp http://commits.kde.org/networkmanagement/473fadaa9c86a481f479945f230b5cb7741b0a1c Git commit d07f01faa8d0236683bf9aae894d28db257188f3 by Lamarque V. Souza. Committed on 27/06/2011 at 22:00. Pushed by lvsouza into branch 'master'. Do not insert wep key incorrectly, instead replace on Edit. Thanks Rajeesh K Nambiar for this patch. CCBUG: 276486 M +1 -1 libs/ui/security/wepwidget.cpp http://commits.kde.org/networkmanagement/d07f01faa8d0236683bf9aae894d28db257188f3 (In reply to comment #9) > I can reproduce this issue for WEP as well - just tried adding a new Adhoc > connection with WEP Hex keys, saving connection secrets into kwallet. Next time > changing the WEP key is not affected. > > Debugged and found couple of issues: > 1. WepWidget::writeConfig() is doing d->keys.insert, which causes new key to be > pushed into currentIndex, instead of replacing it. Attached patch hopefully fix > it. > 2. OrgFreedesktopNetworkManagerSettingsConnectionInterface::Update() is > probably not saving the new secrets correctly, OR I already checked, Plasma NM is passing the correct secrets to Update but NetworkManager is callling SaveSecrets with the old values instead of the new ones. I cannot do anything until NM stops doing that. I have asked on NM mailing list how are NM's clients supposed to update secrets, nobody has answered so far. So until I get some answers you have better not changing secrets. > 3. OrgFreedesktopNetworkManagerSettingsConnectionInterface::GetSecrets() called > in NMDBusSettingsConnectionProvider::getConnectionSecrets() is not getting > correct values, but old unchanged value. > > Not sure how to debug 2 and 3. I use kDebug for that. Created attachment 61591 [details]
Patch against NetworkManager
The attached patch fixed the problem for me. The patch is against Networkmanager, not Plasma NM, so this is indeed an upstream bug. I already sent the patch the NM's developers, let's see what they have to say about it. The patch is incomplete because it only works with wireless secrets. Probably NM's developers can improve it to work with other settings. Let's hope so.
Well, the NetworkManager people have not given me any answer in despite of my e-mails. If anyone here knows any NM developer please try to contact him/her to help test my patch against NM. Git commit 8fc5d8547eb76a503c23fdbfd6a072eb4393ca0b by Lamarque V. Souza. Committed on 31/07/2011 at 01:45. Pushed by lvsouza into branch 'nm09'. Since NM guys are being too slow to fix this bug I am adding this hack until they fix it for good. Please try and see if it does not bring new bugs. CCBUG: 276486 M +9 -4 backends/NetworkManager/nmdbussettingsconnectionprovider.cpp http://commits.kde.org/networkmanagement/8fc5d8547eb76a503c23fdbfd6a072eb4393ca0b Ok, this bugs has been fixed in NetworkManager git repository, commit e2d88f59e6b95edfbd0b5ae7e7e396e8ab462664 . I will close this bug since it is a upstream issue. More details about the problem in http://mail.gnome.org/archives/networkmanager-list/2011-August/msg00102.html |