From fef7ad89ab1802114f9c69709a1227fac92aa6a0 Mon Sep 17 00:00:00 2001
From: Hans Nilsson
Date: Wed, 20 Jun 2018 12:46:26 +0200
Subject: ssh: Fix ssh_xfer decode_ATTR error for Vsn=4
---
lib/ssh/src/ssh_xfer.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib/ssh')
diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl
index e1680c120e..7bb9c2d101 100644
--- a/lib/ssh/src/ssh_xfer.erl
+++ b/lib/ssh/src/ssh_xfer.erl
@@ -734,7 +734,7 @@ decode_ATTR(Vsn, <>) ->
{Type,Tail2} =
if Vsn =< 3 ->
{?SSH_FILEXFER_TYPE_UNKNOWN, Tail};
- Vsn >= 5 ->
+ true ->
<> = Tail,
{T, TL}
end,
--
cgit v1.2.3
From 182c7b954620e9287ba2ddce9b1cbaceb1bddbaf Mon Sep 17 00:00:00 2001
From: Hans Nilsson
Date: Thu, 21 Jun 2018 10:38:51 +0200
Subject: ssh: Bug fix sftp error codes
Report the signal name if the signal error message is ""
Do not report a return code of 0 as an error.
---
lib/ssh/doc/src/ssh_sftp.xml | 8 ++++++--
lib/ssh/src/ssh_sftp.erl | 13 +++++++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
(limited to 'lib/ssh')
diff --git a/lib/ssh/doc/src/ssh_sftp.xml b/lib/ssh/doc/src/ssh_sftp.xml
index 129426a6d5..f367560b5f 100644
--- a/lib/ssh/doc/src/ssh_sftp.xml
+++ b/lib/ssh/doc/src/ssh_sftp.xml
@@ -46,9 +46,9 @@
reason()
-
-
= atom() A description of the reason why an operation failed.
+ = atom() | string() | tuple() A description of the reason why an operation failed.
- The value is formed from the sftp error codes in the protocol-level responses as defined in
+ The atom() value is formed from the sftp error codes in the protocol-level responses as defined in
draft-ietf-secsh-filexfer-13.txt
section 9.1.
@@ -57,6 +57,10 @@
E.g. the error code SSH_FX_NO_SUCH_FILE
will cause the reason() to be no_such_file.
+ The string() reason is the error information from the server in case of an exit-signal. If that information is empty, the reason is the exit signal name.
+
+ The tuple() reason are other errors like the {exit_status,integer()} if the exit status is not 0.
+
ssh_connection_ref() =
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index 9e1229dc85..79586141b2 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -801,13 +801,22 @@ handle_ssh_msg({ssh_cm, _, {signal, _, _}}, State) ->
%% Ignore signals according to RFC 4254 section 6.9.
{ok, State};
-handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, _, Error, _}},
+handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, Signal, Error0, _}},
State0) ->
+ Error =
+ case Error0 of
+ "" -> Signal;
+ _ -> Error0
+ end,
State = reply_all(State0, {error, Error}),
{stop, ChannelId, State};
handle_ssh_msg({ssh_cm, _, {exit_status, ChannelId, Status}}, State0) ->
- State = reply_all(State0, {error, {exit_status, Status}}),
+ State =
+ case State0 of
+ 0 -> State0;
+ _ -> reply_all(State0, {error, {exit_status, Status}})
+ end,
{stop, ChannelId, State}.
%%--------------------------------------------------------------------
--
cgit v1.2.3
From f8cbae5c79f988de4110e4827420ad073a1c7fcb Mon Sep 17 00:00:00 2001
From: Hans Nilsson
Date: Thu, 21 Jun 2018 10:39:27 +0200
Subject: ssh: Report the signal name if there is an exit-signal to sftpd
---
lib/ssh/src/ssh_sftpd.erl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'lib/ssh')
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index a9136e5614..9e172fdb9c 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -137,9 +137,9 @@ handle_ssh_msg({ssh_cm, _, {signal, _, _}}, State) ->
%% Ignore signals according to RFC 4254 section 6.9.
{ok, State};
-handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, _, Error, _}}, State) ->
- Report = io_lib:format("Connection closed by peer ~n Error ~p~n",
- [Error]),
+handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, Signal, Error, _}}, State) ->
+ Report = io_lib:format("Connection closed by peer signal ~p~n Error ~p~n",
+ [Signal,Error]),
error_logger:error_report(Report),
{stop, ChannelId, State};
--
cgit v1.2.3
From 60c76a2cae65a7d138825adc192e4a20a85e8a73 Mon Sep 17 00:00:00 2001
From: Erlang/OTP
Date: Thu, 21 Jun 2018 17:33:18 +0200
Subject: Prepare release
---
lib/ssh/doc/src/notes.xml | 29 +++++++++++++++++++++++++++++
lib/ssh/vsn.mk | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
(limited to 'lib/ssh')
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index ce01a04112..12470df7b9 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -30,6 +30,35 @@
notes.xml
+Ssh 4.6.9.1
+
+ Fixed Bugs and Malfunctions
+
+ -
+
+ SFTP clients reported the error reason "" if a
+ non-OTP sftp server was killed during a long file
+ transmission.
+
+ Now the signal name (for example "KILL") will be
+ the error reason if the server's reason is empty.
+
+ The documentation also lacked type information about this
+ class of errors.
+
+ Own Id: OTP-15148 Aux Id: ERIERL-194
+
+ -
+
+ Fix ssh_sftp decode error for sftp protocol version 4
+
+ Own Id: OTP-15149 Aux Id: ERIERL-199
+
+
+
+
+
+
Ssh 4.6.9
Fixed Bugs and Malfunctions
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 538490ef96..5787238669 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,4 +1,4 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 4.6.9
+SSH_VSN = 4.6.9.1
APP_VSN = "ssh-$(SSH_VSN)"
--
cgit v1.2.3