OSDN Git Service
(root)
/
android-x86
/
external-busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99fcd16
)
Sigh. The patch from David Anders (prpplague) broke standard
author
Eric Andersen
<andersen@codepoet.org>
Mon, 12 Apr 2004 22:49:06 +0000
(22:49 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Mon, 12 Apr 2004 22:49:06 +0000
(22:49 -0000)
securetty files since the /dev was not stripped.
loginutils/login.c
patch
|
blob
|
history
diff --git
a/loginutils/login.c
b/loginutils/login.c
index
99f66b5
..
10b7133
100644
(file)
--- a/
loginutils/login.c
+++ b/
loginutils/login.c
@@
-127,7
+127,9
@@
extern int login_main(int argc, char **argv)
#endif
tmp = ttyname ( 0 );
- if ( tmp )
+ if ( tmp && ( strncmp ( tmp, "/dev/", 5 ) == 0 ))
+ safe_strncpy ( tty, tmp + 5, sizeof( tty ));
+ else if ( tmp && *tmp == '/' )
safe_strncpy ( tty, tmp, sizeof( tty ));
else
safe_strncpy ( tty, "UNKNOWN", sizeof( tty ));