diff options
author | Hans Nilsson <[email protected]> | 2015-11-06 10:32:28 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-11-06 10:32:28 +0100 |
commit | 6ce8f9278b937b607be4c925c2b711cb163519fc (patch) | |
tree | 95daca7ec3aebaea3d46ba59025be24e8b7c4971 /lib/ssh/src/ssh_connection_handler.erl | |
parent | a3bc0687a34623824bf980c9ed19eb204dcccf66 (diff) | |
parent | 19f3eafbb237af7b6a9d81ebbddae19c41418f8b (diff) | |
download | otp-6ce8f9278b937b607be4c925c2b711cb163519fc.tar.gz otp-6ce8f9278b937b607be4c925c2b711cb163519fc.tar.bz2 otp-6ce8f9278b937b607be4c925c2b711cb163519fc.zip |
Merge branch 'hans/ssh/pwdfun/OTP-13055' into maint
* hans/ssh/pwdfun/OTP-13055:
ssh: changes after doc review
ssh: Document pwdfun
ssh: make corrections of keyboard-interactive client
ssh: enable users to give option keyboard_interact_fun
ssh: pwdfun/4 and simple tests
Conflicts:
lib/ssh/doc/src/ssh.xml
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 7fb86c1108..a2d1b5b810 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -627,14 +627,24 @@ userauth_keyboard_interactive(#ssh_msg_userauth_info_response{} = Msg, retry_fun(User, Address, Reason, Opts), send_msg(Reply, State), {next_state, userauth, next_packet(State#state{ssh_params = Ssh})} - end. - + end; +userauth_keyboard_interactive(Msg = #ssh_msg_userauth_failure{}, + #state{ssh_params = Ssh0 = + #ssh{role = client, + userauth_preference = Prefs0}} + = State) -> + Prefs = [{Method,M,F,A} || {Method,M,F,A} <- Prefs0, + Method =/= "keyboard-interactive"], + userauth(Msg, State#state{ssh_params = Ssh0#ssh{userauth_preference=Prefs}}). + -userauth_keyboard_interactive_info_response(Msg=#ssh_msg_userauth_failure{}, State) -> +userauth_keyboard_interactive_info_response(Msg=#ssh_msg_userauth_failure{}, + #state{ssh_params = #ssh{role = client}} = State) -> userauth(Msg, State); -userauth_keyboard_interactive_info_response(Msg=#ssh_msg_userauth_success{}, State) -> +userauth_keyboard_interactive_info_response(Msg=#ssh_msg_userauth_success{}, + #state{ssh_params = #ssh{role = client}} = State) -> userauth(Msg, State). %%-------------------------------------------------------------------- |