mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
torture: Fix torture_ssh_session() for cwrap testing
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -462,11 +462,6 @@ ssh_session torture_ssh_session(const char *host,
|
|||||||
return NULL;
|
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) {
|
if (ssh_options_set(session, SSH_OPTIONS_HOST, host) < 0) {
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
@@ -504,10 +499,10 @@ ssh_session torture_ssh_session(const char *host,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (password != NULL) {
|
if (password != NULL) {
|
||||||
if (method & SSH_AUTH_METHOD_INTERACTIVE) {
|
if (method & SSH_AUTH_METHOD_PASSWORD) {
|
||||||
rc = _torture_auth_kbdint(session, password);
|
|
||||||
} else if (method & SSH_AUTH_METHOD_PASSWORD) {
|
|
||||||
rc = ssh_userauth_password(session, NULL, password);
|
rc = ssh_userauth_password(session, NULL, password);
|
||||||
|
} else if (method & SSH_AUTH_METHOD_INTERACTIVE) {
|
||||||
|
rc = _torture_auth_kbdint(session, password);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rc = ssh_userauth_publickey_auto(session, NULL, NULL);
|
rc = ssh_userauth_publickey_auto(session, NULL, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user