diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-08-23 23:43:12 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-08-23 23:43:12 +0800 |
commit | 52adbb34c32d3e2e1bcdb941e20a6f81138b8248 (patch) | |
tree | 9df84dc409fa0f2a6ed2d9a75d40f31f68a73bbe /svr-auth.c | |
parent | 90f04384eeb0a80b9f5ee19823702a612ba1653d (diff) |
Wait to fail invalid usernames
Diffstat (limited to 'svr-auth.c')
-rw-r--r-- | svr-auth.c | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -149,10 +149,8 @@ void recv_msg_userauth_request() { if (methodlen == AUTH_METHOD_PASSWORD_LEN && strncmp(methodname, AUTH_METHOD_PASSWORD, AUTH_METHOD_PASSWORD_LEN) == 0) { - if (valid_user) { - svr_auth_password(); - goto out; - } + svr_auth_password(valid_user); + goto out; } } #endif @@ -164,10 +162,8 @@ void recv_msg_userauth_request() { if (methodlen == AUTH_METHOD_PASSWORD_LEN && strncmp(methodname, AUTH_METHOD_PASSWORD, AUTH_METHOD_PASSWORD_LEN) == 0) { - if (valid_user) { - svr_auth_pam(); - goto out; - } + svr_auth_pam(valid_user); + goto out; } } #endif @@ -177,12 +173,7 @@ void recv_msg_userauth_request() { if (methodlen == AUTH_METHOD_PUBKEY_LEN && strncmp(methodname, AUTH_METHOD_PUBKEY, AUTH_METHOD_PUBKEY_LEN) == 0) { - if (valid_user) { - svr_auth_pubkey(); - } else { - /* pubkey has no failure delay */ - send_msg_userauth_failure(0, 0); - } + svr_auth_pubkey(valid_user); goto out; } #endif |