From a26194ece01f0bfc4c3da7e005fbfe392848480d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 7 Feb 2011 13:30:23 +0100 Subject: torture: Rename the static auth kbdint function. --- tests/torture.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/torture.c b/tests/torture.c index 1354752c..afbd3dce 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -35,7 +35,7 @@ static int verbosity = 0; -static int torture_auth_kbdint(ssh_session session, +static int _torture_auth_kbdint(ssh_session session, const char *password) { const char *prompt; char echo; @@ -177,16 +177,16 @@ ssh_session torture_ssh_session(const char *host, /* We are in testing mode, so consinder the hostkey as verified ;) */ if (password != NULL) { - int err = torture_auth_kbdint(session, password); - if (err == SSH_AUTH_ERROR) { - goto failed; - } + rc = _torture_auth_kbdint(session, password); } else { - int err = ssh_userauth_autopubkey(session, NULL); - if (err == SSH_AUTH_ERROR) { + rc = ssh_userauth_autopubkey(session, NULL); + if (rc == SSH_AUTH_ERROR) { goto failed; } } + if (rc != SSH_AUTH_SUCCESS) { + goto failed; + } return session; failed: -- cgit v1.2.3