diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-07-29 02:19:03 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-07-29 02:19:03 +0000 |
commit | e1491b8ec67e0e24b93a7b2997172d57b23a933c (patch) | |
tree | f901dadee3bea69edcb4b019ffcc6a883e078d33 /svr-auth.c | |
parent | 2d82f73484e588e9367657a25331afd4aa0bf976 (diff) |
set the isserver flag (oops)
fix password auth for the server
--HG--
extra : convert_revision : 234eb604aabaef9ed0dd496ff8db8ecc212ca18c
Diffstat (limited to 'svr-auth.c')
-rw-r--r-- | svr-auth.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -58,7 +58,7 @@ static void authclear() { ses.authstate.authtypes |= AUTH_TYPE_PUBKEY; #endif #ifdef DROPBEAR_PASSWORD_AUTH - if (svr_opts.noauthpass) { + if (!svr_opts.noauthpass) { ses.authstate.authtypes |= AUTH_TYPE_PASSWORD; } #endif @@ -100,6 +100,7 @@ void recv_msg_userauth_request() { /* ignore packets if auth is already done */ if (ses.authstate.authdone == 1) { + TRACE(("leave recv_msg_userauth_request: authdone already")); return; } @@ -129,6 +130,7 @@ void recv_msg_userauth_request() { if (methodlen == AUTH_METHOD_NONE_LEN && strncmp(methodname, AUTH_METHOD_NONE, AUTH_METHOD_NONE_LEN) == 0) { + TRACE(("recv_msg_userauth_request: 'none' request")); send_msg_userauth_failure(0, 0); goto out; } @@ -305,6 +307,9 @@ void send_msg_userauth_failure(int partial, int incrfail) { buf_putbyte(ses.writepayload, partial ? 1 : 0); encrypt_packet(); + TRACE(("auth fail: methods %d, '%s'", ses.authstate.authtypes, + buf_getptr(typebuf, typebuf->len))); + if (incrfail) { usleep(300000); /* XXX improve this */ ses.authstate.failcount++; |