[PATCH re-send]: Clean up logging of failed logins

Ben Lindstrom mouring at etoh.eviladmin.org
Mon Apr 28 04:33:11 EST 2003


sorry, Darren.  Long over due comments.


[..]
>+/* Record a failed login attempt. */
>+void
>+record_failed_login(const char *user, const char *host, const char *ttyname)
>+{
>+#ifdef WITH_AIXAUTHENTICATE
>+       loginfailed(user, host, ttyname);
>+#endif
>+#ifdef _UNICOS
>+       cray_login_failure((char *)user, IA_UDBERR);
>+#endif /* _UNICOS */
>+}

I like the patch idea, but I'd like to skip the whole 'chained function
calls'.  Plus it avoids closely packed #ifdef/#endifs.

Just rename cray_login_failure() and loginfailed() to
record_failed_login(), and change the #ifdef WITH_AIXAUTHENTICATE to
#ifdef CUSTOM_LOGIN_FAILURE.

That way we can just #define CUSTOM_LOGIN_FAILURE in the aix/cray headers
to activate it and we can keep things cleaner.

- Ben




More information about the openssh-unix-dev mailing list