diff options
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 2 | ||||
-rw-r--r-- | loginutils/login.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index ae183a62b..13a8c0c6c 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -605,7 +605,7 @@ static void update_utmp(const char *line, char *fakehost) | |||
605 | safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line)); | 605 | safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line)); |
606 | if (fakehost) | 606 | if (fakehost) |
607 | safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); | 607 | safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); |
608 | ut.ut_time = time(NULL); | 608 | ut.ut_tv.tv_sec = time(NULL); |
609 | ut.ut_type = LOGIN_PROCESS; | 609 | ut.ut_type = LOGIN_PROCESS; |
610 | ut.ut_pid = mypid; | 610 | ut.ut_pid = mypid; |
611 | 611 | ||
diff --git a/loginutils/login.c b/loginutils/login.c index 900a7c042..d9a2f8a41 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -80,7 +80,7 @@ static void read_or_build_utent(struct utmp *utptr, int picky) | |||
80 | * remotely meaningful by skipping "tty"... */ | 80 | * remotely meaningful by skipping "tty"... */ |
81 | strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id)); | 81 | strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id)); |
82 | strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user)); | 82 | strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user)); |
83 | utptr->ut_time = time(NULL); | 83 | utptr->ut_tv.tv_sec = time(NULL); |
84 | } | 84 | } |
85 | if (!picky) /* root login */ | 85 | if (!picky) /* root login */ |
86 | memset(utptr->ut_host, 0, sizeof(utptr->ut_host)); | 86 | memset(utptr->ut_host, 0, sizeof(utptr->ut_host)); |
@@ -96,7 +96,7 @@ static void write_utent(struct utmp *utptr, const char *username) | |||
96 | { | 96 | { |
97 | utptr->ut_type = USER_PROCESS; | 97 | utptr->ut_type = USER_PROCESS; |
98 | strncpy(utptr->ut_user, username, sizeof(utptr->ut_user)); | 98 | strncpy(utptr->ut_user, username, sizeof(utptr->ut_user)); |
99 | utptr->ut_time = time(NULL); | 99 | utptr->ut_tv.tv_sec = time(NULL); |
100 | /* other fields already filled in by read_or_build_utent above */ | 100 | /* other fields already filled in by read_or_build_utent above */ |
101 | setutent(); | 101 | setutent(); |
102 | pututline(utptr); | 102 | pututline(utptr); |