summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-23 13:57:27 +1100
committerDamien Miller <djm@mindrot.org>2000-09-23 13:57:27 +1100
commitd6f204d71f49d8c82794aa59c1dfe13157c58d69 (patch)
treef1ad84dd9adec04f433b60b28fc158a62e348b05
parent337cf323f4332440b786366a879534db8b007549 (diff)
- (djm) Fix address logging in utmp from Kevin Steves
<stevesk@sweden.hp.com>
-rw-r--r--ChangeLog4
-rw-r--r--configure.in2
-rw-r--r--loginrec.c7
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d232d06..9a8a3965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20000923
+ - (djm) Fix address logging in utmp from Kevin Steves
+ <stevesk@sweden.hp.com>
+
20000920
- (djm) Fix bad path substitution. Report from Andrew Miner
<asminer@cs.iastate.edu>
diff --git a/configure.in b/configure.in
index b03905f9..774529d3 100644
--- a/configure.in
+++ b/configure.in
@@ -74,6 +74,7 @@ case "$host" in
IPADDR_IN_DISPLAY=yes
AC_DEFINE(USE_PIPES)
AC_DEFINE(DISABLE_SHADOW)
+ AC_DEFINE(DISABLE_UTMP)
LIBS="$LIBS -lsec"
MANTYPE='$(CATMAN)'
mansubdir=cat
@@ -83,6 +84,7 @@ case "$host" in
IPADDR_IN_DISPLAY=yes
AC_DEFINE(USE_PIPES)
AC_DEFINE(DISABLE_SHADOW)
+ AC_DEFINE(DISABLE_UTMP)
LIBS="$LIBS -lsec"
MANTYPE='$(CATMAN)'
mansubdir=cat
diff --git a/loginrec.c b/loginrec.c
index 0e1f344b..460f551b 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -161,7 +161,7 @@
#include "xmalloc.h"
#include "loginrec.h"
-RCSID("$Id: loginrec.c,v 1.23 2000/09/05 05:13:07 djm Exp $");
+RCSID("$Id: loginrec.c,v 1.24 2000/09/23 02:57:27 djm Exp $");
/**
** prototypes for helper functions in this file
@@ -678,7 +678,10 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
strncpy(utx->ut_host, li->hostname, MIN_SIZEOF(utx->ut_host, li->hostname));
# endif
# ifdef HAVE_ADDR_IN_UTMPX
- /* FIXME: (ATL) not supported yet */
+ /* this is just a 32-bit IP address */
+ if (li->hostaddr.sa.sa_family == AF_INET)
+ utx->ut_addr = li->hostaddr.sa_in.sin_addr.s_addr;
+ # endif
# endif
# ifdef HAVE_SYSLEN_IN_UTMPX
/* ut_syslen is the length of the utx_host string */