From 64f9a0b64a032666db824f139967f7abd5ea7046 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 5 Apr 2018 12:41:50 +0200 Subject: ssh: Fix ssh_sftpd:handle_op not returning State --- lib/ssh/src/ssh_sftpd.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/ssh') diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl index 427edf01ab..a9136e5614 100644 --- a/lib/ssh/src/ssh_sftpd.erl +++ b/lib/ssh/src/ssh_sftpd.erl @@ -360,10 +360,12 @@ handle_op(?SSH_FXP_REMOVE, ReqId, <>, case IsDir of %% This version 6 we still have ver 5 true when Vsn > 5 -> ssh_xfer:xf_send_status(State0#state.xf, ReqId, - ?SSH_FX_FILE_IS_A_DIRECTORY, "File is a directory"); + ?SSH_FX_FILE_IS_A_DIRECTORY, "File is a directory"), + State0; true -> ssh_xfer:xf_send_status(State0#state.xf, ReqId, - ?SSH_FX_FAILURE, "File is a directory"); + ?SSH_FX_FAILURE, "File is a directory"), + State0; false -> {Status, FS1} = FileMod:delete(Path, FS0), State1 = State0#state{file_state = FS1}, -- cgit v1.2.3 From 94f3ce9d6a649dfab810105036f0ff0e73e3837c Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Sat, 14 Apr 2018 10:35:18 +0200 Subject: ssh: Fix server crashes for exit-normal signals --- lib/ssh/src/ssh_connection_handler.erl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib/ssh') diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index e11d3adee4..ad23d82ea8 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1379,8 +1379,21 @@ handle_event(info, {'DOWN', _Ref, process, ChannelPid, _Reason}, _, D0) -> {keep_state, D, Repls}; %%% So that terminate will be run when supervisor is shutdown -handle_event(info, {'EXIT', _Sup, Reason}, _, _) -> - {stop, {shutdown, Reason}}; +handle_event(info, {'EXIT', _Sup, Reason}, StateName, _) -> + Role = role(StateName), + if + Role == client -> + %% OTP-8111 tells this function clause fixes a problem in + %% clients, but there were no check for that role. + {stop, {shutdown, Reason}}; + + Reason == normal -> + %% An exit normal should not cause a server to crash. This has happend... + keep_state_and_data; + + true -> + {stop, {shutdown, Reason}} + end; handle_event(info, check_cache, _, D) -> {keep_state, cache_check_set_idle_timer(D)}; -- cgit v1.2.3 From 111fb0d3861a7d512756f2abf0832a694d915239 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 19 Apr 2018 16:23:31 +0200 Subject: Prepare release --- lib/ssh/doc/src/notes.xml | 23 +++++++++++++++++++++++ lib/ssh/vsn.mk | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'lib/ssh') diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml index db60b4ab6f..bac7001c5d 100644 --- a/lib/ssh/doc/src/notes.xml +++ b/lib/ssh/doc/src/notes.xml @@ -30,6 +30,29 @@ notes.xml +
Ssh 4.6.8 + +
Fixed Bugs and Malfunctions + + +

+ An ssh_sftp server (running version 6) could fail if it + is told to remove a file which in fact is a directory.

+

+ Own Id: OTP-15004

+
+ +

+ Fix rare spurios shutdowns of ssh servers when receiveing + {'EXIT',_,normal} messages.

+

+ Own Id: OTP-15018

+
+
+
+ +
+
Ssh 4.6.7
Fixed Bugs and Malfunctions diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk index d5eed0b087..f327d2ec11 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.7 +SSH_VSN = 4.6.8 APP_VSN = "ssh-$(SSH_VSN)" -- cgit v1.2.3