diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-13 08:27:33 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-13 08:27:33 +1100 |
commit | c6b3bbe2b991f4f87ca1f8214f43c13a5a73f385 (patch) | |
tree | 5eadc1e35464be6ec748793060d92b12fa637052 /bsd-login.c | |
parent | 4e0dbd07cf1021897210c11a16fd05f207d95b8e (diff) |
- Fix compilation on systems with AFS. Reported by
aloomis@glue.umd.edu
- Fix installation on Solaris. Reported by
Gordon Rowell <gordonr@gormand.com.au>
- Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com,
patch from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
- Auto-locate xauth. Patch from David Agraz <dagraz@jahoopa.com>
- Compile fix from David Agraz <dagraz@jahoopa.com>
- Avoid compiler warning in bsd-snprintf.c
- Added pam_limits.so to default PAM config. Suggested by
Jim Knoble <jmknoble@pobox.com>
Diffstat (limited to 'bsd-login.c')
-rw-r--r-- | bsd-login.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bsd-login.c b/bsd-login.c index 9c120654..a2ec7414 100644 --- a/bsd-login.c +++ b/bsd-login.c @@ -52,6 +52,7 @@ static char *rcsid = "$OpenBSD: login.c,v 1.5 1998/07/13 02:11:12 millert Exp $" # include <utmp.h> #endif #include <stdio.h> +#include <string.h> void login(utp) @@ -78,7 +79,7 @@ login(utp) tty = ttyslot(); if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { -#ifdef HAVE_HOST_IN_UTMP || HAVE_HOST_IN_UTMPX +#if defined(HAVE_HOST_IN_UTMP) || defined(HAVE_HOST_IN_UTMPX) (void)lseek(fd, (off_t)(tty * sizeof(struct UTMP_STR)), SEEK_SET); /* * Prevent luser from zero'ing out ut_host. @@ -91,7 +92,7 @@ login(utp) strncmp(old_ut.ut_line, utp->ut_line, UT_LINESIZE) == 0 && strncmp(old_ut.ut_name, utp->ut_name, UT_NAMESIZE) == 0) (void)memcpy(utp->ut_host, old_ut.ut_host, UT_HOSTSIZE); -#endif /* HAVE_HOST_IN_UTMP || HAVE_HOST_IN_UTMPX */ +#endif /* defined(HAVE_HOST_IN_UTMP) || defined(HAVE_HOST_IN_UTMPX) */ (void)lseek(fd, (off_t)(tty * sizeof(struct UTMP_STR)), SEEK_SET); (void)write(fd, utp, sizeof(struct UTMP_STR)); (void)close(fd); |