diff options
| author | Michael Albinus | 2019-10-18 19:44:49 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-10-18 19:44:49 +0200 |
| commit | 7c58cca134f827ca57d16d4126dc0247248b43bb (patch) | |
| tree | 4dded0d171ede07047100378e59f3d1fa6b893fc /doc/misc | |
| parent | 2c9128ce1352d8098d6bbd43d081a0fb07cfff8f (diff) | |
| download | emacs-7c58cca134f827ca57d16d4126dc0247248b43bb.tar.gz emacs-7c58cca134f827ca57d16d4126dc0247248b43bb.zip | |
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.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/tramp.texi | 106 |
1 files changed, 71 insertions, 35 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f34484ba711..0252620eb71 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -1170,8 +1170,8 @@ of the configured system storage. | |||
| 1170 | 1170 | ||
| 1171 | Optional flags to the different @option{rclone} operations could be | 1171 | Optional flags to the different @option{rclone} operations could be |
| 1172 | passed as connection property, @xref{Predefined connection | 1172 | passed as connection property, @xref{Predefined connection |
| 1173 | information}. Supported properties are @samp{mount-args}, | 1173 | information}. Supported properties are @t{"mount-args"}, |
| 1174 | @samp{copyto-args} and @samp{moveto-args}. | 1174 | @t{"copyto-args"} and @t{"moveto-args"}. |
| 1175 | 1175 | ||
| 1176 | Access via @option{rclone} is slow. If you have an alternative method | 1176 | Access via @option{rclone} is slow. If you have an alternative method |
| 1177 | for accessing the system storage, you shall prefer this. | 1177 | for accessing the system storage, you shall prefer this. |
| @@ -1954,7 +1954,7 @@ property's value. | |||
| 1954 | @var{property} is any method specific parameter contained in | 1954 | @var{property} is any method specific parameter contained in |
| 1955 | @code{tramp-methods}. The parameter key in @code{tramp-methods} is a | 1955 | @code{tramp-methods}. The parameter key in @code{tramp-methods} is a |
| 1956 | symbol name @code{tramp-<foo>}. To overwrite that property, use the | 1956 | symbol name @code{tramp-<foo>}. To overwrite that property, use the |
| 1957 | string @samp{<foo>} for @var{property}. For example, this changes the | 1957 | string @t{"<foo>"} for @var{property}. For example, this changes the |
| 1958 | remote shell: | 1958 | remote shell: |
| 1959 | 1959 | ||
| 1960 | @lisp | 1960 | @lisp |
| @@ -1975,37 +1975,73 @@ The parameters @code{tramp-remote-shell} and | |||
| 1975 | @code{tramp-remote-shell-login} in @code{tramp-methods} now have new | 1975 | @code{tramp-remote-shell-login} in @code{tramp-methods} now have new |
| 1976 | values for the remote host. | 1976 | values for the remote host. |
| 1977 | 1977 | ||
| 1978 | A common use case is to override the session timeout of a connection, | 1978 | @var{property} could also be any property found in |
| 1979 | that is the time (in seconds) after a connection is disabled, and must | 1979 | @code{tramp-persistency-file-name}. |
| 1980 | be reestablished. This can be set for any connection; for the | ||
| 1981 | @option{sudo} and @option{doas} methods there exist predefined values. | ||
| 1982 | A value of @code{nil} disables this feature. For example: | ||
| 1983 | 1980 | ||
| 1984 | @lisp | ||
| 1985 | @group | ||
| 1986 | (add-to-list 'tramp-connection-properties | ||
| 1987 | (list (regexp-quote "@trampfn{sudo,root@@system-name,}") | ||
| 1988 | "session-timeout" 30)) | ||
| 1989 | @end group | ||
| 1990 | @end lisp | ||
| 1991 | 1981 | ||
| 1992 | @noindent | 1982 | @subsection Relevant connection properties to override |
| 1993 | @samp{system-name} stands here for the host returned by the function | ||
| 1994 | @command{(system-name)}. | ||
| 1995 | 1983 | ||
| 1996 | @var{property} could also be any property found in | 1984 | Not all connection properties need to be changed. The most relevant |
| 1997 | @code{tramp-persistency-file-name}. | 1985 | properties are listed here: |
| 1998 | 1986 | ||
| 1999 | To get around how restricted shells randomly drop connections, set the | 1987 | @itemize |
| 2000 | special property @samp{busybox}. For example: | 1988 | @item @t{"login-program"} |
| 2001 | 1989 | ||
| 2002 | @lisp | 1990 | The property @t{"login-program"} keeps the program to be called in |
| 2003 | @group | 1991 | order to connect the remote host. Sometimes, the program might have |
| 2004 | (add-to-list 'tramp-connection-properties | 1992 | another name on your host, or it is located on another path. In this |
| 2005 | (list (regexp-quote "@trampfn{ssh,user@@randomhost.your.domain,}") | 1993 | case, you can overwrite the default value, which is special for every |
| 2006 | "busybox" t)) | 1994 | connection method. It is used in all connection methods of |
| 2007 | @end group | 1995 | @file{tramp-sh.el}. |
| 2008 | @end lisp | 1996 | |
| 1997 | @item @t{"login-args"} | ||
| 1998 | |||
| 1999 | @t{"login-args"} specifies a list of lists of arguments to pass to | ||
| 2000 | @t{"login-program"}. Read the docstring of @code{tramp-methods} how | ||
| 2001 | to construct these lists. | ||
| 2002 | |||
| 2003 | @item @t{"remote-shell"} | ||
| 2004 | |||
| 2005 | This property tells Tramp which remote shell to apply on the remote | ||
| 2006 | host. It is used in all connection methods of @file{tramp-sh.el}. | ||
| 2007 | The default value is @t{"/bin/sh"}. | ||
| 2008 | |||
| 2009 | @item @t{"remote-shell-login"} | ||
| 2010 | |||
| 2011 | A property to be used in conjunction with @t{"remote-shell"}. It | ||
| 2012 | specifies, which shell argument triggers a login shell. Its default | ||
| 2013 | value is @t{"-l"}, but some shells, like @command{ksh}, prefer | ||
| 2014 | @t{"-"}. | ||
| 2015 | |||
| 2016 | @item @t{"session-timeout"} | ||
| 2017 | |||
| 2018 | All @file{tramp-sh.el} based methods accept the property | ||
| 2019 | @t{"session-timeout"}. This is the time (in seconds) after a | ||
| 2020 | connection is disabled for security reasons, and must be | ||
| 2021 | reestablished. A value of @code{nil} disables this feature. Most of | ||
| 2022 | the methods do not set this property except the @option{sudo} and | ||
| 2023 | @option{doas} methods, which use predefined values. | ||
| 2024 | |||
| 2025 | @item @t{"posix"} | ||
| 2026 | |||
| 2027 | Connections using the @option{smb} method check, whether the remote | ||
| 2028 | host supports posix commands. If the remote host runs Samba, it | ||
| 2029 | confirms this capability. However, some very old Samba versions have | ||
| 2030 | errors in their implementation. In order to suppress the posix | ||
| 2031 | commands for those hosts, the property @t{"posix"} shall be set to | ||
| 2032 | @code{nil}. | ||
| 2033 | |||
| 2034 | The default value of this property is @code{t} (not specified in | ||
| 2035 | @code{tramp-methods}). If the remote host runs native MS Windows, | ||
| 2036 | there is no effect of this property. | ||
| 2037 | |||
| 2038 | @item @t{"mount-args"}@* | ||
| 2039 | @t{"copyto-args"}@* | ||
| 2040 | @t{"moveto-args"} | ||
| 2041 | |||
| 2042 | These properties keep optional flags to the different @option{rclone} | ||
| 2043 | operations. Their default value is @code{nil}. | ||
| 2044 | @end itemize | ||
| 2009 | 2045 | ||
| 2010 | 2046 | ||
| 2011 | @node Remote programs | 2047 | @node Remote programs |
| @@ -2106,7 +2142,7 @@ be recomputed. To force @value{tramp} to recompute afresh, call | |||
| 2106 | 2142 | ||
| 2107 | Per default, @value{tramp} uses the command @command{/bin/sh} for | 2143 | Per default, @value{tramp} uses the command @command{/bin/sh} for |
| 2108 | starting a shell on the remote host. This can be changed by setting | 2144 | starting a shell on the remote host. This can be changed by setting |
| 2109 | the connection property @option{remote-shell}, see @xref{Predefined | 2145 | the connection property @t{"remote-shell"}, see @xref{Predefined |
| 2110 | connection information}. If you want, for example, use | 2146 | connection information}. If you want, for example, use |
| 2111 | @command{/usr/bin/zsh} on a remote host, you might apply | 2147 | @command{/usr/bin/zsh} on a remote host, you might apply |
| 2112 | 2148 | ||
| @@ -2215,7 +2251,7 @@ prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. | |||
| 2215 | 2251 | ||
| 2216 | @value{tramp} uses the user option @code{tramp-terminal-type} to set | 2252 | @value{tramp} uses the user option @code{tramp-terminal-type} to set |
| 2217 | the remote environment variable @env{TERM} for the shells it runs. | 2253 | the remote environment variable @env{TERM} for the shells it runs. |
| 2218 | Per default, it is @samp{"dumb"}, but this could be changed. A dumb | 2254 | Per default, it is @t{"dumb"}, but this could be changed. A dumb |
| 2219 | terminal is best suited to run the background sessions of | 2255 | terminal is best suited to run the background sessions of |
| 2220 | @value{tramp}. However, running interactive remote shells might | 2256 | @value{tramp}. However, running interactive remote shells might |
| 2221 | require a different setting. This could be achieved by tweaking the | 2257 | require a different setting. This could be achieved by tweaking the |
| @@ -3782,10 +3818,10 @@ following line to @file{~/.zshrc}: | |||
| 3782 | [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return | 3818 | [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return |
| 3783 | @end example | 3819 | @end example |
| 3784 | 3820 | ||
| 3785 | This uses the default value of @code{tramp-terminal-type}, | 3821 | This uses the default value of @code{tramp-terminal-type}, @t{"dumb"}, |
| 3786 | @samp{"dumb"}, as value of the @env{TERM} environment variable. If | 3822 | as value of the @env{TERM} environment variable. If you want to use |
| 3787 | you want to use another value for @env{TERM}, change | 3823 | another value for @env{TERM}, change @code{tramp-terminal-type} and |
| 3788 | @code{tramp-terminal-type} and this line accordingly. | 3824 | this line accordingly. |
| 3789 | 3825 | ||
| 3790 | Alternatively, you could set the remote login shell explicitly. See | 3826 | Alternatively, you could set the remote login shell explicitly. See |
| 3791 | @ref{Remote shell setup} for discussion of this technique, | 3827 | @ref{Remote shell setup} for discussion of this technique, |