summaryrefslogtreecommitdiff
path: root/bsd-login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-26 10:21:48 +1100
committerDamien Miller <djm@mindrot.org>1999-12-26 10:21:48 +1100
commit32b3cf2c96fd8cee6cb082821a43d3375c850d58 (patch)
tree103872b5f4423e17000a6221fd07fd6234924a26 /bsd-login.c
parent2e1b082dfbc5dcdae80957a3d889abe9fa480d77 (diff)
19991226
- 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.c16
1 files changed, 8 insertions, 8 deletions
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)
65 struct utmp *utp; 65 struct utmp *utp;
66#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ 66#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
67{ 67{
68#if defined(HAVE_HOST_IN_UTMP)
68 struct utmp old_ut; 69 struct utmp old_ut;
70#endif
69#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) 71#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
70 struct utmpx *old_utx; 72 struct utmpx *old_utx;
71#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ 73#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
72 register int fd; 74 register int fd;
73 int tty; 75 int tty;
74 76
75#ifndef UT_LINESIZE
76# define UT_LINESIZE (sizeof(old_ut.ut_line))
77# define UT_NAMESIZE (sizeof(old_ut.ut_name))
78# ifdef HAVE_HOST_IN_UTMP
79# define UT_HOSTSIZE (sizeof(old_ut.ut_host))
80# endif
81#endif
82
83 tty = ttyslot(); 77 tty = ttyslot();
84 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { 78 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
79
85#if defined(HAVE_HOST_IN_UTMP) 80#if defined(HAVE_HOST_IN_UTMP)
81# ifndef UT_LINESIZE
82# define UT_LINESIZE (sizeof(old_ut.ut_line))
83# define UT_NAMESIZE (sizeof(old_ut.ut_name))
84# define UT_HOSTSIZE (sizeof(old_ut.ut_host))
85# endif
86 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); 86 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
87 /* 87 /*
88 * Prevent luser from zero'ing out ut_host. 88 * Prevent luser from zero'ing out ut_host.