Missed one. Based on suggestions from Erik Hovland.
This commit is contained in:
parent
11c7a7bed6
commit
cf7577d417
@ -808,14 +808,14 @@ static void update_utmp(char *line)
|
|||||||
} else {
|
} else {
|
||||||
/* some inits don't initialize utmp... */
|
/* some inits don't initialize utmp... */
|
||||||
memset(&ut, 0, sizeof(ut));
|
memset(&ut, 0, sizeof(ut));
|
||||||
strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
|
safe_strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
|
||||||
}
|
}
|
||||||
/*endutent(); */
|
/*endutent(); */
|
||||||
|
|
||||||
strncpy(ut.ut_user, "LOGIN", sizeof(ut.ut_user));
|
strcpy(ut.ut_user, "LOGIN");
|
||||||
strncpy(ut.ut_line, line, sizeof(ut.ut_line));
|
safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line));
|
||||||
if (fakehost)
|
if (fakehost)
|
||||||
strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host));
|
safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host));
|
||||||
time(&t);
|
time(&t);
|
||||||
ut.ut_time = t;
|
ut.ut_time = t;
|
||||||
ut.ut_type = LOGIN_PROCESS;
|
ut.ut_type = LOGIN_PROCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user