aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-04-06 12:24:07 +0200
committerHans Nilsson <[email protected]>2018-04-06 12:24:07 +0200
commit83c66153ba03fabbe175efa3fdb400010c2dad98 (patch)
tree1aad2a918449a895a9cfcbeb783710999fb534a7 /lib/ssh
parent8e0a8ebe0a94cf7d313f9ab91674373a2b5ec8a2 (diff)
parent61bc7c7d1ac9ff621b3125d79ae4a9a3dd6b1622 (diff)
downloadotp-83c66153ba03fabbe175efa3fdb400010c2dad98.tar.gz
otp-83c66153ba03fabbe175efa3fdb400010c2dad98.tar.bz2
otp-83c66153ba03fabbe175efa3fdb400010c2dad98.zip
Merge branch 'maint'
* maint: Updated OTP version Prepare release ssh: Fix ssh_sftpd:handle_op not returning State
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/doc/src/notes.xml14
-rw-r--r--lib/ssh/src/ssh_sftpd.erl6
2 files changed, 18 insertions, 2 deletions
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index db60b4ab6f..1bba667f0f 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -468,6 +468,20 @@
</section>
+<section><title>Ssh 4.4.2.3</title>
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ An ssh_sftp server (running version 6) could fail if it
+ is told to remove a file which in fact is a directory.</p>
+ <p>
+ Own Id: OTP-15004</p>
+ </item>
+ </list>
+ </section>
+</section>
+
<section><title>Ssh 4.4.2.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 26cf2cb665..945e9f457b 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -362,10 +362,12 @@ handle_op(?SSH_FXP_REMOVE, ReqId, <<?UINT32(PLen), BPath:PLen/binary>>,
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},