diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-02-02 23:30:24 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-02-02 23:30:24 +1100 |
commit | 2fba993080eba14e339d6a6666ee79580ee20f97 (patch) | |
tree | 0b7bc9ce53758047f3a844b0f9d5679ace5e94eb /auth.c | |
parent | 9dc6c7dbec0716157e561036c480bca1bc3c7e47 (diff) |
- (dtucker) [auth.c canohost.c canohost.h configure.ac defines.h loginrec.c]
Bug #974: Teach sshd to write failed login records to btmp for failed auth
attempts (currently only for password, kbdint and C/R, only on Linux and
HP-UX), based on code from login.c from util-linux. With ashok_kovai at
hotmail.com, ok djm@
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -244,7 +244,10 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) info); #ifdef CUSTOM_FAILED_LOGIN - if (authenticated == 0 && strcmp(method, "password") == 0) + if (authenticated == 0 && !authctxt->postponed && + (strcmp(method, "password") == 0 || + strncmp(method, "keyboard-interactive", 20) == 0) || + strcmp(method, "challenge-response") == 0) record_failed_login(authctxt->user, get_canonical_hostname(options.use_dns), "ssh"); #endif |