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>) --- bsd-login.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bsd-login.c') diff --git a/bsd-login.c b/bsd-login.c index d81e46914..eccb29ee4 100644 --- a/bsd-login.c +++ b/bsd-login.c @@ -65,24 +65,24 @@ login(utp) struct utmp *utp; #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ { +#if defined(HAVE_HOST_IN_UTMP) struct utmp old_ut; +#endif #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) struct utmpx *old_utx; #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ register int fd; int tty; -#ifndef UT_LINESIZE -# define UT_LINESIZE (sizeof(old_ut.ut_line)) -# define UT_NAMESIZE (sizeof(old_ut.ut_name)) -# ifdef HAVE_HOST_IN_UTMP -# define UT_HOSTSIZE (sizeof(old_ut.ut_host)) -# endif -#endif - tty = ttyslot(); if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { + #if defined(HAVE_HOST_IN_UTMP) +# ifndef UT_LINESIZE +# define UT_LINESIZE (sizeof(old_ut.ut_line)) +# define UT_NAMESIZE (sizeof(old_ut.ut_name)) +# define UT_HOSTSIZE (sizeof(old_ut.ut_host)) +# endif (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); /* * Prevent luser from zero'ing out ut_host. -- cgit v1.2.3