Remove tty-prefix from ut_id; this field is usually very short.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@565 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-06-07 22:37:37 +00:00
parent 9719aa2994
commit e6f48eb604

View File

@@ -12,6 +12,7 @@ void utmp_login(char *tty, char *username, char *hostname)
int fd;
char *ttyx; /* tty w/o /dev/* */
char *id;
ttyx = tty;
@@ -49,7 +50,10 @@ void utmp_login(char *tty, char *username, char *hostname)
# ifdef HAVE_UT_ID
/* any particular reason to not include "tty" ? */
strncpy(utmp.ut_id, ttyx, sizeof(utmp.ut_id));
id = ttyx;
if(strncmp(ttyx, "tty", 3) == 0)
id += 3;
strncpy(utmp.ut_id, id, sizeof(utmp.ut_id));
# endif