From 32b3cf2c96fd8cee6cb082821a43d3375c850d58 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Dec 1999 10:21:48 +1100 Subject: 19991226 - Enabled utmpx support by default for Solaris - Cleanup sshd.c PAM a little more 19991225 - Merged fixes from Ben Taylor - Fixed configure support for PAM. Reported by Naz <96na@eng.cam.ac.uk> - Disabled logging of PAM password authentication failures when password is empty. (e.g start of authentication loop). Reported by Naz <96na@eng.cam.ac.uk>) --- login.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'login.c') diff --git a/login.c b/login.c index c551da898..f4e6ddfaf 100644 --- a/login.c +++ b/login.c @@ -18,7 +18,7 @@ */ #include "includes.h" -RCSID("$Id: login.c,v 1.11 1999/12/24 23:11:29 damien Exp $"); +RCSID("$Id: login.c,v 1.12 1999/12/25 23:21:48 damien Exp $"); #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) # include @@ -155,18 +155,19 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, strncpy(utx.ut_line, ttyname + 5, sizeof(utx.ut_line)); utx.ut_pid = (pid_t)pid; utx.ut_tv.tv_sec = time(NULL); - u.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS; -#ifdef HAVE_HOST_IN_UTMPX -#ifdef HAVE_SYSLEN_IN_UTMPX + utx.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS; +# ifdef HAVE_HOST_IN_UTMPX +# ifdef HAVE_SYSLEN_IN_UTMPX utx.ut_syslen = strlen(host); - strncpy(utx.ut_host, host, utx.ut_syslen ); -#else + strncpy(utx.ut_host, host, utx.ut_syslen); +# else strncpy(utx.ut_host, host, sizeof(utx.ut_host)); -#endif /* HAVE_SYSLEN_IN_UTMPX */ -#endif +# endif /* HAVE_SYSLEN_IN_UTMPX */ +# endif #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ -#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN) +/*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/ +#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) login(&u, &utx); #else /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ login(&u); -- cgit v1.2.3