[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7fbdb57 1/2: Fix DBUS query result parsing for secr
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 7fbdb57 1/2: Fix DBUS query result parsing for secrets-search-items |
Date: |
Wed, 29 Apr 2015 09:18:56 +0000 |
branch: master
commit 7fbdb57f801159618f761b8dd510516575b6c5b2
Author: Krzysztof Jurewicz <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix DBUS query result parsing for secrets-search-items
* lisp/net/secrets.el (secrets-search-items): 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. 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.
(Bug#20449)
Copyright-paperwork-exempt: yes
---
lisp/net/secrets.el | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 6f4e173..56cbec4 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -598,10 +598,9 @@ If successful, return the object path of the collection."
ATTRIBUTES are key-value pairs. The keys are keyword symbols,
starting with a colon. Example:
- \(secrets-create-item \"Tramp collection\" \"item\" \"geheim\"
- :method \"sudo\" :user \"joe\" :host \"remote-host\"\)
+ \(secrets-search-items \"Tramp collection\" :user \"joe\")
-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 +617,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 +628,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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 7fbdb57 1/2: Fix DBUS query result parsing for secrets-search-items,
Michael Albinus <=