Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/login make this compile without SUPPORT_UTMPX



details:   https://anonhg.NetBSD.org/src/rev/dfa040e22914
branches:  trunk
changeset: 534475:dfa040e22914
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 27 22:58:07 2002 +0000

description:
make this compile without SUPPORT_UTMPX

diffstat:

 usr.bin/login/Makefile |   4 ++--
 usr.bin/login/login.c  |  22 ++++++++++++----------
 2 files changed, 14 insertions(+), 12 deletions(-)

diffs (104 lines):

diff -r 006cf0e3f62b -r dfa040e22914 usr.bin/login/Makefile
--- a/usr.bin/login/Makefile    Sat Jul 27 20:10:32 2002 +0000
+++ b/usr.bin/login/Makefile    Sat Jul 27 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.36 2002/07/27 20:10:32 christos Exp $
+#      $NetBSD: Makefile,v 1.37 2002/07/27 22:58:07 christos Exp $
 #      @(#)Makefile    8.1 (Berkeley) 7/19/93
 
 .include <bsd.own.mk>
@@ -9,7 +9,7 @@
 LDADD+=        -lutil -lcrypt
 BINOWN=        root
 BINMODE=4555
-CPPFLAGS+=-DLOGIN_CAP -DUPDATE_UTMP -DUPDATE_UTMPX
+CPPFLAGS+=-DLOGIN_CAP -DSUPPORT_UTMP -DSUPPORT_UTMPX
 
 .if (${USE_SKEY} != "no")
 CPPFLAGS+=-DSKEY
diff -r 006cf0e3f62b -r dfa040e22914 usr.bin/login/login.c
--- a/usr.bin/login/login.c     Sat Jul 27 20:10:32 2002 +0000
+++ b/usr.bin/login/login.c     Sat Jul 27 22:58:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: login.c,v 1.66 2002/07/27 20:10:32 christos Exp $       */
+/*     $NetBSD: login.c,v 1.67 2002/07/27 22:58:07 christos Exp $       */
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)login.c    8.4 (Berkeley) 4/2/94";
 #endif
-__RCSID("$NetBSD: login.c,v 1.66 2002/07/27 20:10:32 christos Exp $");
+__RCSID("$NetBSD: login.c,v 1.67 2002/07/27 22:58:07 christos Exp $");
 #endif /* not lint */
 
 /*
@@ -59,6 +59,7 @@
 #include <sys/resource.h>
 #include <sys/file.h>
 #include <sys/wait.h>
+#include <sys/socket.h>
 
 #include <err.h>
 #include <errno.h>
@@ -74,10 +75,10 @@
 #include <ttyent.h>
 #include <tzfile.h>
 #include <unistd.h>
-#ifdef UPDATE_UTMP
+#ifdef SUPPORT_UTMP
 #include <utmp.h>
 #endif
-#ifdef UPDATE_UTMPX
+#ifdef SUPPORT_UTMPX
 #include <utmpx.h>
 #endif
 #include <util.h>
@@ -103,11 +104,11 @@
 
 void    badlogin __P((char *));
 void    checknologin __P((char *));
-#ifdef UPDATE_UTMP
+#ifdef SUPPORT_UTMP
 static void     doutmp __P((void));
 static void     dolastlog __P((int));
 #endif
-#ifdef UPDATE_UTMPX
+#ifdef SUPPORT_UTMPX
 static void     doutmpx __P((void));
 static void     dolastlogx __P((int));
 #endif
@@ -910,19 +911,20 @@
                socklen_t len = sizeof(ss);
                (void)getpeername(STDIN_FILENO, (struct sockaddr *)&ss, &len);
        }
+       printf("from host %s\n", hostname);
        (void)gettimeofday(&now, NULL);
-#ifdef UPDATE_UTMPX
+#ifdef SUPPORT_UTMPX
        doutmpx();
        dolastlogx(quietlog);
        quietlog = 1;
 #endif 
-#ifdef UPDATE_UTMP
+#ifdef SUPPORT_UTMP
        doutmp();
        dolastlog(quietlog);
 #endif
 }
 
-#ifdef UPDATE_UTMPX
+#ifdef SUPPORT_UTMPX
 static void
 doutmpx()
 {
@@ -980,7 +982,7 @@
 }
 #endif
 
-#ifdef UPDATE_UTMP
+#ifdef SUPPORT_UTMP
 static void
 doutmp()
 {



Home | Main Index | Thread Index | Old Index