diff options
| author | Lars Magne Ingebrigtsen | 2011-06-22 16:48:31 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-06-22 16:48:31 +0200 |
| commit | ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f (patch) | |
| tree | d15181da4f25be194cb80cae8556cdabc2f887bf /lisp/gnus | |
| parent | d5a19415d0bc308557d754e4438a2656e16bb0ab (diff) | |
| download | emacs-ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f.tar.gz emacs-ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f.zip | |
When the .authinfo file has a user name but not a password, prompt
for the password.
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/auth-source.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index d3261b137b2..6fe033fea79 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el | |||
| @@ -713,7 +713,8 @@ Returns the deleted entries." | |||
| 713 | when (string-match (concat "^" auth-source-magic) | 713 | when (string-match (concat "^" auth-source-magic) |
| 714 | (symbol-name sym)) | 714 | (symbol-name sym)) |
| 715 | ;; remove that key | 715 | ;; remove that key |
| 716 | do (password-cache-remove (symbol-name sym)))) | 716 | do (password-cache-remove (symbol-name sym))) |
| 717 | (setq auth-source-netrc-cache nil)) | ||
| 717 | 718 | ||
| 718 | (defun auth-source-remember (spec found) | 719 | (defun auth-source-remember (spec found) |
| 719 | "Remember FOUND search results for SPEC." | 720 | "Remember FOUND search results for SPEC." |
| @@ -1144,6 +1145,9 @@ See `auth-source-search' for details on SPEC." | |||
| 1144 | ;; we know (because of an assertion in auth-source-search) that the | 1145 | ;; we know (because of an assertion in auth-source-search) that the |
| 1145 | ;; :create parameter is either t or a list (which includes nil) | 1146 | ;; :create parameter is either t or a list (which includes nil) |
| 1146 | (create-extra (if (eq t create) nil create)) | 1147 | (create-extra (if (eq t create) nil create)) |
| 1148 | (current-data (car (auth-source-search :max 1 | ||
| 1149 | :host host | ||
| 1150 | :port port))) | ||
| 1147 | (required (append base-required create-extra)) | 1151 | (required (append base-required create-extra)) |
| 1148 | (file (oref backend source)) | 1152 | (file (oref backend source)) |
| 1149 | (add "") | 1153 | (add "") |
| @@ -1178,7 +1182,9 @@ See `auth-source-search' for details on SPEC." | |||
| 1178 | (dolist (r required) | 1182 | (dolist (r required) |
| 1179 | (let* ((data (aget valist r)) | 1183 | (let* ((data (aget valist r)) |
| 1180 | ;; take the first element if the data is a list | 1184 | ;; take the first element if the data is a list |
| 1181 | (data (auth-source-netrc-element-or-first data)) | 1185 | (data (or (auth-source-netrc-element-or-first data) |
| 1186 | (plist-get current-data | ||
| 1187 | (intern (format ":%s" r) obarray)))) | ||
| 1182 | ;; this is the default to be offered | 1188 | ;; this is the default to be offered |
| 1183 | (given-default (aget auth-source-creation-defaults r)) | 1189 | (given-default (aget auth-source-creation-defaults r)) |
| 1184 | ;; the default supplementals are simple: | 1190 | ;; the default supplementals are simple: |