aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-07-04 19:50:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-04 20:30:48 +0200
commitb7adc5b5a60cdba6b2ffecad6c8b986414fd63a6 (patch)
tree82d0cd79bd469cffcbd77a40cc18a92673921e8c /libavformat
parent2d15554850799346472683b4a2df05878dcfad48 (diff)
downloadffmpeg-b7adc5b5a60cdba6b2ffecad6c8b986414fd63a6.tar.gz
lavf/libssh: call ssh_userauth_none before ssh_userauth_list
According to doc, ssh_userauth_none must be called before ssh_userauth_list. It solves login issue for new versions of libssh. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/libssh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/libssh.c b/libavformat/libssh.c
index b20e93bbab..87a2a7f9df 100644
--- a/libavformat/libssh.c
+++ b/libavformat/libssh.c
@@ -71,6 +71,9 @@ static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user
if (user)
ssh_options_set(libssh->session, SSH_OPTIONS_USER, user);
+ if (ssh_userauth_none(libssh->session, NULL) == SSH_AUTH_SUCCESS)
+ return 0;
+
auth_methods = ssh_userauth_list(libssh->session, NULL);
if (auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {