GNU bug report logs -
#20449
secrets-search-items is broken
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20449 in the body.
You can then email your comments to 20449 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20449
; Package
emacs
.
(Tue, 28 Apr 2015 15:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 28 Apr 2015 15:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When one wants to store smtpmail passwords in GNOME keyring, he cannot
retrieve them because secrets-search-items raises an error. A patch
below.
From dc4c463194d6a944057de1254f59440a65558e37 Mon Sep 17 00:00:00 2001
From: Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>
Date: Tue, 28 Apr 2015 13:54:48 +0200
Subject: [PATCH] * lisp/net/secrets.el (secrets-search-items):
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix DBUS query result parsing. The function assumed that return value
of the SearchItems method called on a collection is a list of two
lists, however this is true only when no collection is specified:
http://standards.freedesktop.org/secret-service/re01.html#org.freedesktop.Secret.Service.SearchItems
. If a collection is present, a direct list is returned:
http://standards.freedesktop.org/secret-service/re02.html#org.freedesktop.Secret.Collection.SearchItems
. Therefore the squashing performed in secrets-search-items has been
unnecessary, causing an error.
GNOME had used to incorrectly return a list of two lists in both
cases, but this was already fixed:
https://bugzilla.gnome.org/show_bug.cgi?id=695115 .
Also fix an incorrect information in the secrets-search-items’
docstring.
Copyright-paperwork-exempt: yes
---
lisp/net/secrets.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 6f4e173..1a827b1 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -601,7 +601,7 @@ starting with a colon. Example:
\(secrets-create-item \"Tramp collection\" \"item\" \"geheim\"
:method \"sudo\" :user \"joe\" :host \"remote-host\"\)
-The object paths of the found items are returned as list."
+The object labels of the found items are returned as list."
(let ((collection-path (secrets-unlock-collection collection))
result props)
(unless (secrets-empty-path collection-path)
@@ -618,8 +618,7 @@ The object paths of the found items are returned as list."
(cadr attributes))
'append)
attributes (cddr attributes)))
- ;; Search. The result is a list of two lists, the object paths
- ;; of the unlocked and the locked items.
+ ;; Search. The result is a list of object paths.
(setq result
(dbus-call-method
:session secrets-service collection-path
@@ -630,7 +629,7 @@ The object paths of the found items are returned as list."
;; Return the found items.
(mapcar
(lambda (item-path) (secrets-get-item-property item-path "Label"))
- (append (car result) (cadr result))))))
+ result))))
(defun secrets-create-item (collection item password &rest attributes)
"Create a new item in COLLECTION with label ITEM and password PASSWORD.
--
2.3.6
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Wed, 29 Apr 2015 09:26:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 29 Apr 2015 09:26:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 20449-done <at> debbugs.gnu.org (full text, mbox):
Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com> writes:
Hi Krzysztof,
> When one wants to store smtpmail passwords in GNOME keyring, he cannot
> retrieve them because secrets-search-items raises an error. A patch
> below.
>
> GNOME had used to incorrectly return a list of two lists in both
> cases, but this was already fixed:
> https://bugzilla.gnome.org/show_bug.cgi?id=695115 .
Thanks for this! I have pushed it to the master branch, closing the bug.
No we have the problem, that secrets.el won't cooperate any longer with
gnome-keyring versions prior to 2013. But I don't believe we shall
introduce a wrapper in order to hide this; it is obviously an error in
GNOME, and Emacs 25 might not be faced with this too much.
> Also fix an incorrect information in the secrets-search-items’
> docstring.
Yep. I've corrected also another stupid docstring error there.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 27 May 2015 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.