summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-smb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-06-12 17:52:42 +0200
committerMichael Albinus <michael.albinus@gmx.de>2017-06-12 17:52:42 +0200
commit7dfc8353ce8e91fd4391abe7cb669dcb643f7b39 (patch)
treedd3e17c16be37c5908e3af629a9081e139e5507c /lisp/net/tramp-smb.el
parente6f47a9d6c5dcb1b7be3830381085412da9b10e6 (diff)
downloademacs-7dfc8353ce8e91fd4391abe7cb669dcb643f7b39.tar.gz
emacs-7dfc8353ce8e91fd4391abe7cb669dcb643f7b39.tar.bz2
emacs-7dfc8353ce8e91fd4391abe7cb669dcb643f7b39.zip
Handle port and domain in Tramp's password cache
* doc/misc/tramp.texi (Password handling): Explain port and domain handling in authinfo. * lisp/net/tramp.el (tramp-process-actions, tramp-clear-passwd): * lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askpassword): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): Handle also domain and port.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r--lisp/net/tramp-smb.el20
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 9ac2fc6670e..1aadd14fb41 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -439,9 +439,12 @@ pass to the OPERATION."
(if (not (file-directory-p newname))
(make-directory newname parents))
+ ;; Set variables for computing the prompt for reading password.
(setq tramp-current-method method
tramp-current-user user
- tramp-current-host host)
+ tramp-current-domain domain
+ tramp-current-host host
+ tramp-current-port port)
(let* ((share (tramp-smb-get-share v))
(localname (file-name-as-directory
@@ -729,10 +732,12 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-acl"
(when (executable-find tramp-smb-acl-program)
-
+ ;; Set variables for computing the prompt for reading password.
(setq tramp-current-method method
tramp-current-user user
- tramp-current-host host)
+ tramp-current-domain domain
+ tramp-current-host host
+ tramp-current-port port)
(let* ((share (tramp-smb-get-share v))
(localname (replace-regexp-in-string
@@ -1320,9 +1325,12 @@ target of the symlink differ."
(ignore-errors
(with-parsed-tramp-file-name filename nil
(when (and (stringp acl-string) (executable-find tramp-smb-acl-program))
+ ;; Set variables for computing the prompt for reading password.
(setq tramp-current-method method
tramp-current-user user
- tramp-current-host host)
+ tramp-current-domain domain
+ tramp-current-host host
+ tramp-current-port port)
(tramp-set-file-property v localname "file-acl" 'undef)
(let* ((share (tramp-smb-get-share v))
@@ -1876,7 +1884,9 @@ If ARGUMENT is non-nil, use it as argument for
;; Set variables for computing the prompt for reading password.
(setq tramp-current-method tramp-smb-method
tramp-current-user user
- tramp-current-host host)
+ tramp-current-domain domain
+ tramp-current-host host
+ tramp-current-port port)
(condition-case err
(let (tramp-message-show-message)