From: Eric Andersen Date: Tue, 9 Mar 2004 21:27:32 +0000 (-0000) Subject: David Anders (prpplague) submitted this patch to allow login to work X-Git-Tag: 1_00_pre9~79 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21d308601eb5556065070e5b479dd5aace47bd52;p=oweals%2Fbusybox.git David Anders (prpplague) submitted this patch to allow login to work when the device nodes are symlinks on a read only file system. --- diff --git a/loginutils/login.c b/loginutils/login.c index 3fca899c0..ee50a175a 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -127,8 +127,8 @@ extern int login_main(int argc, char **argv) #endif tmp = ttyname ( 0 ); - if ( tmp && ( strncmp ( tmp, "/dev/", 5 ) == 0 )) - safe_strncpy ( tty, tmp + 5, sizeof( tty )); + if ( tmp ) + safe_strncpy ( tty, tmp, sizeof( tty )); else safe_strncpy ( tty, "UNKNOWN", sizeof( tty ));