Created attachment 785 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 .
Created attachment 785
Modified BTMP PATCH attached
> if(!authenticated && !authctxt- >postponed && (!strcmp(method, log_btmp( authctxt- >user,get_ canonical_ hostname( options. use_dns) )); >postponed && (!strcmp(method, interactive" ) || method, "challenge- response" ) || method, "keyboard- interactive/ pam"))) {
"gssapi-with-mic") || !strcmp(method, "publickey") || !strcmp(method,
"hostbased"))){
> debug("=== calling log_btmp uid %d ===\n", getuid());
>
PRIVSEP(
> }
>
>
> if(!authenticated && !authctxt-
"password") || !strcmp(method, " keyboard-
!strcmp(
!strcmp(
> 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")) { "Entering log_btmp uid %d ", getuid()); (!strcmp( method, "gssapi-with-mic") || !strcmp(method, "publickey") ||
debug(
if(
!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 .