summaryrefslogtreecommitdiff
path: root/loginrec.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2020-08-05 08:58:57 +1000
committerDamien Miller <djm@mindrot.org>2020-08-05 08:58:57 +1000
commitea1f649046546a860f68b97ddc3015b7e44346ca (patch)
tree59bd3a60c2f919cecb9eae4b1bda0adabbbe7aaa /loginrec.c
parent32c63e75a70a0ed9d6887a55fcb0e4531a6ad617 (diff)
downloadopenssh-git-ea1f649046546a860f68b97ddc3015b7e44346ca.tar.gz
support NetBSD's utmpx.ut_ss address field
bz#960, ok dtucker
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/loginrec.c b/loginrec.c
index e5289deb..ea058fd6 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -778,6 +778,9 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
strncpy(utx->ut_host, li->hostname,
MIN_SIZEOF(utx->ut_host, li->hostname));
# endif
+# ifdef HAVE_SS_IN_UTMPX
+ utx->ut_ss = li->hostaddr.sa_storage;
+# endif
# ifdef HAVE_ADDR_IN_UTMPX
/* this is just a 32-bit IP address */
if (li->hostaddr.sa.sa_family == AF_INET)