Merge from origin/emacs-29
ce85d3811d
Fix bug#49289 also for other auth-source backends
This commit is contained in:
commit
2f39a4b28a
1 changed files with 9 additions and 6 deletions
|
@ -869,9 +869,9 @@ while \(:host t) would find all host entries."
|
||||||
(defun auth-info-password (auth-info)
|
(defun auth-info-password (auth-info)
|
||||||
"Return the :secret password from the AUTH-INFO."
|
"Return the :secret password from the AUTH-INFO."
|
||||||
(let ((secret (plist-get auth-info :secret)))
|
(let ((secret (plist-get auth-info :secret)))
|
||||||
(while (functionp secret)
|
(if (functionp secret)
|
||||||
(setq secret (funcall secret)))
|
(funcall secret)
|
||||||
secret))
|
secret)))
|
||||||
|
|
||||||
(defun auth-source-pick-first-password (&rest spec)
|
(defun auth-source-pick-first-password (&rest spec)
|
||||||
"Pick the first secret found by applying `auth-source-search' to SPEC."
|
"Pick the first secret found by applying `auth-source-search' to SPEC."
|
||||||
|
@ -1692,7 +1692,7 @@ authentication tokens:
|
||||||
items))
|
items))
|
||||||
|
|
||||||
(cl-defun auth-source-secrets-create (&rest spec
|
(cl-defun auth-source-secrets-create (&rest spec
|
||||||
&key backend host port create
|
&key backend host port create user
|
||||||
&allow-other-keys)
|
&allow-other-keys)
|
||||||
(let* ((base-required '(host user port secret label))
|
(let* ((base-required '(host user port secret label))
|
||||||
;; we know (because of an assertion in auth-source-search) that the
|
;; we know (because of an assertion in auth-source-search) that the
|
||||||
|
@ -1700,6 +1700,7 @@ authentication tokens:
|
||||||
(create-extra (if (eq t create) nil create))
|
(create-extra (if (eq t create) nil create))
|
||||||
(current-data (car (auth-source-search :max 1
|
(current-data (car (auth-source-search :max 1
|
||||||
:host host
|
:host host
|
||||||
|
:user user
|
||||||
:port port)))
|
:port port)))
|
||||||
(required (append base-required create-extra))
|
(required (append base-required create-extra))
|
||||||
(collection (oref backend source))
|
(collection (oref backend source))
|
||||||
|
@ -2162,7 +2163,7 @@ entries for git.gnus.org:
|
||||||
items))
|
items))
|
||||||
|
|
||||||
(cl-defun auth-source-plstore-create (&rest spec
|
(cl-defun auth-source-plstore-create (&rest spec
|
||||||
&key backend host port create
|
&key backend host port create user
|
||||||
&allow-other-keys)
|
&allow-other-keys)
|
||||||
(let* ((base-required '(host user port secret))
|
(let* ((base-required '(host user port secret))
|
||||||
(base-secret '(secret))
|
(base-secret '(secret))
|
||||||
|
@ -2172,9 +2173,11 @@ entries for git.gnus.org:
|
||||||
(create-extra-secret (plist-get create :encrypted))
|
(create-extra-secret (plist-get create :encrypted))
|
||||||
(create-extra (if (eq t create) nil
|
(create-extra (if (eq t create) nil
|
||||||
(or (append (plist-get create :unencrypted)
|
(or (append (plist-get create :unencrypted)
|
||||||
create-extra-secret) create)))
|
create-extra-secret)
|
||||||
|
create)))
|
||||||
(current-data (car (auth-source-search :max 1
|
(current-data (car (auth-source-search :max 1
|
||||||
:host host
|
:host host
|
||||||
|
:user user
|
||||||
:port port)))
|
:port port)))
|
||||||
(required (append base-required create-extra))
|
(required (append base-required create-extra))
|
||||||
(required-secret (append base-secret create-extra-secret))
|
(required-secret (append base-secret create-extra-secret))
|
||||||
|
|
Loading…
Add table
Reference in a new issue