diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-06-30 14:27:49 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-06-30 14:27:49 +0200 |
commit | 81622484bc711f98bf7b4b5f84052590a0ae5d3f (patch) | |
tree | 6960792177f3a29e320c518b7ce0b085ba963968 /lisp/auth-source.el | |
parent | 4f2765f6f1a2cc6da408e3c5ff99ea5f8756bad4 (diff) | |
download | emacs-81622484bc711f98bf7b4b5f84052590a0ae5d3f.tar.gz |
Fix problem when creating an .authinfo entry with an existing machine name
* lisp/auth-source.el (auth-source-netrc-create): Don't return the
incorrect data if there's a matching host entry but the wrong user
name (bug#49289).
Diffstat (limited to 'lisp/auth-source.el')
-rw-r--r-- | lisp/auth-source.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 9ca28ebb0a9..69197383982 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -1270,7 +1270,7 @@ See `auth-source-search' for details on SPEC." ;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t :create-extra-keys '((A "default A") (B))) (cl-defun auth-source-netrc-create (&rest spec - &key backend host port create + &key backend host port create user &allow-other-keys) (let* ((base-required '(host user port secret)) ;; we know (because of an assertion in auth-source-search) that the @@ -1278,6 +1278,7 @@ See `auth-source-search' for details on SPEC." (create-extra (if (eq t create) nil create)) (current-data (car (auth-source-search :max 1 :host host + :user user :port port))) (required (append base-required create-extra)) (file (oref backend source)) |