diff options
author | green <green@FreeBSD.org> | 2001-05-15 01:50:40 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2001-05-15 01:50:40 +0000 |
commit | a407780211ed2bd3c3e44480345c5e88566dda9e (patch) | |
tree | 21234532fb5d1f7e9bcf0d9793753165935fa1e9 /crypto/openssh | |
parent | 13db4bb4b3929a28c03eefd77f2e9000604d69d6 (diff) | |
download | FreeBSD-src-a407780211ed2bd3c3e44480345c5e88566dda9e.zip FreeBSD-src-a407780211ed2bd3c3e44480345c5e88566dda9e.tar.gz |
If a host would exceed 16 characters in the utmp entry, record only
it's IP address/base host instead.
Submitted by: brian
Diffstat (limited to 'crypto/openssh')
-rw-r--r-- | crypto/openssh/sshlogin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssh/sshlogin.c b/crypto/openssh/sshlogin.c index a9e769b..b8536c0 100644 --- a/crypto/openssh/sshlogin.c +++ b/crypto/openssh/sshlogin.c @@ -99,7 +99,7 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); u.ut_time = time(NULL); strncpy(u.ut_name, user, sizeof(u.ut_name)); - strncpy(u.ut_host, host, sizeof(u.ut_host)); + realhostname_sa(u.ut_host, sizeof(u.ut_host), addr, addr->sa_len); login(&u); lastlog = _PATH_LASTLOG; |