mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
Try password before interactive - bit of a hack
This commit is contained in:
parent
90cf7f012c
commit
5af0d33164
20
cli-auth.c
20
cli-auth.c
@ -257,6 +257,16 @@ void cli_auth_try() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLI_PASSWORD_AUTH
|
||||||
|
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||||
|
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
|
||||||
|
} else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
|
||||||
|
cli_auth_password();
|
||||||
|
finished = 1;
|
||||||
|
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_CLI_INTERACT_AUTH
|
#ifdef ENABLE_CLI_INTERACT_AUTH
|
||||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||||
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
|
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
|
||||||
@ -271,16 +281,6 @@ void cli_auth_try() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_CLI_PASSWORD_AUTH
|
|
||||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
|
||||||
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
|
|
||||||
} else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
|
|
||||||
cli_auth_password();
|
|
||||||
finished = 1;
|
|
||||||
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TRACE(("cli_auth_try lastauthtype %d", cli_ses.lastauthtype))
|
TRACE(("cli_auth_try lastauthtype %d", cli_ses.lastauthtype))
|
||||||
|
|
||||||
if (!finished) {
|
if (!finished) {
|
||||||
|
Loading…
Reference in New Issue
Block a user