aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-03-09 21:27:32 +0000
committerEric Andersen <andersen@codepoet.org>2004-03-09 21:27:32 +0000
commit21d308601eb5556065070e5b479dd5aace47bd52 (patch)
tree6435465929ddf345fd39b4bd5beb209cbb15367c /loginutils
parent1117c5281b4d0ab0a91678aa9e9ce92be8aefed7 (diff)
downloadbusybox-21d308601eb5556065070e5b479dd5aace47bd52.tar.gz
David Anders (prpplague) submitted this patch to allow login to work
when the device nodes are symlinks on a read only file system.
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c4
1 files changed, 2 insertions, 2 deletions
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 ));