public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2bcbbd
)
init: build new utmp entry with short tty name.
author
Brett Gordon
<beretta42@gmail.com>
Tue, 26 Apr 2016 15:18:52 +0000
(11:18 -0400)
committer
Alan Cox
<alan@linux.intel.com>
Tue, 26 Apr 2016 20:07:58 +0000
(21:07 +0100)
Applications/util/init.c
patch
|
blob
|
history
diff --git
a/Applications/util/init.c
b/Applications/util/init.c
index
5dd0d68
..
c85b4e7
100644
(file)
--- a/
Applications/util/init.c
+++ b/
Applications/util/init.c
@@
-735,7
+735,7
@@
static void spawn_login(struct passwd *pwd, const char *tty, const char *id)
/* utmp */
ut.ut_type = USER_PROCESS;
ut.ut_pid = getpid();
- strncpy(ut.ut_line, tty, UT_LINESIZE);
+ strncpy(ut.ut_line, tty
+5
, UT_LINESIZE);
strncpy(ut.ut_id, id, 2);
time(&ut.ut_time);
strncpy(ut.ut_user, pwd->pw_name, UT_NAMESIZE);