[Bug 974] Record Badlogins for all supported Authentication methods
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Mon Jan 24 17:46:15 EST 2005
http://bugzilla.mindrot.org/show_bug.cgi?id=974
------- Additional Comments From ashok_kovai at hotmail.com 2005-01-24 17:46 -------
Created an attachment (id=785)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=785&action=view)
Modified BTMP PATCH attached
> if(!authenticated && !authctxt->postponed && (!strcmp(method,
"gssapi-with-mic") || !strcmp(method, "publickey") || !strcmp(method,
"hostbased"))){
> debug("=== calling log_btmp uid %d ===\n", getuid());
>
PRIVSEP(log_btmp(authctxt->user,get_canonical_hostname(options.use_dns)));
> }
>
>
> if(!authenticated && !authctxt->postponed && (!strcmp(method,
"password") || !strcmp(method, " keyboard-interactive") ||
!strcmp(method,"challenge-response") ||
!strcmp(method,"keyboard-interactive/pam"))){
> if ( getuid() == 0) {
> debug("=== calling log_btmp uid %d ===\n", getuid());
> These two blocks can be merged. The logging is inconsistent with other debug
calls. The long list of strcmp looks fragile, > if we add more auth methods.
THese two bloacks were merged as given below.
if (!authenticated && !authctxt->postponed && strcmp(method, "none")) {
debug("Entering log_btmp uid %d ", getuid());
if((!strcmp(method, "gssapi-with-mic") || !strcmp(method, "publickey") ||
!strcmp(method, "hostbased")))
PRIVSEP(log_btmp(authctxt->user,get_canonical_hostname(options.use_dns)));
else if ( getuid()==0)
log_btmp(authctxt->user,get_canonical_hostname(options.use_dns));
}
>void
>log_btmp(const char *username, const char *hostname) {
These coding convention were corrected based on the source file style guide .
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the openssh-bugs
mailing list