diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-26 10:21:48 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-26 10:21:48 +1100 |
commit | 32b3cf2c96fd8cee6cb082821a43d3375c850d58 (patch) | |
tree | 103872b5f4423e17000a6221fd07fd6234924a26 /bsd-login.c | |
parent | 2e1b082dfbc5dcdae80957a3d889abe9fa480d77 (diff) |
- Enabled utmpx support by default for Solaris
- Cleanup sshd.c PAM a little more
19991225
- Merged fixes from Ben Taylor <bent@clark.net>
- 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>)
Diffstat (limited to 'bsd-login.c')
-rw-r--r-- | bsd-login.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bsd-login.c b/bsd-login.c index d81e4691..eccb29ee 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. |