diff options
author | Ingela Anderton Andin <[email protected]> | 2012-04-24 09:59:05 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2012-04-24 09:59:05 +0200 |
commit | 33fe8806939849c47b8ec5de91b8e8ef94a9f1df (patch) | |
tree | 125aac3883e3947c7914f42f1e2f2c3513c13650 /lib/ssh/src/ssh_auth.erl | |
parent | e3c9c6a9f006bdef159781e1823c248c731419e5 (diff) | |
parent | b85e884f14e1dce52af7157045625f1ef5441ed1 (diff) | |
download | otp-33fe8806939849c47b8ec5de91b8e8ef94a9f1df.tar.gz otp-33fe8806939849c47b8ec5de91b8e8ef94a9f1df.tar.bz2 otp-33fe8806939849c47b8ec5de91b8e8ef94a9f1df.zip |
Merge branch 'ia/ssh/options-check-OTP-10061' into maint
* ia/ssh/options-check-OTP-10061:
Corrected ssh option handling
Diffstat (limited to 'lib/ssh/src/ssh_auth.erl')
-rw-r--r-- | lib/ssh/src/ssh_auth.erl | 16 |
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, |