Mercurial > dropbear
comparison cli-session.c @ 734:619b1ed837fd
Be a bit more careful about when we want to use CLI_AUTH_IMMEDIATE
Only use it if we have pubkeys to try, or we have $DROPBEAR_PASSWORD set
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 02 Apr 2013 00:11:53 +0800 |
parents | 70811267715c |
children | 077bbe1eb220 |
comparison
equal
deleted
inserted
replaced
733:70811267715c | 734:619b1ed837fd |
---|---|
219 cli_ses.state = USERAUTH_REQ_SENT; | 219 cli_ses.state = USERAUTH_REQ_SENT; |
220 TRACE(("leave cli_sessionloop: sent userauth methods req")) | 220 TRACE(("leave cli_sessionloop: sent userauth methods req")) |
221 return; | 221 return; |
222 | 222 |
223 case USERAUTH_FAIL_RCVD: | 223 case USERAUTH_FAIL_RCVD: |
224 cli_auth_try(); | 224 if (cli_auth_try() == DROPBEAR_FAILURE) { |
225 dropbear_exit("No auth methods could be used."); | |
226 } | |
225 cli_ses.state = USERAUTH_REQ_SENT; | 227 cli_ses.state = USERAUTH_REQ_SENT; |
226 TRACE(("leave cli_sessionloop: cli_auth_try")) | 228 TRACE(("leave cli_sessionloop: cli_auth_try")) |
227 return; | 229 return; |
228 | 230 |
229 case USERAUTH_SUCCESS_RCVD: | 231 case USERAUTH_SUCCESS_RCVD: |