emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 90ce042: Allow a function for the :secret in a plstore


From: Andrew G Cohen
Subject: master 90ce042: Allow a function for the :secret in a plstore
Date: Thu, 27 Aug 2020 01:22:09 -0400 (EDT)

branch: master
commit 90ce0421542bf2a983fdb65075c96fa9d7f5e6c9
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>

    Allow a function for the :secret in a plstore
    
    * lisp/auth-source.el (auth-source-plstore-search): If the :secret
    value is a function, call it on plist to obtain the real password.
---
 lisp/auth-source.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 7a0e09b..50795ce 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -2073,7 +2073,9 @@ entries for git.gnus.org:
                                 (setcar
                                  (cdr secret)
                                  (let ((v (car (cdr secret))))
-                                   (lambda () v))))
+                                   (if (functionp v)
+                                       (lambda () (funcall v plist))
+                                   (lambda () v)))))
                             plist))
                         items))
          ;; ensure each item has each key in `returned-keys'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]