diff options
author | Hans Nilsson <[email protected]> | 2015-11-06 10:33:16 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-11-06 10:33:16 +0100 |
commit | 6f760fcaf2608cc25684e17660a95e51f080c7af (patch) | |
tree | 0b866bdbbd0c5c81afd6c999404445cf55ffcb47 /lib/ssh/src/ssh.erl | |
parent | 98ce5c34a27b3fd95febba5c44d87bfdbd40a822 (diff) | |
parent | 6ce8f9278b937b607be4c925c2b711cb163519fc (diff) | |
download | otp-6f760fcaf2608cc25684e17660a95e51f080c7af.tar.gz otp-6f760fcaf2608cc25684e17660a95e51f080c7af.tar.bz2 otp-6f760fcaf2608cc25684e17660a95e51f080c7af.zip |
Merge branch 'maint'
* maint:
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
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), |