Commit e8912d5b authored by Michael Albinus's avatar Michael Albinus

Sync with Tramp 2.3.4-pre

* doc/misc/trampver.texi: Change version to "2.3.4-pre

* lisp/net/tramp.el (tramp-mode, tramp-verbose)
(tramp-backup-directory-alist, tramp-auto-save-directory)
(tramp-encoding-shell, tramp-encoding-command-switch)
(tramp-encoding-command-interactive, tramp-default-method)
(tramp-default-method-alist, tramp-default-user)
(tramp-default-user-alist, tramp-default-host)
(tramp-default-host-alist, tramp-default-proxies-alist)
(tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist)
(tramp-local-end-of-line, tramp-rsh-end-of-line)
(tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
(tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
(tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
(tramp-terminal-prompt-regexp)
(tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp)
(tramp-process-alive-regexp, tramp-chunksize)
(tramp-process-connection-type, tramp-connection-timeout)
(tramp-connection-min-time-diff)
(tramp-completion-reread-directory-timeout):
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
(tramp-gvfs-zeroconf-domain, tramp-bluez-discover-devices-timeout):
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-terminal-type)
(tramp-histfile-override, tramp-use-ssh-controlmaster-options)
(tramp-remote-path, tramp-remote-process-environment)
(tramp-sh-extra-args):
* lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
(tramp-smb-conf, tramp-smb-winexe-program)
(tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch):
Dont't require 'tramp.  (Bug#31558)

* lisp/net/tramp.el (tramp-accept-process-output):
* lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-start-file-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process): Suppress timers.

* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Write proper message.

* lisp/net/tramp-cmds.el (tramp-change-syntax):
Use `customize-set-variable'.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Ensure proper EOL handling for Darwin.
(tramp-find-inline-compress): Improve command quoting for w32.
Reported by Chris Zheng <chriszheng99@gmail.com>.
(tramp-open-connection-setup-interactive-shell): Wrap both echo
calls in parentheses, in order to avoid double prompt.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_RESOURCE_NAME_NOT_FOUND".

* lisp/net/tramp.el (tramp-default-user-alist)
(tramp-default-host-alist): Fix docstring.
(tramp-dissect-file-name): Adapt docstring.  (Bug#30904)
(tramp-make-tramp-file-name): Check, that method is
not empty.  (Bug#30038)
(tramp-message-show-message): Change default.

* lisp/net/trampver.el: Change version to "2.3.4-pre".

* test/lisp/net/tramp-tests.el (ert-x): Require it.
(tramp-test10-write-region): Extend test.
(tramp--test-emacs27-p, tramp--test-windows-nt): New defuns.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files): Use them.
(tramp-test21-file-links): Do not call `make-symbolic-link' on w32.
Fix file name quoting test.
(tramp-test32-environment-variables-and-port-numbers):
Adapt check for systems which do not support "echo -n".  (Bug#29712)
(tramp-test36-find-backup-file-name): Call also
`convert-standard-filename' due to w32.
(tramp-test41-asynchronous-requests):
Use $REMOTE_PARALLEL_PROCESSES.  Flush cache prior file operations.
(tramp-test42-auto-load, tramp-test42-delay-load)
(tramp-test42-recursive-load, tramp-test42-remote-load-path):
Quote command due to w32.
parent 9a7a2e91
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from @c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run @c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number. @c "autoconf && ./configure" to change the version number.
@set trampver 2.3.3.26.1 @set trampver 2.3.4-pre
@c Other flags from configuration @c Other flags from configuration
@set instprefix /usr/local @set instprefix /usr/local
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
"Name of the Android Debug Bridge program." "Name of the Android Debug Bridge program."
:group 'tramp :group 'tramp
:version "24.4" :version "24.4"
:type 'string :type 'string)
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-adb-connect-if-not-connected nil (defcustom tramp-adb-connect-if-not-connected nil
...@@ -49,8 +48,7 @@ ...@@ -49,8 +48,7 @@
It is used for TCP/IP devices." It is used for TCP/IP devices."
:group 'tramp :group 'tramp
:version "25.1" :version "25.1"
:type 'boolean :type 'boolean)
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defconst tramp-adb-method "adb" (defconst tramp-adb-method "adb"
...@@ -62,8 +60,7 @@ It is used for TCP/IP devices." ...@@ -62,8 +60,7 @@ It is used for TCP/IP devices."
"Regexp used as prompt in almquist shell." "Regexp used as prompt in almquist shell."
:type 'string :type 'string
:version "24.4" :version "24.4"
:group 'tramp :group 'tramp)
:require 'tramp)
(defconst tramp-adb-ls-date-regexp (defconst tramp-adb-ls-date-regexp
"[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]" "[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]"
...@@ -689,13 +686,22 @@ But handle the case, if the \"test\" command is not available." ...@@ -689,13 +686,22 @@ But handle the case, if the \"test\" command is not available."
(tramp-error v 'file-error "Cannot write: `%s'" filename)) (tramp-error v 'file-error "Cannot write: `%s'" filename))
(delete-file tmpfile))) (delete-file tmpfile)))
(when (or (eq visit t) (stringp visit))
(set-visited-file-modtime))
(unless (equal curbuf (current-buffer)) (unless (equal curbuf (current-buffer))
(tramp-error (tramp-error
v 'file-error v 'file-error
"Buffer has changed from `%s' to `%s'" curbuf (current-buffer)))))) "Buffer has changed from `%s' to `%s'" curbuf (current-buffer)))
;; Set file modification time.
(when (or (eq visit t) (stringp visit))
(set-visited-file-modtime
(tramp-compat-file-attribute-modification-time
(file-attributes filename))))
;; The end.
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook))))
(defun tramp-adb-handle-set-file-modes (filename mode) (defun tramp-adb-handle-set-file-modes (filename mode)
"Like `set-file-modes' for Tramp files." "Like `set-file-modes' for Tramp files."
...@@ -1046,7 +1052,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." ...@@ -1046,7 +1052,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(or (null program) tramp-process-connection-type)) (or (null program) tramp-process-connection-type))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name) (name1 name)
(i 0)) (i 0)
;; We do not want to run timers.
timer-list timer-idle-list)
(while (get-process name1) (while (get-process name1)
;; NAME must be unique as process name. ;; NAME must be unique as process name.
......
...@@ -73,16 +73,14 @@ details see the info pages." ...@@ -73,16 +73,14 @@ details see the info pages."
:version "24.4" :version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil)) :type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
(choice :tag " Property" string) (choice :tag " Property" string)
(choice :tag " Value" sexp))) (choice :tag " Value" sexp))))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-persistency-file-name (defcustom tramp-persistency-file-name
(expand-file-name (locate-user-emacs-file "tramp")) (expand-file-name (locate-user-emacs-file "tramp"))
"File which keeps connection history for Tramp connections." "File which keeps connection history for Tramp connections."
:group 'tramp :group 'tramp
:type 'file :type 'file)
:require 'tramp)
(defvar tramp-cache-data-changed nil (defvar tramp-cache-data-changed nil
"Whether persistent cache data have been changed.") "Whether persistent cache data have been changed.")
......
...@@ -49,7 +49,7 @@ SYNTAX can be one of the symbols `default' (default), ...@@ -49,7 +49,7 @@ SYNTAX can be one of the symbols `default' (default),
(unless (string-equal input "") (unless (string-equal input "")
(list (intern input))))) (list (intern input)))))
(when syntax (when syntax
(custom-set-variables `(tramp-syntax ',syntax)))) (customize-set-variable 'tramp-syntax syntax)))
(defun tramp-list-tramp-buffers () (defun tramp-list-tramp-buffers ()
"Return a list of all Tramp connection buffers." "Return a list of all Tramp connection buffers."
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
;; 'car ;; 'car
;; (dbus-call-method ;; (dbus-call-method
;; :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker ;; :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
;; tramp-gvfs-interface-mounttracker "listMountableInfo"))) ;; tramp-gvfs-interface-mounttracker "ListMountableInfo")))
;; Note that all other connection methods are not tested, beside the ;; Note that all other connection methods are not tested, beside the
;; ones offered for customization in `tramp-gvfs-methods'. If you ;; ones offered for customization in `tramp-gvfs-methods'. If you
...@@ -122,8 +122,7 @@ ...@@ -122,8 +122,7 @@
(const "obex") (const "obex")
(const "sftp") (const "sftp")
(const "smb") (const "smb")
(const "synce"))) (const "synce"))))
:require 'tramp)
;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'. ;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'.
;;;###tramp-autoload ;;;###tramp-autoload
...@@ -141,8 +140,7 @@ ...@@ -141,8 +140,7 @@
"Zeroconf domain to be used for discovering services, like host names." "Zeroconf domain to be used for discovering services, like host names."
:group 'tramp :group 'tramp
:version "23.2" :version "23.2"
:type 'string :type 'string)
:require 'tramp)
;; Add the methods to `tramp-methods', in order to allow minibuffer ;; Add the methods to `tramp-methods', in order to allow minibuffer
;; completion. ;; completion.
...@@ -393,8 +391,7 @@ completion, nil means to use always cached values for discovered ...@@ -393,8 +391,7 @@ completion, nil means to use always cached values for discovered
devices." devices."
:group 'tramp :group 'tramp
:version "23.2" :version "23.2"
:type '(choice (const nil) integer) :type '(choice (const nil) integer))
:require 'tramp)
(defvar tramp-bluez-discovery nil (defvar tramp-bluez-discovery nil
"Indicator for a running bluetooth device discovery. "Indicator for a running bluetooth device discovery.
...@@ -1270,7 +1267,8 @@ file-notify events." ...@@ -1270,7 +1267,8 @@ file-notify events."
(file-attributes filename)))) (file-attributes filename))))
;; The end. ;; The end.
(when (or (eq visit t) (null visit) (stringp visit)) (when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename)) (tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook))) (run-hooks 'tramp-handle-write-region-hook)))
......
...@@ -47,8 +47,7 @@ When inline transfer, compress transferred data of file ...@@ -47,8 +47,7 @@ When inline transfer, compress transferred data of file
whose size is this value or above (up to `tramp-copy-size-limit'). whose size is this value or above (up to `tramp-copy-size-limit').
If it is nil, no compression at all will be applied." If it is nil, no compression at all will be applied."
:group 'tramp :group 'tramp
:type '(choice (const nil) integer) :type '(choice (const nil) integer))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-copy-size-limit 10240 (defcustom tramp-copy-size-limit 10240
...@@ -56,8 +55,7 @@ If it is nil, no compression at all will be applied." ...@@ -56,8 +55,7 @@ If it is nil, no compression at all will be applied."
out-of-the-band copy. out-of-the-band copy.
If it is nil, out-of-the-band copy will be used without a check." If it is nil, out-of-the-band copy will be used without a check."
:group 'tramp :group 'tramp
:type '(choice (const nil) integer) :type '(choice (const nil) integer))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-terminal-type "dumb" (defcustom tramp-terminal-type "dumb"
...@@ -66,8 +64,7 @@ Because Tramp wants to parse the output of the remote shell, it is easily ...@@ -66,8 +64,7 @@ Because Tramp wants to parse the output of the remote shell, it is easily
confused by ANSI color escape sequences and suchlike. Often, shell init confused by ANSI color escape sequences and suchlike. Often, shell init
files conditionalize this setup based on the TERM environment variable." files conditionalize this setup based on the TERM environment variable."
:group 'tramp :group 'tramp
:type 'string :type 'string)
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-histfile-override "~/.tramp_history" (defcustom tramp-histfile-override "~/.tramp_history"
...@@ -84,8 +81,7 @@ the default storage location, e.g. \"$HOME/.sh_history\"." ...@@ -84,8 +81,7 @@ the default storage location, e.g. \"$HOME/.sh_history\"."
:version "25.2" :version "25.2"
:type '(choice (const :tag "Do not override HISTFILE" nil) :type '(choice (const :tag "Do not override HISTFILE" nil)
(const :tag "Unset HISTFILE" t) (const :tag "Unset HISTFILE" t)
(string :tag "Redirect to a file")) (string :tag "Redirect to a file")))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defconst tramp-display-escape-sequence-regexp "\e[[;0-9]+m" (defconst tramp-display-escape-sequence-regexp "\e[[;0-9]+m"
...@@ -119,8 +115,7 @@ detected as prompt when being sent on echoing hosts, therefore.") ...@@ -119,8 +115,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
"Whether to use `tramp-ssh-controlmaster-options'." "Whether to use `tramp-ssh-controlmaster-options'."
:group 'tramp :group 'tramp
:version "24.4" :version "24.4"
:type 'boolean :type 'boolean)
:require 'tramp)
(defvar tramp-ssh-controlmaster-options nil (defvar tramp-ssh-controlmaster-options nil
"Which ssh Control* arguments to use. "Which ssh Control* arguments to use.
...@@ -528,8 +523,7 @@ the list by the special value `tramp-own-remote-path'." ...@@ -528,8 +523,7 @@ the list by the special value `tramp-own-remote-path'."
:type '(repeat (choice :type '(repeat (choice
(const :tag "Default Directories" tramp-default-remote-path) (const :tag "Default Directories" tramp-default-remote-path)
(const :tag "Private Directories" tramp-own-remote-path) (const :tag "Private Directories" tramp-own-remote-path)
(string :tag "Directory"))) (string :tag "Directory"))))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-remote-process-environment (defcustom tramp-remote-process-environment
...@@ -553,8 +547,7 @@ The INSIDE_EMACS environment variable will automatically be set ...@@ -553,8 +547,7 @@ The INSIDE_EMACS environment variable will automatically be set
based on the TRAMP and Emacs versions, and should not be set here." based on the TRAMP and Emacs versions, and should not be set here."
:group 'tramp :group 'tramp
:version "26.1" :version "26.1"
:type '(repeat string) :type '(repeat string))
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
...@@ -567,8 +560,7 @@ This variable is only used when Tramp needs to start up another shell ...@@ -567,8 +560,7 @@ This variable is only used when Tramp needs to start up another shell
for tilde expansion. The extra arguments should typically prevent the for tilde expansion. The extra arguments should typically prevent the
shell from reading its init file." shell from reading its init file."
:group 'tramp :group 'tramp
:type '(alist :key-type regexp :value-type string) :type '(alist :key-type regexp :value-type string))
:require 'tramp)
(defconst tramp-actions-before-shell (defconst tramp-actions-before-shell
'((tramp-login-prompt-regexp tramp-action-login) '((tramp-login-prompt-regexp tramp-action-login)
...@@ -2481,7 +2473,9 @@ The method used must be an out-of-band method." ...@@ -2481,7 +2473,9 @@ The method used must be an out-of-band method."
;; The default directory must be remote. ;; The default directory must be remote.
(let ((default-directory (let ((default-directory
(file-name-directory (if t1 filename newname))) (file-name-directory (if t1 filename newname)))
(process-environment (copy-sequence process-environment))) (process-environment (copy-sequence process-environment))
;; We do not want to run timers.
timer-list timer-idle-list)
;; Set the transfer process properties. ;; Set the transfer process properties.
(tramp-set-connection-property (tramp-set-connection-property
v "process-name" (buffer-name (current-buffer))) v "process-name" (buffer-name (current-buffer)))
...@@ -2908,7 +2902,9 @@ the result will be a local, non-Tramp, file name." ...@@ -2908,7 +2902,9 @@ the result will be a local, non-Tramp, file name."
;; We do not want to raise an error when ;; We do not want to raise an error when
;; `start-file-process' has been started several times in ;; `start-file-process' has been started several times in
;; `eshell' and friends. ;; `eshell' and friends.
(tramp-current-connection nil) tramp-current-connection
;; We do not want to run timers.
timer-list timer-idle-list
p) p)
(while (get-process name1) (while (get-process name1)
...@@ -3420,7 +3416,8 @@ the result will be a local, non-Tramp, file name." ...@@ -3420,7 +3416,8 @@ the result will be a local, non-Tramp, file name."
;; Set the ownership. ;; Set the ownership.
(when need-chown (when need-chown
(tramp-set-file-uid-gid filename uid gid)) (tramp-set-file-uid-gid filename uid gid))
(when (or (eq visit t) (null visit) (stringp visit)) (when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename)) (tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook))))) (run-hooks 'tramp-handle-write-region-hook)))))
...@@ -4103,7 +4100,10 @@ process to set up. VEC specifies the connection." ...@@ -4103,7 +4100,10 @@ process to set up. VEC specifies the connection."
(with-current-buffer (process-buffer proc) (with-current-buffer (process-buffer proc)
;; Use MULE to select the right EOL convention for communicating ;; Use MULE to select the right EOL convention for communicating
;; with the process. ;; with the process.
(let ((cs (or (and (memq 'utf-8 (coding-system-list)) (let ((cs (or (and (memq 'utf-8-hfs (coding-system-list))
(string-match "^Darwin" uname)
(cons 'utf-8-hfs 'utf-8-hfs))
(and (memq 'utf-8 (coding-system-list))
(string-match "utf-?8" (tramp-get-remote-locale vec)) (string-match "utf-?8" (tramp-get-remote-locale vec))
(cons 'utf-8 'utf-8)) (cons 'utf-8 'utf-8))
(process-coding-system proc) (process-coding-system proc)
...@@ -4115,16 +4115,11 @@ process to set up. VEC specifies the connection." ...@@ -4115,16 +4115,11 @@ process to set up. VEC specifies the connection."
cs-encode cs-encode
(coding-system-change-eol-conversion (coding-system-change-eol-conversion
cs-encode (if (string-match "^Darwin" uname) 'mac 'unix))) cs-encode (if (string-match "^Darwin" uname) 'mac 'unix)))
(tramp-send-command vec "echo foo ; echo bar" t) (tramp-send-command vec "(echo foo ; echo bar)" t)
(goto-char (point-min)) (goto-char (point-min))
(when (search-forward "\r" nil t) (when (search-forward "\r" nil t)
(setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos))) (setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
;; Special setting for macOS. (set-process-coding-system proc cs-decode cs-encode)
(when (and (string-match "^Darwin" uname)
(memq 'utf-8-hfs (coding-system-list)))
(setq cs-decode 'utf-8-hfs
cs-encode 'utf-8-hfs))
(set-buffer-process-coding-system cs-decode cs-encode)
(tramp-message (tramp-message
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))) vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))
...@@ -4470,13 +4465,14 @@ Goes through the list `tramp-inline-compress-commands'." ...@@ -4470,13 +4465,14 @@ Goes through the list `tramp-inline-compress-commands'."
(zerop (zerop
(tramp-call-local-coding-command (tramp-call-local-coding-command
(format (format
"echo %s | %s | %s" magic
;; Windows shells need the program file name after ;; Windows shells need the program file name after
;; the pipe symbol be quoted if they use forward ;; the pipe symbol be quoted if they use forward
;; slashes as directory separators. ;; slashes as directory separators.
(if (memq system-type '(windows-nt)) (mapconcat
"echo %s | \"%s\" | \"%s\"" 'shell-quote-argument (split-string compress) " ")
"echo %s | %s | %s") (mapconcat
magic compress decompress) 'shell-quote-argument (split-string decompress) " "))
nil nil)) nil nil))
(throw 'next nil)) (throw 'next nil))
(tramp-message (tramp-message
......
...@@ -66,16 +66,14 @@ ...@@ -66,16 +66,14 @@
(defcustom tramp-smb-program "smbclient" (defcustom tramp-smb-program "smbclient"
"Name of SMB client to run." "Name of SMB client to run."
:group 'tramp :group 'tramp
:type 'string :type 'string)
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-smb-acl-program "smbcacls" (defcustom tramp-smb-acl-program "smbcacls"
"Name of SMB acls to run." "Name of SMB acls to run."
:group 'tramp :group 'tramp
:type 'string :type 'string
:version "24.4" :version "24.4")
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-smb-conf "/dev/null" (defcustom tramp-smb-conf "/dev/null"
...@@ -83,8 +81,7 @@ ...@@ -83,8 +81,7 @@
If it is nil, no smb.conf will be added to the `tramp-smb-program' If it is nil, no smb.conf will be added to the `tramp-smb-program'
call, letting the SMB client use the default one." call, letting the SMB client use the default one."
:group 'tramp :group 'tramp
:type '(choice (const nil) (file :must-match t)) :type '(choice (const nil) (file :must-match t)))
:require 'tramp)
(defvar tramp-smb-version nil (defvar tramp-smb-version nil
"Version string of the SMB client.") "Version string of the SMB client.")
...@@ -151,6 +148,7 @@ call, letting the SMB client use the default one." ...@@ -151,6 +148,7 @@ call, letting the SMB client use the default one."
"NT_STATUS_OBJECT_NAME_NOT_FOUND" "NT_STATUS_OBJECT_NAME_NOT_FOUND"
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD" "NT_STATUS_OBJECT_PATH_SYNTAX_BAD"
"NT_STATUS_PASSWORD_MUST_CHANGE" "NT_STATUS_PASSWORD_MUST_CHANGE"
"NT_STATUS_RESOURCE_NAME_NOT_FOUND"
"NT_STATUS_SHARING_VIOLATION" "NT_STATUS_SHARING_VIOLATION"
"NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE" "NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE"
"NT_STATUS_UNSUCCESSFUL" "NT_STATUS_UNSUCCESSFUL"
...@@ -295,8 +293,7 @@ If it isn't found in the local $PATH, the absolute path of winexe ...@@ -295,8 +293,7 @@ If it isn't found in the local $PATH, the absolute path of winexe
shall be given. This is needed for remote processes." shall be given. This is needed for remote processes."
:group 'tramp :group 'tramp
:type 'string :type 'string
:version "24.3" :version "24.3")
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command "powershell.exe" (defcustom tramp-smb-winexe-shell-command "powershell.exe"
...@@ -304,8 +301,7 @@ shall be given. This is needed for remote processes." ...@@ -304,8 +301,7 @@ shall be given. This is needed for remote processes."
This must be Powershell V2 compatible." This must be Powershell V2 compatible."
:group 'tramp :group 'tramp
:type 'string :type 'string
:version "24.3" :version "24.3")
:require 'tramp)
;;;###tramp-autoload ;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command-switch "-file -" (defcustom tramp-smb-winexe-shell-command-switch "-file -"
...@@ -313,8 +309,7 @@ This must be Powershell V2 compatible." ...@@ -313,8 +309,7 @@ This must be Powershell V2 compatible."
This can be used to disable echo etc." This can be used to disable echo etc."
:group 'tramp :group 'tramp
:type 'string :type 'string
:version "24.3" :version "24.3")
:require 'tramp)
;; It must be a `defsubst' in order to push the whole code into ;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading. ;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
...@@ -464,7 +459,9 @@ pass to the OPERATION." ...@@ -464,7 +459,9 @@ pass to the OPERATION."
(expand-file-name (expand-file-name
tramp-temp-name-prefix tramp-temp-name-prefix
(tramp-compat-temporary-file-directory)))) (tramp-compat-temporary-file-directory))))
(args (list (concat "//" host "/" share) "-E"))) (args (list (concat "//" host "/" share) "-E"))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user))) (if (not (zerop (length user)))
(setq args (append args (list "-U" user))) (setq args (append args (list "-U" user)))
...@@ -752,7 +749,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." ...@@ -752,7 +749,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(let* ((share (tramp-smb-get-share v)) (let* ((share (tramp-smb-get-share v))
(localname (replace-regexp-in-string (localname (replace-regexp-in-string
"\\\\" "/" (tramp-smb-get-localname v))) "\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E"))) (args (list (concat "//" host "/" share) "-E"))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user))) (if (not (zerop (length user)))
(setq args (append args (list "-U" user))) (setq args (append args (list "-U" user)))
...@@ -1235,6 +1234,8 @@ component is used as the target of the symlink." ...@@ -1235,6 +1234,8 @@ component is used as the target of the symlink."
(let* ((name (file-name-nondirectory program)) (let* ((name (file-name-nondirectory program))
(name1 name) (name1 name)
(i 0) (i 0)
;; We do not want to run timers.
timer-list timer-idle-list
input tmpinput outbuf command ret) input tmpinput outbuf command ret)
;; Determine input. ;; Determine input.
...@@ -1417,7 +1418,9 @@ component is used as the target of the symlink." ...@@ -1417,7 +1418,9 @@ component is used as the target of the symlink."
"\\\\" "/" (tramp-smb-get-localname v))) "\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E" "-S" (args (list (concat "//" host "/" share) "-E" "-S"
(replace-regexp-in-string (replace-regexp-in-string
"\n" "," acl-string)))) "\n" "," acl-string)))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user))) (if (not (zerop (length user)))
(setq args (append args (list "-U" user))) (setq args (append args (list "-U" user)))
...@@ -1497,7 +1500,9 @@ component is used as the target of the symlink." ...@@ -1497,7 +1500,9 @@ component is used as the target of the symlink."
(command (mapconcat 'identity (cons program args) " ")) (command (mapconcat 'identity (cons program args) " "))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name) (name1 name)
(i 0)) (i 0)
;; We do not want to run timers.
timer-list timer-idle-list)
(unwind-protect (unwind-protect
(save-excursion (save-excursion
(save-restriction (save-restriction
...@@ -1589,9 +1594,18 @@ errors for shares like \"C$/\", which are common in Microsoft Windows." ...@@ -1589,9 +1594,18 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
(tramp-error (tramp-error
v 'file-error v 'file-error
"Buffer has changed from `%s' to `%s'" curbuf (current-buffer))) "Buffer has changed from `%s' to `%s'" curbuf (current-buffer)))
(when (eq visit t)
(set-visited-file-modtime)))))