]> andersk Git - openssh.git/blobdiff - loginrec.c
- (djm) Fix address logging in utmp from Kevin Steves
[openssh.git] / loginrec.c
index be6b18f97c9e4360e4c55607a30e6ebc4a8b1a08..4f9f30adad60392bfed14734b39a6a13fe07191a 100644 (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 */
This page took 0.038605 seconds and 4 git commands to generate.