diff options
author | brian <brian@FreeBSD.org> | 2000-02-28 18:51:30 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-02-28 18:51:30 +0000 |
commit | 499e159c089579eb4a3572e76d1b8171cb9c34aa (patch) | |
tree | 19d7105bb800cc6e0eea183f8164710bd4deea33 /crypto | |
parent | ce0f910200f5c366a4d1c7d0a4975c21d2bdaa38 (diff) | |
download | FreeBSD-src-499e159c089579eb4a3572e76d1b8171cb9c34aa.zip FreeBSD-src-499e159c089579eb4a3572e76d1b8171cb9c34aa.tar.gz |
Don't put truncated hostnames in utmp
Approved by: jkh
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/openssh/login.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssh/login.c b/crypto/openssh/login.c index 55480de..6bfba25 100644 --- a/crypto/openssh/login.c +++ b/crypto/openssh/login.c @@ -87,7 +87,7 @@ record_login(int 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); /* Figure out the file names. */ utmp = _PATH_UTMP; |