<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101419/">http://git.reviewboard.kde.org/r/101419/</a>
     </td>
    </tr>
   </table>
   <br />









<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101419/diff/6/?file=20833#file20833line405" style="color: black; font-weight: bold; text-decoration: underline;">settings/config/manageconnectionwidget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 6)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void ManageConnectionWidget::importClicked()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">405</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="c1">// </span><span class="cs">TODO</span><span class="c1">: Check for scope and mUserUserSettings if necessary</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">At least for now I am assuming VPN connections are always user scope. User scope in NM-0.9 is different from NM-0.8: in NM-0.8 there is one DBus interface for each scope, so in Plasma NM-0.8 we have two objects, one for each interface. Furthermore the connection settings and secrets are stored or in system (/etc/NetworkManager/system-connections) or in user (~/.kde/share/apps/networkmanagement/connections) side.

In NM-0.9 there is only one DBus interface and only the secrets are stored in system or user side (AgentOwned in NM-0.9 terminology). The settings are always saved in system side (/etc/NetworkManager/system-connections).

That all means you do not need to check the scope here, just save all secrets as AgentOwned and that is it. When you do it please add a comment saying you are assuming the secrets are AgentOnwed. I still not figure out how to have system wide VPN connections, so maybe in the future I will have to change that and the comment will make life easier to find where to find in the source code.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/101419/diff/6/?file=20844#file20844line141" style="color: black; font-weight: bold; text-decoration: underline;">vpnplugins/vpnc/vpnc.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 6)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QVariantList VpncUiPlugin::importConnectionSettings(const QString &amp;fileName)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">141</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">secretData</span><span class="p">.</span><span class="n">insert</span><span class="p">(</span><span class="n">NM_VPNC_KEY_XAUTH_PASSWORD</span><span class="p">,</span> <span class="n">cg</span><span class="p">.</span><span class="n">readEntry</span><span class="p">(</span><span class="s">&quot;UserPassword&quot;</span><span class="p">));</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You also need to add entries like:

&quot;ipsec-secret-type&quot; -&gt; &quot;save&quot;
&quot;IPSec secret-flags&quot; -&gt; &quot;0&quot;

&quot;xauth-password-type&quot; -&gt; &quot;ask&quot;
&quot;Xauth password-flags&quot; -&gt; &quot;2&quot;

To indicate where the secrets are going to be saved. Look at how VpnSetting::data() in libs/internals/settings/vpn.h does it for example.

The integer values above (0, 2 in the examples) are of type secretsTypes and should alwas be &quot;Or&quot;ed with AgentOwned value (1), look at VpnSetting::storageTypeToSecretsType() does it.

That should be done for all secrets.</pre>
</div>
<br />



<p>- Lamarque Vieira</p>


<br />
<p>On June 3rd, 2011, 6:43 p.m., Rajeesh K Nambiar wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Network Management.</div>
<div>By Rajeesh K Nambiar.</div>


<p style="color: grey;"><i>Updated June 3, 2011, 6:43 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">First stab at VPN connection import/export functionality. Currently implemented just VPNC Import support. Please review, especially the VpncUiPluginPrivate part which tries to abstract away cisco password decrypt function. If the general approach looks good, I&#39;ll proceed with this and try to extend for other VPN methods, as well as export function.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested against latest git snapshot, with KDE SC 4.6.3</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=146159">146159</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>libs/internals/settings/vpnsecrets.h <span style="color: grey">(96803ec)</span></li>

 <li>libs/ui/vpnpreferences.cpp <span style="color: grey">(843636c)</span></li>

 <li>libs/ui/vpnuiplugin.h <span style="color: grey">(7a13027)</span></li>

 <li>settings/config/CMakeLists.txt <span style="color: grey">(783d551)</span></li>

 <li>settings/config/addeditdeletebuttonset.h <span style="color: grey">(f7abef7)</span></li>

 <li>settings/config/addeditdeletebuttonset.cpp <span style="color: grey">(4f3f97a)</span></li>

 <li>settings/config/manageconnectionwidget.h <span style="color: grey">(41a449c)</span></li>

 <li>settings/config/manageconnectionwidget.cpp <span style="color: grey">(db69cb6)</span></li>

 <li>vpnplugins/novellvpn/novellvpn.h <span style="color: grey">(9e026e2)</span></li>

 <li>vpnplugins/novellvpn/novellvpn.cpp <span style="color: grey">(848b527)</span></li>

 <li>vpnplugins/openvpn/openvpn.h <span style="color: grey">(a06b88e)</span></li>

 <li>vpnplugins/openvpn/openvpn.cpp <span style="color: grey">(60376ed)</span></li>

 <li>vpnplugins/pptp/pptp.h <span style="color: grey">(66ea79a)</span></li>

 <li>vpnplugins/pptp/pptp.cpp <span style="color: grey">(c311f9f)</span></li>

 <li>vpnplugins/strongswan/strongswan.h <span style="color: grey">(fcd5bde)</span></li>

 <li>vpnplugins/strongswan/strongswan.cpp <span style="color: grey">(5bffc2b)</span></li>

 <li>vpnplugins/vpnc/nm-vpnc-service.h <span style="color: grey">(e3f859a)</span></li>

 <li>vpnplugins/vpnc/vpnc.h <span style="color: grey">(aec2136)</span></li>

 <li>vpnplugins/vpnc/vpnc.cpp <span style="color: grey">(deb9108)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101419/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>