summaryrefslogtreecommitdiff
path: root/lib/ssh/doc/src/ssh.xml
diff options
context:
space:
mode:
authorHans Nilsson <hans@erlang.org>2019-09-26 11:58:46 +0200
committerHans Nilsson <hans@erlang.org>2019-09-26 11:58:46 +0200
commitaaa3da8a095c9d96e56048412ac5e0d75413dc01 (patch)
tree99056b21862fe31e489fb606a5d309fbb0a52bd8 /lib/ssh/doc/src/ssh.xml
parentc3c731edfc64c00b03f9394bfdae4ae2b0063798 (diff)
parent3242cc6767528274441c3bb1638fd67b95e646c3 (diff)
downloaderlang-aaa3da8a095c9d96e56048412ac5e0d75413dc01.tar.gz
Merge branch 'maint'
* maint: ssh: Document the 'disabled' option in Refman ssh: Introduce 'disabled' for 'shell' and 'exec' options ssh: Re-work the documentation on shell and exec options
Diffstat (limited to 'lib/ssh/doc/src/ssh.xml')
-rw-r--r--lib/ssh/doc/src/ssh.xml69
1 files changed, 56 insertions, 13 deletions
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index 1834ddd39a..6941d6b59c 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -368,14 +368,16 @@
<datatype>
<name name="shell_daemon_option"/>
+ <name name="shell_spec"/>
+ <name name="shell_fun"/>
<name name="'shell_fun/1'"/>
<name name="'shell_fun/2'"/>
<desc>
<p>Defines the read-eval-print loop used in a daemon when a shell is requested by the client.
The default is to use the Erlang shell: <c><![CDATA[{shell, start, []}]]></c>
</p>
- <p>See the option <seealso marker="#type-exec_daemon_option"><c>exec</c></seealso>
- for a description of how the daemon execute exec-requests depending on
+ <p>See the option <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso>
+ for a description of how the daemon executes shell-requests and exec-requests depending on
the shell- and exec-options.</p>
</desc>
</datatype>
@@ -415,41 +417,82 @@
</p>
<p>The option cooperates with the daemon-option <seealso marker="#type-shell_daemon_option"><c>shell</c></seealso>
in the following way:</p>
+
<taglist>
- <tag>1. If the exec-option is present (the shell-option may or may not be present):</tag>
+ <tag>1. If neither the <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso> nor the
+ <seealso marker="#type-shell_daemon_option"><c>shell-option</c></seealso> is present:</tag>
<item>
- <p>The exec-option fun is called with the same number of parameters as the arity of the fun,
+ <p>The default Erlang evaluator is used both for exec and shell requests.
+ The result is returned to the client.</p>
+ </item>
+
+ <tag>2. If the <seealso marker="#type-exec_daemon_option"><c>exec_spec</c></seealso>'s value is <c>disabled</c>
+ (the <seealso marker="#type-shell_daemon_option"><c>shell-option</c></seealso> may or may not be present):</tag>
+ <item>
+ <p>No exec-requests are executed but shell-requests are not affected, they follow the
+ <seealso marker="#type-shell_daemon_option"><c>shell_spec</c></seealso>'s value.</p>
+ </item>
+
+ <tag>3. If the <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso>
+ is present and the <seealso marker="#type-exec_daemon_option"><c>exec_spec</c></seealso> value =/= <c>disabled</c>
+ (the <seealso marker="#type-shell_daemon_option"><c>shell-option</c></seealso> may or may not be present):</tag>
+ <item>
+ <p>The <seealso marker="#type-exec_daemon_option"><c>exec_spec</c></seealso>
+ <c>fun()</c> is called with the same number of parameters as the arity of the fun,
and the result is returned to the client.
+ Shell-requests are not affected, they follow the
+ <seealso marker="#type-shell_daemon_option"><c>shell_spec</c></seealso>'s value.
</p>
</item>
- <tag>2. If the exec-option is absent, but a shell-option is present with the default Erlang shell:</tag>
+ <tag>4. If the <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso> is absent, and the
+ <seealso marker="#type-shell_daemon_option"><c>shell-option</c></seealso>
+ is present with the default Erlang shell as the
+ <seealso marker="#type-shell_daemon_option"><c>shell_spec</c></seealso>'s
+ value:</tag>
<item>
- <p>The default Erlang evaluator is used and the result is returned to the client.</p>
+ <p>The default Erlang evaluator is used both for exec and shell requests.
+ The result is returned to the client.</p>
</item>
- <tag>3. If the exec-option is absent, but a shell-option is present that is not the default Erlang shell:</tag>
+ <tag>5. If the <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso> is absent, and the
+ <seealso marker="#type-shell_daemon_option"><c>shell-option</c></seealso>
+ is present with a value that is neither the default Erlang shell nor the value <c>disabled</c>:</tag>
<item>
- <p>The exec-request is not evaluated and an error message is returned to the client.</p>
+ <p>The exec-request is not evaluated and an error message is returned to the client. Shell-requests
+ are executed according to the value of the
+ <seealso marker="#type-shell_daemon_option"><c>shell_spec</c></seealso>.</p>
</item>
- <tag>4. If neither the exec-option nor the shell-option is present:</tag>
+ <tag>6. If the <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso> is absent, and the
+ <seealso marker="#type-shell_daemon_option"><c>shell_spec</c></seealso>'s value is <c>disabled</c>:</tag>
<item>
- <p>The default Erlang evaluator is used and the result is returned to the client.</p>
+ <p>Exec requests are executed by the default shell, but shell-requests are not executed.</p>
</item>
+
</taglist>
- <p>If a custom CLI is installed (see the option <seealso marker="#type-ssh_cli_daemon_option"><c>ssh_cli</c></seealso>)
+ <p>If a custom CLI is installed (see the option
+ <seealso marker="#type-ssh_cli_daemon_option"><c>ssh_cli</c></seealso>)
the rules above are replaced by thoose implied by the custom CLI.
</p>
<note>
- <p>The exec-option has existed for a long time but has not previously been documented. The old
- definition and behaviour are retained but obey the rules 1-4 above if conflicting.
+ <p>The <seealso marker="#type-exec_daemon_option"><c>exec-option</c></seealso>
+ has existed for a long time but has not previously been documented. The old
+ definition and behaviour are retained but obey the rules 1-6 above if conflicting.
The old and undocumented style should not be used in new programs.</p>
</note>
</desc>
</datatype>
<datatype>
+ <name name="deprecated_exec_opt"/>
+ <desc>
+ <p>Old-style exec specification that are kept for compatibility, but should not be used in
+ new programs</p>
+ </desc>
+ </datatype>
+
+ <datatype>
<name name="ssh_cli_daemon_option"/>
<desc>
<p>Provides your own CLI implementation in a daemon.</p>