unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15519: 24.3; secrets.el `secrets-create-collection' is broken (fix included)
@ 2013-10-02 17:14 Nicolas Petton
  0 siblings, 0 replies; only message in thread
From: Nicolas Petton @ 2013-10-02 17:14 UTC (permalink / raw)
  To: 15519

In secrets.el, secrets-create-collection is broken (the DBus message
signature is wrong and the collection label is not the right one).

Here's a fixed version of the function:

(defun secrets-create-collection (collection)
  "Create collection labeled COLLECTION if it doesn't exist.
Return the D-Bus object path for collection."
  (let ((collection-path (secrets-collection-path collection)))
    ;; Create the collection.
    (when (secrets-empty-path collection-path)
      (setq collection-path
	    (secrets-prompt
	     (cadr
	      ;; "CreateCollection" returns the prompt path as second arg.
	      (dbus-call-method
	       :session secrets-service secrets-path
	       secrets-interface-service "CreateCollection"
	       `(:array 
		 (:dict-entry
"org.freedesktop.Secret.Collection.Label" (:variant ,collection)))
	       "")))))
    ;; Return object path of the collection.
    collection-path))







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-02 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 17:14 bug#15519: 24.3; secrets.el `secrets-create-collection' is broken (fix included) Nicolas Petton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).