projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1117c52
)
David Anders (prpplague) submitted this patch to allow login to work
author
Eric Andersen
<andersen@codepoet.org>
Tue, 9 Mar 2004 21:27:32 +0000
(21:27 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 9 Mar 2004 21:27:32 +0000
(21:27 -0000)
when the device nodes are symlinks on a read only file system.
loginutils/login.c
patch
|
blob
|
history
diff --git
a/loginutils/login.c
b/loginutils/login.c
index 3fca899c0c2ab02f723e0a808ee7cee505807efc..ee50a175a044d701532c1c7c1c55f2d9c1a9dfbe 100644
(file)
--- 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 ));