diff options
| author | Andreas Schneider <mail@cynapses.org> | 2010-05-21 10:21:03 +0200 |
|---|---|---|
| committer | Andreas Schneider <mail@cynapses.org> | 2010-05-21 10:21:03 +0200 |
| commit | 5b2e39cd79b6c344f962fc0d123a0944f5a62f8e (patch) | |
| tree | 2bc53c51ec9c8b29f97959c6f8c20014b1252807 /libssh/auth.c | |
| parent | 13af149ef9fd87a586b78023c23851c70b6031c6 (diff) | |
options: Make sure that we have always have default options set.
Diffstat (limited to 'libssh/auth.c')
| -rw-r--r-- | libssh/auth.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index 0098a401..b4755f47 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -225,7 +225,7 @@ int ssh_userauth_none(ssh_session session, const char *username) { if (username == NULL) { if (session->username == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return rc; } @@ -331,7 +331,7 @@ int ssh_userauth_offer_pubkey(ssh_session session, const char *username, if (username == NULL) { if (session->username == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return rc; } @@ -443,7 +443,7 @@ int ssh_userauth_pubkey(ssh_session session, const char *username, if (username == NULL) { if (session->username == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return rc; } @@ -561,7 +561,7 @@ int ssh_userauth_agent_pubkey(ssh_session session, const char *username, if (username == NULL) { if (session->username == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return rc; } @@ -688,7 +688,7 @@ int ssh_userauth_password(ssh_session session, const char *username, if (username == NULL) { if (session->username == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return rc; } @@ -777,7 +777,6 @@ error: * * @see ssh_userauth_kbdint() * @see ssh_userauth_password() - * @see ssh_options_set() */ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) { struct ssh_iterator *it; @@ -1336,7 +1335,7 @@ int ssh_userauth_kbdint(ssh_session session, const char *user, /* first time we call. we must ask for a challenge */ if (user == NULL) { if ((user = session->username) == NULL) { - if (ssh_options_set(session, SSH_OPTIONS_USER, NULL) < 0) { + if (ssh_options_apply(session) < 0) { leave_function(); return SSH_AUTH_ERROR; } else { |
