summaryrefslogtreecommitdiffhomepage
path: root/svr-auth.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-08-23 23:43:12 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-08-23 23:43:12 +0800
commit52adbb34c32d3e2e1bcdb941e20a6f81138b8248 (patch)
tree9df84dc409fa0f2a6ed2d9a75d40f31f68a73bbe /svr-auth.c
parent90f04384eeb0a80b9f5ee19823702a612ba1653d (diff)
Wait to fail invalid usernames
Diffstat (limited to 'svr-auth.c')
-rw-r--r--svr-auth.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/svr-auth.c b/svr-auth.c
index c19c090..edde86b 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -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