Discussion:
Review Request 119973: Import secrets previously stored in plaintext files
Jan Grulich
2014-08-28 12:25:03 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------

Review request for Network Management and Lamarque Souza.


Repository: plasma-nm


Description
-------

In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.


Diffs
-----

kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa

Diff: https://git.reviewboard.kde.org/r/119973/diff/


Testing
-------

I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.


Thanks,

Jan Grulich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140828/c155c2fb/attachment.html>
Lamarque Souza
2014-08-28 13:02:25 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/#review65432
-----------------------------------------------------------



kded/secretagent.cpp
<https://git.reviewboard.kde.org/r/119973/#comment45714>

You can improve this by creating a temporary const variable with the correct secret flag to use. That way you do not need this if clause and the if clause some lines below. Something like:

// Reset flags, we can't...
NEtworkManager::Setting::SecretFlags secretFlags; = walletEnabled ? N::S::AgentOwned : N::S::None;
...
foreach (...)
if (key.endsWith(QLatin1String("-flags))) {
vpnData.insert(key, QString::number((int)secretFlags));
}
}



kded/secretagent.cpp
<https://git.reviewboard.kde.org/r/119973/#comment45713>

I prefer to use iterators here to avoid creating a temporary QList:

QMap<QString, QString>::const_iterator it = secrets.begin();
QMap<QString, QString>::const_iterator end = secrets.end();
for (; it != end; ++it) {
tmpSetting.insert(it.key(), it.value();
}


- Lamarque Souza
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------
(Updated Aug. 28, 2014, 12:25 p.m.)
Review request for Network Management and Lamarque Souza.
Repository: plasma-nm
Description
-------
In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.
Diffs
-----
kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa
Diff: https://git.reviewboard.kde.org/r/119973/diff/
Testing
-------
I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.
Thanks,
Jan Grulich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140828/da0a8235/attachment.html>
Jan Grulich
2014-08-28 13:16:54 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------

(Updated Srp. 28, 2014, 1:16 odp.)


Review request for Network Management and Lamarque Souza.


Changes
-------

Updated diff with fixes mentioned above.


Repository: plasma-nm


Description
-------

In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.


Diffs (updated)
-----

kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa

Diff: https://git.reviewboard.kde.org/r/119973/diff/


Testing
-------

I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.


Thanks,

Jan Grulich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140828/23db6d54/attachment.html>
Lukáš Tinkl
2014-09-02 17:20:23 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/#review65725
-----------------------------------------------------------


Looks good to me, lamarque?

- Luk?? Tinkl
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------
(Updated Srp. 28, 2014, 3:16 odp.)
Review request for Network Management and Lamarque Souza.
Repository: plasma-nm
Description
-------
In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.
Diffs
-----
kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa
Diff: https://git.reviewboard.kde.org/r/119973/diff/
Testing
-------
I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.
Thanks,
Jan Grulich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140902/ec10cbda/attachment.html>
Lamarque Souza
2014-09-02 17:56:00 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/#review65728
-----------------------------------------------------------

Ship it!


Ship It!

- Lamarque Souza
Post by Jan Grulich
-----------------------------------------------------------
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------
(Updated Aug. 28, 2014, 1:16 p.m.)
Review request for Network Management and Lamarque Souza.
Repository: plasma-nm
Description
-------
In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.
Diffs
-----
kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa
Diff: https://git.reviewboard.kde.org/r/119973/diff/
Testing
-------
I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.
Thanks,
Jan Grulich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140902/fcfbd0ba/attachment.html>
Jan Grulich
2014-09-03 07:22:00 UTC
Permalink
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119973/
-----------------------------------------------------------

(Updated Sept. 3, 2014, 7:21 a.m.)


Status
------

This change has been marked as submitted.


Review request for Network Management and Lamarque Souza.


Repository: plasma-nm


Description
-------

In the new release of plasma-nm we dropped support for plaintext files and the only option where to store secrets with our secret agent is now KWallet, but with dropping it, we kinda broke it for users who have secrets stored in plaintext file. I wrote a patch which should re-save/migrate secrets stored in plaintext files and save them either to KWallet (if enabled) or directly to NetworkManager.


Diffs
-----

kded/secretagent.h e821f59
kded/secretagent.cpp 26f8faa

Diff: https://git.reviewboard.kde.org/r/119973/diff/


Testing
-------

I tried to create a file with secrets (for vpn, wifi, gsm) manually and they were successfuly transfered to KWallet.


Thanks,

Jan Grulich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140903/5d1df968/attachment.html>
Loading...