mirror of git://anongit.mindrot.org/openssh.git
support NetBSD's utmpx.ut_ss address field
bz#960, ok dtucker
This commit is contained in:
parent
32c63e75a7
commit
ea1f649046
|
@ -4207,6 +4207,7 @@ OSSH_CHECK_HEADER_FOR_FIELD([ut_exit], [utmp.h], [HAVE_EXIT_IN_UTMP])
|
|||
OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP])
|
||||
OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX])
|
||||
OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX])
|
||||
OSSH_CHECK_HEADER_FOR_FIELD([ut_ss], [utmpx.h], [HAVE_SS_IN_UTMPX])
|
||||
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize])
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtim])
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue