bsd-login.c in pre17
David Agraz
dagraz at jahoopa.com
Fri Dec 10 07:12:23 EST 1999
Just a small fix:
if #ifdef is given multiple arguments, it only evaluates the first
and ignores the rest of the line...
Also added #include <string.h> to prevent compiler warning about
strncmp in login.
enjoy,
-dagraz
--- bsd-login.c.orig Thu Dec 9 14:52:27 1999
+++ bsd-login.c Thu Dec 9 14:58:42 1999
@@ -52,6 +52,7 @@
# include <utmp.h>
#endif
#include <stdio.h>
+#include <string.h>
void
login(utp)
@@ -78,7 +79,7 @@
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.
_____________________________________________________
Sent by Jahoopa Free Email!
Find us on the web at http://www.jahoopa.com
Join today!
More information about the openssh-unix-dev
mailing list