diff options
author | Rob Landley <rob@landley.net> | 2006-06-25 22:59:31 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-25 22:59:31 +0000 |
commit | cf7577d4171d517690e95e7225979bfde32fce7c (patch) | |
tree | ba304684df300a2c2926a4d52b8e42332f478b10 | |
parent | 11c7a7bed60a55a670363bec3c07e8d88aa372b7 (diff) | |
download | busybox-w32-cf7577d4171d517690e95e7225979bfde32fce7c.tar.gz busybox-w32-cf7577d4171d517690e95e7225979bfde32fce7c.tar.bz2 busybox-w32-cf7577d4171d517690e95e7225979bfde32fce7c.zip |
Missed one. Based on suggestions from Erik Hovland.
-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; |