Re: SecretAgent.GetSecrets() return value



On Sun, 2011-09-04 at 18:32 +0100, Daniel Drake wrote:
> Hi,
> 
> I'm working on finally porting Sugar to NetworkManager-0.9 and I have
> a query regarding the SecretAgent implementation.
> The docs here http://projects.gnome.org/NetworkManager/developers/api/09/ref-migrating.html#id565317
> have a link to org.freedesktop.NetworkManager.SecretAgent but this
> link is broken - I can't find any documentation for this interface.

Oops; looks like the secret agent bits didn't get included in the D-Bus
spec generator.  I'll fix that and upload new docs now.

> Anyway, through some experimentation I see that GetSecrets() gets
> given the entire settings collection for the connection where secrets
> are needed. My question is: exactly what should be returned?
> 
> In the NM-0.8 secrets-getting scheme, we were advised to take the
> entire settings object, add in the secrets, and send the whole thing
> back:
> http://mail.gnome.org/archives/networkmanager-list/2009-December/msg00018.html
> 
> However, if I do that with NM-0.9, with my GetSecrets call therefore
> returning a complete settings collection including settings for
> 802-11-wireless, connection, ipv6, ipv4, and 802-11-wireless-security,
> syslog shows NetworkManager complaining:
> 
>   NetworkManager[1748]: get_secret_flags: assertion `is_secret_prop
> (setting, secret_name, error)' failed
> 
> The secrets do get communicated successfully, but it would be nice to
> know what I'm doing wrong.

Since it's a GetSecrets() call, NM is complaining when things other than
secrets are returned.  We could eliminate that warning since there's no
harm in silently discarding stuff other than secrets.  It was only there
for information.  I'll take a patch that turns it off.

Dan



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