If a host would exceed 16 characters in the utmp entry, record only
it's IP address/base host instead. Submitted by: brian
This commit is contained in:
parent
8d904f1537
commit
62c931e0a4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76607
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user