Re: Problems with Plasma NetworkManagement



On Sun, 2011-06-26 at 15:40 -0300, Lamarque Vieira Souza wrote:
> Hi,
> 
> 
> I am trying to debug those two bugs http://bugs.kde.org/276485 and
> http://bugs.kde.org/276486 and have found that NM is calling our
> secret agent to save the old secret instead of the new one even though
> Plasma NM passes the new secret to the NM's update connection method.

Hmm, seems like a bug in NM.

> What I would like to know is how secrets are updated. I have found no
> documentation on which steps NM's clients should follow to update
> secrets. For instance, when creating a new connection, who is
> reponsable to store the secrets? The secrets agent by itself or NM's
> by calling secret agent's SaveSecret method? By try and error we found
> NM does not call the secret agent's SaveSecret method when creating
> connections, only when updating them, why the different behaviour?

I've updated the documentation in introspection/nm-secret-agent.xml with
the original intent.  That intent was that if the agent is the thing
creating the connection then the agent should save the secrets and not
expect a SaveSecrets() request from NM.  However, if an external
connection editor is the thing that updates the secrets, then the agent
should expect a SaveSecrets() request.  Basically if the agent accepts
changes to secrets it should save them itself; and that saves a D-Bus
round-trip.  Does that sound OK?

> Then comes our current problem. What are the steps to update secrets?
> What we implemented is:
> 
> 
> 1. Call org.freedesktop.NetworkManager.Settings.Connection.Update with
> all settings and secrets.
> 
> 
> 2. Our secret agent waits for NM to call its SaveSecrets method.

If the agent is what called Update(), then we'd expect it to save the
secrets itself after the Update() call returns successfully.  I'm not
sure the indirection here of having NM call SaveSecrets() on the process
that already has the secrets is useful.  Or?

There are probably a few bugs here to shake out...

Dan

> 3. We update our internal structures with the new secrets.
> 
> 
> The problem is in step 2., NM is passing the wrong secret for us.
> 
> 
> I attached my Plasma NM log with some comments. One thing you should
> know is that our connection editor (kcmshell process in the log) is a
> different process than our secret agent (kded process in the log).
> 
> 
> I hope you can help me with this problem. Thanks in advance.
> 
> 
> -- 
> 
> Lamarque V. Souza
> 
> http://www.geographicguide.com/brazil.htm
> 
> Linux User #57137 - http://counter.li.org/
> 
> http://planetkde.org/pt-br
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]