diff options
author | Ingela Anderton Andin <[email protected]> | 2012-02-28 10:29:24 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-02-28 10:29:24 +0100 |
commit | bc50e697fbf392c99842d823eb67a564e1759376 (patch) | |
tree | ccf3969614c01cf2b2c24f2942529ccb570bf096 /lib/ssh/test/ssh_sftpd_SUITE.erl | |
parent | d9ee75fa3df8676deb92136c38b65e928cde196e (diff) | |
parent | 1aeb8f4234b52705f9a933abf8dcd1afb2296b9d (diff) | |
download | otp-bc50e697fbf392c99842d823eb67a564e1759376.tar.gz otp-bc50e697fbf392c99842d823eb67a564e1759376.tar.bz2 otp-bc50e697fbf392c99842d823eb67a564e1759376.zip |
Merge branch 'ia/ssh/error-handling' into maint
* ia/ssh/error-handling:
Prevent client hanging. (OTP-8111)
Added checks of API input
Improve check so that we will not try to read ssh packet length indicator if not sure we have enough data.
Improved error handling
Diffstat (limited to 'lib/ssh/test/ssh_sftpd_SUITE.erl')
-rw-r--r-- | lib/ssh/test/ssh_sftpd_SUITE.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl index 6e4480ee9d..de946d4c4c 100644 --- a/lib/ssh/test/ssh_sftpd_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_SUITE.erl @@ -30,7 +30,6 @@ -include_lib("kernel/include/file.hrl"). --define(SFPD_PORT, 9999). -define(USER, "Alladin"). -define(PASSWD, "Sesame"). -define(XFER_PACKET_SIZE, 32768). @@ -102,13 +101,15 @@ init_per_testcase(TestCase, Config) -> ClientUserDir = filename:join(PrivDir, nopubkey), SystemDir = filename:join(?config(priv_dir, Config), system), + Port = ssh_test_lib:inet_port(node()), + {ok, Sftpd} = - ssh_sftpd:listen(?SFPD_PORT, [{system_dir, SystemDir}, + ssh_sftpd:listen(Port, [{system_dir, SystemDir}, {user_dir, PrivDir}, {user_passwords,[{?USER, ?PASSWD}]}, {pwdfun, fun(_,_) -> true end}]), - Cm = ssh_test_lib:connect(?SFPD_PORT, + Cm = ssh_test_lib:connect(Port, [{user_dir, ClientUserDir}, {user, ?USER}, {password, ?PASSWD}, {user_interaction, false}, |