summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-05-16 11:22:51 +0200
committerMichael Albinus <michael.albinus@gmx.de>2018-05-16 11:22:51 +0200
commit01120ec3d2eecd11e23f008feed020def7ea0e88 (patch)
tree0019f45ca3f7d35d8131abb6733a729e26cf08e9 /lisp/net
parent4c3cd27df9c0735d907813a8c16a87acc54b9edc (diff)
downloademacs-01120ec3d2eecd11e23f008feed020def7ea0e88.tar.gz
emacs-01120ec3d2eecd11e23f008feed020def7ea0e88.tar.bz2
emacs-01120ec3d2eecd11e23f008feed020def7ea0e88.zip
Fix creation of Secret Service items in auth-source
* lisp/auth-source.el (auth-source-secrets-create): Use ´apply'. (auth-source-secrets-saver): Handle `auth-source-save-behavior' equal t. * lisp/net/secrets.el (secrets-get-items): Do not call `secrets-open-session' here ... (top): ... but here. * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Bind `auth-source-save-behavior' to t. Cleanup. * test/lisp/net/secrets-tests.el (secrets-test00-availability): After loading secets.el, a session is already opened. (secrets-test02-collections, secrets-test03-items) (secrets-test04-search): Open a new session.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/secrets.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 22a4e8c7b0a..45c98cae60d 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -575,7 +575,6 @@ If successful, return the object path of the collection."
(defun secrets-get-items (collection-path)
"Return the object paths of all available items in COLLECTION-PATH."
(unless (secrets-empty-path collection-path)
- (secrets-open-session)
(dbus-get-property
:session secrets-service collection-path
secrets-interface-collection "Items")))
@@ -911,6 +910,8 @@ to their attributes."
(when (dbus-ping :session secrets-service 100)
+ (secrets-open-session)
+
;; We must reset all variables, when there is a new instance of the
;; "org.freedesktop.secrets" service.
(dbus-register-signal