Error storing/reveiving passwords into/from gnome-keyring
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Screenlets | Status tracked in Trunk | |||||
Trunk |
Fix Released
|
Undecided
|
Rico Pfaus | |||
gnome-keyring (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Using any screenlet in Ubuntu Karmic which has password stored with AccountOption into gnome-keyring, the password won't be received after logout any more. Screenlets report "ERROR: Unable to read password from keyring:" and that's all. It is quite mainstram in TwitterScreenlet bugtracking http://
The problem, however, seems to be that options.py makes a wild presumption about the order of keys in the ring.
237 self.keyring_list = gnomekeyring.
We have the keyrings' list now... But is there a default keyring defined?
--- Yes? Then let self.keyring represent "the default keyring".
--- No? Then let's take self.keyring represent "the whatever first keyring" that was available at the keyring...
(that is 246 self.keyring = self.keyring_
Now, in my case "the whatever first keyring" is "login" which happens to be also "the default keyring", but I suppose "the whatever first keyring" could be also "session" or "foobar", but there's no way to be sure.
If we now look, what is done in on_import
258 if self.keyring == self.keyring_
and also on_export
278 if self.keyring == self.keyring_
then it seems that it is meant to detect if we had some default keyring defined... But it fails. It supposes, that when we have default keyring defined the self.keyring != self.keyring_
I suggest that since in on_export
279 auth_token = gnomekeyring.
280 gnomekeyring.
"the whatever first keyring" is replaced with the system keyring "session" as the hard-coded string, the value "session" should be as well assigned already in __init__
246 self.keyring = self.keyring_
instead of "the whatever first keyring", i. e. it should be
246 self.keyring = "session"
The rest of hocus pocus with checking if there was default keyring or we are dealing some "random first keyring" should be removed and replaced with plain
262 pw = gnomekeyring.
263 int(auth_
in case of on_import and with
282 auth_token = gnomekeyring.
283 gnomekeyring.
in case of on_export...
That should do it.
If that's allright, I could check and fix the code myself.
Changed in screenlets: | |
assignee: | nobody → Rico Pfaus (ryxperience) |
Changed in screenlets: | |
status: | New → Fix Committed |
Changed in screenlets: | |
status: | Fix Committed → Fix Released |
affects: | ubuntu → gnome-keyring (Ubuntu) |
I add that the essence of the problem is, that instead of storing password to permanent keyring "login" (or whatever keyring is defined as "the default keyring"), the passwords are accidentally stored at "session" keyring, even when "login" keyring exists and is operable. That's why passords don't live through the logout and reboot etc.