diff options
| author | Michael Albinus | 2014-01-17 19:20:39 +0100 |
|---|---|---|
| committer | Michael Albinus | 2014-01-17 19:20:39 +0100 |
| commit | a1340440283f540bea0d3176fe9b287d69c061a1 (patch) | |
| tree | 2bd06e583b4114c436957b0acef38c82aa1fbe43 | |
| parent | 681ce5d2510a90d537129cea42af86cf1cc11186 (diff) | |
| download | emacs-a1340440283f540bea0d3176fe9b287d69c061a1.tar.gz emacs-a1340440283f540bea0d3176fe9b287d69c061a1.zip | |
Fix Bug#13124.
* net/tramp.el (tramp-password-prompt-regexp): Use
`password-word-equivalents' if available.
(tramp-action-password, tramp-process-one-action)
(tramp-read-passwd): Let-bind `case-fold-search' to t.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 19 |
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 44bbc9cb4af..c602a207521 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-01-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-password-prompt-regexp): Use | ||
| 4 | `password-word-equivalents' if available. | ||
| 5 | (tramp-action-password, tramp-process-one-action) | ||
| 6 | (tramp-read-passwd): Let-bind `case-fold-search' to t. (Bug#13124) | ||
| 7 | |||
| 1 | 2014-01-17 Chong Yidong <cyd@gnu.org> | 8 | 2014-01-17 Chong Yidong <cyd@gnu.org> |
| 2 | 9 | ||
| 3 | * simple.el (password-word-equivalents): New defcustom. | 10 | * simple.el (password-word-equivalents): New defcustom. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1fe7f7a9147..40baee4ce5e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -566,7 +566,10 @@ This regexp must match both `tramp-initial-end-of-output' and | |||
| 566 | :type 'regexp) | 566 | :type 'regexp) |
| 567 | 567 | ||
| 568 | (defcustom tramp-password-prompt-regexp | 568 | (defcustom tramp-password-prompt-regexp |
| 569 | "^.*\\([pP]assword\\|[pP]assphrase\\).*:\^@? *" | 569 | (format "^.*\\(%s\\).*:\^@? *" |
| 570 | (if (boundp 'password-word-equivalents) | ||
| 571 | (regexp-opt (symbol-value 'password-word-equivalents)) | ||
| 572 | "password\\|passphrase")) | ||
| 570 | "Regexp matching password-like prompts. | 573 | "Regexp matching password-like prompts. |
| 571 | The regexp should match at end of buffer. | 574 | The regexp should match at end of buffer. |
| 572 | 575 | ||
| @@ -3352,7 +3355,8 @@ of." | |||
| 3352 | (defun tramp-action-password (proc vec) | 3355 | (defun tramp-action-password (proc vec) |
| 3353 | "Query the user for a password." | 3356 | "Query the user for a password." |
| 3354 | (with-current-buffer (process-buffer proc) | 3357 | (with-current-buffer (process-buffer proc) |
| 3355 | (let ((enable-recursive-minibuffers t)) | 3358 | (let ((enable-recursive-minibuffers t) |
| 3359 | (case-fold-search t)) | ||
| 3356 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) | 3360 | (tramp-check-for-regexp proc tramp-password-prompt-regexp) |
| 3357 | (tramp-message vec 3 "Sending %s" (match-string 1)) | 3361 | (tramp-message vec 3 "Sending %s" (match-string 1)) |
| 3358 | ;; We don't call `tramp-send-string' in order to hide the | 3362 | ;; We don't call `tramp-send-string' in order to hide the |
| @@ -3438,7 +3442,8 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3438 | 3442 | ||
| 3439 | (defun tramp-process-one-action (proc vec actions) | 3443 | (defun tramp-process-one-action (proc vec actions) |
| 3440 | "Wait for output from the shell and perform one action." | 3444 | "Wait for output from the shell and perform one action." |
| 3441 | (let (found todo item pattern action) | 3445 | (let ((case-fold-search t) |
| 3446 | found todo item pattern action) | ||
| 3442 | (while (not found) | 3447 | (while (not found) |
| 3443 | ;; Reread output once all actions have been performed. | 3448 | ;; Reread output once all actions have been performed. |
| 3444 | ;; Obviously, the output was not complete. | 3449 | ;; Obviously, the output was not complete. |
| @@ -4039,7 +4044,8 @@ Furthermore, traces are written with verbosity of 6." | |||
| 4039 | "Read a password from user (compat function). | 4044 | "Read a password from user (compat function). |
| 4040 | Consults the auth-source package. | 4045 | Consults the auth-source package. |
| 4041 | Invokes `password-read' if available, `read-passwd' else." | 4046 | Invokes `password-read' if available, `read-passwd' else." |
| 4042 | (let* ((key (tramp-make-tramp-file-name | 4047 | (let* ((case-fold-search t) |
| 4048 | (key (tramp-make-tramp-file-name | ||
| 4043 | tramp-current-method tramp-current-user | 4049 | tramp-current-method tramp-current-user |
| 4044 | tramp-current-host "")) | 4050 | tramp-current-host "")) |
| 4045 | (pw-prompt | 4051 | (pw-prompt |
| @@ -4259,11 +4265,6 @@ Only works for Bourne-like shells." | |||
| 4259 | ;; tramp-server-local-variable-alist) to define any such variables | 4265 | ;; tramp-server-local-variable-alist) to define any such variables |
| 4260 | ;; that they need to, which would then be let bound as appropriate | 4266 | ;; that they need to, which would then be let bound as appropriate |
| 4261 | ;; in tramp functions. (Jason Rumney) | 4267 | ;; in tramp functions. (Jason Rumney) |
| 4262 | ;; * IMHO, it's a drawback that currently Tramp doesn't support | ||
| 4263 | ;; Unicode in Dired file names by default. Is it possible to | ||
| 4264 | ;; improve Tramp to set LC_ALL to "C" only for commands where Tramp | ||
| 4265 | ;; expects English? Or just to set LC_MESSAGES to "C" if Tramp | ||
| 4266 | ;; expects only English messages? (Juri Linkov) | ||
| 4267 | ;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) | 4268 | ;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) |
| 4268 | ;; * I was wondering if it would be possible to use tramp even if I'm | 4269 | ;; * I was wondering if it would be possible to use tramp even if I'm |
| 4269 | ;; actually using sshfs. But when I launch a command I would like | 4270 | ;; actually using sshfs. But when I launch a command I would like |