emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 ea78112: * net/tramp-sh.el (tramp-do-copy-or-rena


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 ea78112: * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n"
Date: Tue, 23 Dec 2014 13:17:15 +0000

branch: emacs-24
commit ea78112b12a8584ef226622f49c4e455882b8fad
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    * 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-*'.
---
 lisp/ChangeLog       |    7 +++++++
 lisp/net/tramp-sh.el |   10 ++++++++--
 lisp/net/tramp.el    |   40 +++++++++++++++++++++-------------------
 3 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7f1346d..9cae9b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-23  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * progmodes/sh-script.el (sh-set-shell): Don't change the global value
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index dc78ace..a78d101 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2455,8 +2455,14 @@ The method used must be an out-of-band method."
                   (mapconcat 'identity (process-command p) " "))
                  (tramp-set-connection-property p "vector" orig-vec)
                  (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.
                  (goto-char (point-max))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7c79595..66c9508 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4191,25 +4191,27 @@ Invokes `password-read' if available, `read-passwd' 
else."
               ;; it's bound.  `auth-source-user-or-password' is an
               ;; obsoleted function, it has been replaced by
               ;; `auth-source-search'.
-              (and (boundp 'auth-sources)
-                   (tramp-get-connection-property
-                    v "first-password-request" nil)
-                   ;; Try with Tramp's current method.
-                   (if (fboundp 'auth-source-search)
-                       (setq auth-info
-                             (tramp-compat-funcall
-                              'auth-source-search
-                              :max 1
-                              :user (or tramp-current-user t)
-                              :host tramp-current-host
-                              :port tramp-current-method)
-                             auth-passwd (plist-get (nth 0 auth-info) :secret)
-                             auth-passwd (if (functionp auth-passwd)
-                                             (funcall auth-passwd)
-                                           auth-passwd))
-                     (tramp-compat-funcall
-                      'auth-source-user-or-password
-                      "password" tramp-current-host tramp-current-method)))
+              (ignore-errors
+                (and (boundp 'auth-sources)
+                     (tramp-get-connection-property
+                      v "first-password-request" nil)
+                     ;; Try with Tramp's current method.
+                     (if (fboundp 'auth-source-search)
+                         (setq auth-info
+                               (tramp-compat-funcall
+                                'auth-source-search
+                                :max 1
+                                :user (or tramp-current-user t)
+                                :host tramp-current-host
+                                :port tramp-current-method)
+                               auth-passwd (plist-get
+                                            (nth 0 auth-info) :secret)
+                               auth-passwd (if (functionp auth-passwd)
+                                               (funcall auth-passwd)
+                                             auth-passwd))
+                       (tramp-compat-funcall
+                        'auth-source-user-or-password
+                        "password" tramp-current-host tramp-current-method))))
               ;; Try the password cache.
               (when (functionp 'password-read)
                 (let ((password



reply via email to

[Prev in Thread] Current Thread [Next in Thread]