aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_message.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-10-06 16:59:22 +0200
committerIngela Anderton Andin <[email protected]>2014-10-09 16:18:09 +0200
commitb6bbdb3a10e2e6aaa4d346dfe7c8917e52bd1c17 (patch)
tree58c1079882c355c746db37c5ed652b294576c67f /lib/ssh/src/ssh_message.erl
parentee24a87a779d8d10461cadd47b3eb276e70baef8 (diff)
downloadotp-b6bbdb3a10e2e6aaa4d346dfe7c8917e52bd1c17.tar.gz
otp-b6bbdb3a10e2e6aaa4d346dfe7c8917e52bd1c17.tar.bz2
otp-b6bbdb3a10e2e6aaa4d346dfe7c8917e52bd1c17.zip
ssh: Fix option user_interaction to work as expected
When password authentication is implemented with ssh keyboard-interactive method and the password is already supplied, so that we do not need to query the user, connections should succeed even though the user_interaction option is set to false.
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r--lib/ssh/src/ssh_message.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index 76b57cb995..891ccec24c 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -162,8 +162,15 @@ encode(#ssh_msg_userauth_info_request{
encode(#ssh_msg_userauth_info_response{
num_responses = Num,
data = Data}) ->
- ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num, Data],
- [byte, uint32, '...']);
+ Responses = lists:map(fun("") ->
+ <<>>;
+ (Response) ->
+ ssh_bits:encode([Response], [string])
+ end, Data),
+ Start = ssh_bits:encode([?SSH_MSG_USERAUTH_INFO_RESPONSE, Num],
+ [byte, uint32]),
+ iolist_to_binary([Start, Responses]);
+
encode(#ssh_msg_disconnect{
code = Code,
description = Desc,