* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n"
as end-of-line delimeter for passwords, when running on MS Windows. * net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'.
This commit is contained in:
parent
012479a7a6
commit
ea78112b12
3 changed files with 36 additions and 21 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2014-12-23 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
|
* net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'.
|
||||||
|
|
||||||
|
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n"
|
||||||
|
as end-of-line delimeter for passwords, when running on MS Windows.
|
||||||
|
|
||||||
2014-12-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
2014-12-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
* progmodes/sh-script.el (sh-set-shell): Don't change the global value
|
* progmodes/sh-script.el (sh-set-shell): Don't change the global value
|
||||||
|
|
|
@ -2455,8 +2455,14 @@ The method used must be an out-of-band method."
|
||||||
(mapconcat 'identity (process-command p) " "))
|
(mapconcat 'identity (process-command p) " "))
|
||||||
(tramp-set-connection-property p "vector" orig-vec)
|
(tramp-set-connection-property p "vector" orig-vec)
|
||||||
(tramp-compat-set-process-query-on-exit-flag p nil)
|
(tramp-compat-set-process-query-on-exit-flag p nil)
|
||||||
(tramp-process-actions
|
|
||||||
p v nil tramp-actions-copy-out-of-band)
|
;; When `shell-file-name' is "cmdproxy", we must adapt
|
||||||
|
;; `tramp-local-end-of-line' for sending the password.
|
||||||
|
(let ((tramp-local-end-of-line
|
||||||
|
(if (string-match "cmdproxy" shell-file-name)
|
||||||
|
"\n" tramp-local-end-of-line)))
|
||||||
|
(tramp-process-actions
|
||||||
|
p v nil tramp-actions-copy-out-of-band))
|
||||||
|
|
||||||
;; Check the return code.
|
;; Check the return code.
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
|
|
|
@ -4191,25 +4191,27 @@ Invokes `password-read' if available, `read-passwd' else."
|
||||||
;; it's bound. `auth-source-user-or-password' is an
|
;; it's bound. `auth-source-user-or-password' is an
|
||||||
;; obsoleted function, it has been replaced by
|
;; obsoleted function, it has been replaced by
|
||||||
;; `auth-source-search'.
|
;; `auth-source-search'.
|
||||||
(and (boundp 'auth-sources)
|
(ignore-errors
|
||||||
(tramp-get-connection-property
|
(and (boundp 'auth-sources)
|
||||||
v "first-password-request" nil)
|
(tramp-get-connection-property
|
||||||
;; Try with Tramp's current method.
|
v "first-password-request" nil)
|
||||||
(if (fboundp 'auth-source-search)
|
;; Try with Tramp's current method.
|
||||||
(setq auth-info
|
(if (fboundp 'auth-source-search)
|
||||||
(tramp-compat-funcall
|
(setq auth-info
|
||||||
'auth-source-search
|
(tramp-compat-funcall
|
||||||
:max 1
|
'auth-source-search
|
||||||
:user (or tramp-current-user t)
|
:max 1
|
||||||
:host tramp-current-host
|
:user (or tramp-current-user t)
|
||||||
:port tramp-current-method)
|
:host tramp-current-host
|
||||||
auth-passwd (plist-get (nth 0 auth-info) :secret)
|
:port tramp-current-method)
|
||||||
auth-passwd (if (functionp auth-passwd)
|
auth-passwd (plist-get
|
||||||
(funcall auth-passwd)
|
(nth 0 auth-info) :secret)
|
||||||
auth-passwd))
|
auth-passwd (if (functionp auth-passwd)
|
||||||
(tramp-compat-funcall
|
(funcall auth-passwd)
|
||||||
'auth-source-user-or-password
|
auth-passwd))
|
||||||
"password" tramp-current-host tramp-current-method)))
|
(tramp-compat-funcall
|
||||||
|
'auth-source-user-or-password
|
||||||
|
"password" tramp-current-host tramp-current-method))))
|
||||||
;; Try the password cache.
|
;; Try the password cache.
|
||||||
(when (functionp 'password-read)
|
(when (functionp 'password-read)
|
||||||
(let ((password
|
(let ((password
|
||||||
|
|
Loading…
Add table
Reference in a new issue