From 7c58cca134f827ca57d16d4126dc0247248b43bb Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 18 Oct 2019 19:44:49 +0200 Subject: Support old Samba versions in Tramp * doc/misc/tramp.texi (Relevant connection properties to override): New subsection. * lisp/net/tramp-smb.el (tramp-smb-get-cifs-capabilities): Check "posix" connection property. * lisp/net/tramp.el (with-tramp-progress-reporter): Fix docstring. --- lisp/net/tramp-smb.el | 9 +++++++-- lisp/net/tramp.el | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lisp/net') diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index b008e6b25eb..2a9cf6a6d75 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1814,8 +1814,13 @@ Result is the list (LOCALNAME MODE SIZE MTIME)." (defun tramp-smb-get-cifs-capabilities (vec) "Check, whether the SMB server supports POSIX commands." - ;; When we are not logged in yet, we return nil. - (if (process-live-p (tramp-get-connection-process vec)) + ;; When we are not logged in yet, we return nil. The + ;; connection-local property "posix" is not set explicitly; it is + ;; just checked in order to let a user configure it to nil on hosts + ;; which return cifs properties, but lack a proper implementation. + ;; Very old Samba implementations, for example. + (if (and (process-live-p (tramp-get-connection-process vec)) + (tramp-get-connection-property vec "posix" t)) (with-tramp-connection-property (tramp-get-connection-process vec) "cifs-capabilities" (save-match-data diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 84a6febf240..6ff313e8fb3 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1922,7 +1922,7 @@ If VAR is nil, then we bind `v' to the structure and `method', `user', (tramp-compat-progress-reporter-update reporter value suffix)))) (defmacro with-tramp-progress-reporter (vec level message &rest body) - "Executes BODY, spinning a progress reporter with MESSAGE. + "Execute BODY, spinning a progress reporter with MESSAGE. If LEVEL does not fit for visible messages, there are only traces without a visible progress reporter." (declare (indent 3) (debug t)) -- cgit v1.2.1