From 66f51df9df6c8008b2c51ffb69f4aa9a726a84f8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 10 Sep 2015 15:06:50 +0200 Subject: [PATCH] torture: Fix torture_ssh_session() for cwrap testing Signed-off-by: Andreas Schneider --- tests/torture.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/torture.c b/tests/torture.c index deaa9a7f..600f1eeb 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -462,11 +462,6 @@ ssh_session torture_ssh_session(const char *host, return NULL; } - rc = ssh_options_set(session, SSH_OPTIONS_SSH_DIR, "/tmp"); - if (rc < 0) { - goto failed; - } - if (ssh_options_set(session, SSH_OPTIONS_HOST, host) < 0) { goto failed; } @@ -504,10 +499,10 @@ ssh_session torture_ssh_session(const char *host, } if (password != NULL) { - if (method & SSH_AUTH_METHOD_INTERACTIVE) { - rc = _torture_auth_kbdint(session, password); - } else if (method & SSH_AUTH_METHOD_PASSWORD) { + if (method & SSH_AUTH_METHOD_PASSWORD) { rc = ssh_userauth_password(session, NULL, password); + } else if (method & SSH_AUTH_METHOD_INTERACTIVE) { + rc = _torture_auth_kbdint(session, password); } } else { rc = ssh_userauth_publickey_auto(session, NULL, NULL);