aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-09-10 15:06:50 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-10-05 12:09:45 +0200
commitbade29d3d520849f1ba7522e0a86c8c62346494e (patch)
tree03c4262be1730f6b61d7a4f07b70fb5bd6ed3a15
parent399ff6bbde6c17257f0fb42a4c30d4f771f8bf11 (diff)
downloadlibssh-bade29d3d520849f1ba7522e0a86c8c62346494e.tar.gz
libssh-bade29d3d520849f1ba7522e0a86c8c62346494e.tar.xz
libssh-bade29d3d520849f1ba7522e0a86c8c62346494e.zip
torture: Fix torture_ssh_session() for cwrap testing
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry-picked from commit 66f51df9)
-rw-r--r--tests/torture.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 14402b0c..3d527102 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -414,11 +414,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;
}
@@ -456,10 +451,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);