]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n"
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 23 Dec 2014 13:17:00 +0000 (14:17 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 23 Dec 2014 13:17:00 +0000 (14:17 +0100)
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
lisp/net/tramp-sh.el
lisp/net/tramp.el

index 7f1346d8b5a29f7984593fb724f1c37f97ddf6e9..9cae9b97c2e9a07a60634079b21fa7754a6dc798 100644 (file)
@@ -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>
 
        * progmodes/sh-script.el (sh-set-shell): Don't change the global value
index dc78acefba6d5155983f6154d3a50753b4feae1b..a78d101e3c11e91ca624609b2d751284b5994b3c 100644 (file)
@@ -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))
index 7c795950bf45b64234f611ea4d74eab37875451a..66c9508f6e39ea7f14ff01846d795e3144f3326f 100644 (file)
@@ -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