[FFmpeg-cvslog] lavf/libssh: call ssh_userauth_none before ssh_userauth_list
Lukasz Marek
git at videolan.org
Fri Jul 4 20:50:37 CEST 2014
ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Fri Jul 4 19:50:13 2014 +0200| [b7adc5b5a60cdba6b2ffecad6c8b986414fd63a6] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7adc5b5a60cdba6b2ffecad6c8b986414fd63a6
---
libavformat/libssh.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/libssh.c b/libavformat/libssh.c
index b20e93b..87a2a7f 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) {
More information about the ffmpeg-cvslog
mailing list