aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_auth.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-04-24 09:59:42 +0200
committerIngela Anderton Andin <[email protected]>2012-04-24 09:59:42 +0200
commit52312a8b93e8b250099e2f1b1b802e63e37971cc (patch)
tree0bb628bc467588aa1d4b971065822d8ea5dca574 /lib/ssh/src/ssh_auth.erl
parent732a553a0e651880b04c55e0767a651c37bf58cd (diff)
parent33fe8806939849c47b8ec5de91b8e8ef94a9f1df (diff)
downloadotp-52312a8b93e8b250099e2f1b1b802e63e37971cc.tar.gz
otp-52312a8b93e8b250099e2f1b1b802e63e37971cc.tar.bz2
otp-52312a8b93e8b250099e2f1b1b802e63e37971cc.zip
Merge remote branch 'upstream/maint'
* upstream/maint: Corrected ssh option handling
Diffstat (limited to 'lib/ssh/src/ssh_auth.erl')
-rw-r--r--lib/ssh/src/ssh_auth.erl16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 1a4517c689..aa452a8e09 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -71,7 +71,7 @@ password_msg([#ssh{opts = Opts, io_cb = IoCb,
ssh_bits:install_messages(userauth_passwd_messages()),
Password = case proplists:get_value(password, Opts) of
undefined ->
- user_interaction(Opts, IoCb);
+ user_interaction(IoCb);
PW ->
PW
end,
@@ -89,13 +89,10 @@ password_msg([#ssh{opts = Opts, io_cb = IoCb,
Ssh)
end.
-user_interaction(Opts, IoCb) ->
- case proplists:get_value(allow_user_interaction, Opts, true) of
- true ->
- IoCb:read_password("ssh password: ");
- false ->
- not_ok
- end.
+user_interaction(ssh_no_io) ->
+ not_ok;
+user_interaction(IoCb) ->
+ IoCb:read_password("ssh password: ").
%% See RFC 4256 for info on keyboard-interactive
@@ -124,8 +121,7 @@ init_userauth_request_msg(#ssh{opts = Opts} = Ssh) ->
FirstAlg = algorithm(proplists:get_value(public_key_alg, Opts,
?PREFERRED_PK_ALG)),
SecondAlg = other_alg(FirstAlg),
- AllowUserInt = proplists:get_value(allow_user_interaction, Opts,
- true),
+ AllowUserInt = proplists:get_value(user_interaction, Opts, true),
Prefs = method_preference(FirstAlg, SecondAlg, AllowUserInt),
ssh_transport:ssh_packet(Msg, Ssh#ssh{user = User,
userauth_preference = Prefs,