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.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.erl')
-rw-r--r-- | lib/ssh/src/ssh.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl index 39cf441090..5bde184070 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -338,6 +338,8 @@ handle_option([{pwdfun, _} = Opt | Rest], SocketOptions, SshOptions) -> handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]); handle_option([{key_cb, _} = Opt | Rest], SocketOptions, SshOptions) -> handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]); +handle_option([{keyboard_interact_fun, _} = Opt | Rest], SocketOptions, SshOptions) -> + handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]); %%Backwards compatibility handle_option([{allow_user_interaction, Value} | Rest], SocketOptions, SshOptions) -> handle_option(Rest, SocketOptions, [handle_ssh_option({user_interaction, Value}) | SshOptions]); @@ -503,10 +505,14 @@ handle_ssh_option({password, Value} = Opt) when is_list(Value) -> Opt; handle_ssh_option({user_passwords, Value} = Opt) when is_list(Value)-> Opt; -handle_ssh_option({pwdfun, Value} = Opt) when is_function(Value) -> +handle_ssh_option({pwdfun, Value} = Opt) when is_function(Value,2) -> + Opt; +handle_ssh_option({pwdfun, Value} = Opt) when is_function(Value,4) -> Opt; handle_ssh_option({key_cb, Value} = Opt) when is_atom(Value) -> Opt; +handle_ssh_option({keyboard_interact_fun, Value} = Opt) when is_function(Value,3) -> + Opt; handle_ssh_option({compression, Value} = Opt) when is_atom(Value) -> Opt; handle_ssh_option({exec, {Module, Function, _}} = Opt) when is_atom(Module), |