From 615f939ebb48fdde404aae705057202512731331 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 17 May 2000 22:53:33 +1000 Subject: - Several patches from SAKAI Kiyotaka - INSTALL typo and URL fix - Makefile fix - Solaris fixes - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka --- bsd-login.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bsd-login.c') diff --git a/bsd-login.c b/bsd-login.c index 910f9ff9f..6a80928e0 100644 --- a/bsd-login.c +++ b/bsd-login.c @@ -73,6 +73,7 @@ struct utmp * utp; int t = 0; struct utmp * u; +#ifdef HAVE_TYPE_IN_UTMP setutent(); while((u = getutent()) != NULL) { @@ -91,6 +92,7 @@ struct utmp * utp; } endutent(); +#endif return(-1); } @@ -128,6 +130,7 @@ login(utp) /* If no tty was found... */ if (tty == -1) { /* ... append it to utmp on login */ +#ifdef HAVE_TYPE_IN_UTMP if (utp->ut_type == USER_PROCESS) { if ((fd = open(_PATH_UTMP, O_WRONLY|O_APPEND, 0)) >= 0) { (void)write(fd, utp, sizeof(struct utmp)); @@ -138,6 +141,7 @@ login(utp) /* Between login and logout */ log("No tty slot found at logout"); } +#endif } else { /* Otherwise, tty was found - update at its location */ #if defined(HAVE_HOST_IN_UTMP) -- cgit v1.2.3