summaryrefslogtreecommitdiff
path: root/loginrec.c
diff options
context:
space:
mode:
authordjm <djm>2000-09-23 02:57:27 +0000
committerdjm <djm>2000-09-23 02:57:27 +0000
commite0d38eb6b7371ac6a64c3112b9bf348ea2baca9b (patch)
treec9cba65d936c6bceab1e9a8b22f0c06c49d51662 /loginrec.c
parent867047366341e3a8c1b34c10c795be8ef011704a (diff)
downloadopenssh-e0d38eb6b7371ac6a64c3112b9bf348ea2baca9b.tar.gz
- (djm) Fix address logging in utmp from Kevin Steves
<stevesk@sweden.hp.com>
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c7
1 files changed, 5 insertions, 2 deletions
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 */