diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-09-22 13:22:21 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-09-22 13:32:06 +0200 |
commit | 8b21b51a78e07a9fb0c2ea90292c5b166e44269c (patch) | |
tree | a70c1e32dc5a41f7708400f074bde5b9a8b69878 | |
parent | 2003a81b444e258c17b212370bf376d880ce7c4d (diff) | |
download | libssh-8b21b51a78e07a9fb0c2ea90292c5b166e44269c.tar.gz libssh-8b21b51a78e07a9fb0c2ea90292c5b166e44269c.tar.xz libssh-8b21b51a78e07a9fb0c2ea90292c5b166e44269c.zip |
Use new ssh options interface in auth functions.
-rw-r--r-- | libssh/auth.c | 14 | ||||
-rw-r--r-- | libssh/auth1.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index 1aa2b8c9..b5276f17 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -218,7 +218,7 @@ int ssh_userauth_none(SSH_SESSION *session, const char *username) { if (username == NULL) { if (session->options->username == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return rc; } @@ -324,7 +324,7 @@ int ssh_userauth_offer_pubkey(SSH_SESSION *session, const char *username, if (username == NULL) { if (session->options->username == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return rc; } @@ -436,7 +436,7 @@ int ssh_userauth_pubkey(SSH_SESSION *session, const char *username, if (username == NULL) { if (session->options->username == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return rc; } @@ -554,7 +554,7 @@ int ssh_userauth_agent_pubkey(SSH_SESSION *session, const char *username, if (username == NULL) { if (session->options->username == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return rc; } @@ -681,7 +681,7 @@ int ssh_userauth_password(SSH_SESSION *session, const char *username, if (username == NULL) { if (session->options->username == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return rc; } @@ -806,7 +806,7 @@ static struct ssh_keys_struct keytab[] = { * * @see ssh_userauth_kbdint() * @see ssh_userauth_password() - * @see ssh_options_set_identity() + * @see ssh_options_set() */ int ssh_userauth_autopubkey(SSH_SESSION *session, const char *passphrase) { struct ssh_public_key_struct *publickey; @@ -1354,7 +1354,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->options->username) == NULL) { - if (ssh_options_default_username(session->options) < 0) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { leave_function(); return SSH_AUTH_ERROR; } else { diff --git a/libssh/auth1.c b/libssh/auth1.c index b940399f..a1e599cf 100644 --- a/libssh/auth1.c +++ b/libssh/auth1.c @@ -60,7 +60,7 @@ static int send_username(SSH_SESSION *session, const char *username) { if (!username) { if(!(username = session->options->username)) { - if(ssh_options_default_username(session->options)) { + if (ssh_options_set(session->options, SSH_OPTIONS_USER, NULL) < 0) { return session->auth_service_asked = SSH_AUTH_ERROR; } else { username = session->options->username; |