diff options
-rw-r--r-- | loginutils/getty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index e68f2cde1..bb9ed0dfd 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -808,14 +808,14 @@ static void update_utmp(char *line) | |||
808 | } else { | 808 | } else { |
809 | /* some inits don't initialize utmp... */ | 809 | /* some inits don't initialize utmp... */ |
810 | memset(&ut, 0, sizeof(ut)); | 810 | memset(&ut, 0, sizeof(ut)); |
811 | strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); | 811 | safe_strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); |
812 | } | 812 | } |
813 | /*endutent(); */ | 813 | /*endutent(); */ |
814 | 814 | ||
815 | strncpy(ut.ut_user, "LOGIN", sizeof(ut.ut_user)); | 815 | strcpy(ut.ut_user, "LOGIN"); |
816 | strncpy(ut.ut_line, line, sizeof(ut.ut_line)); | 816 | safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line)); |
817 | if (fakehost) | 817 | if (fakehost) |
818 | strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); | 818 | safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host)); |
819 | time(&t); | 819 | time(&t); |
820 | ut.ut_time = t; | 820 | ut.ut_time = t; |
821 | ut.ut_type = LOGIN_PROCESS; | 821 | ut.ut_type = LOGIN_PROCESS; |