diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-27 22:21:12 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-27 22:21:12 +0000 |
commit | c6bbd895662dff96ca89c577623e8f1c234b015f (patch) | |
tree | da3276ab5bc224a64fb9f7d7d2a8a046816ec533 /loginutils/getty.c | |
parent | 68382a06482269331d897fa1a178bbc9625ae10c (diff) | |
download | busybox-w32-c6bbd895662dff96ca89c577623e8f1c234b015f.tar.gz busybox-w32-c6bbd895662dff96ca89c577623e8f1c234b015f.tar.bz2 busybox-w32-c6bbd895662dff96ca89c577623e8f1c234b015f.zip |
use bb_sanitize_stdio() where appropriate
git-svn-id: svn://busybox.net/trunk/busybox@17557 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r-- | loginutils/getty.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index be4938972..f2c2b4afb 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
@@ -264,7 +264,7 @@ static void open_tty(char *tty, struct termios *tp, int local) | |||
264 | */ | 264 | */ |
265 | 265 | ||
266 | if ((fcntl(0, F_GETFL, 0) & O_RDWR) != O_RDWR) | 266 | if ((fcntl(0, F_GETFL, 0) & O_RDWR) != O_RDWR) |
267 | bb_error_msg_and_die("%s: not open for read/write", tty); | 267 | bb_error_msg_and_die("stdin is not open for read/write"); |
268 | } | 268 | } |
269 | 269 | ||
270 | /* Replace current standard output/error fd's with new ones */ | 270 | /* Replace current standard output/error fd's with new ones */ |
@@ -314,7 +314,8 @@ static void open_tty(char *tty, struct termios *tp, int local) | |||
314 | strcpy(vcsa, "vcsa"); | 314 | strcpy(vcsa, "vcsa"); |
315 | strcpy(vcsa + 4, tty + 3); | 315 | strcpy(vcsa + 4, tty + 3); |
316 | 316 | ||
317 | id = (gr = getgrnam("sys")) ? gr->gr_gid : 0; | 317 | gr = getgrnam("sys"); |
318 | id = gr ? gr->gr_gid : 0; | ||
318 | chown(vcs, 0, id); | 319 | chown(vcs, 0, id); |
319 | chmod(vcs, 0600); | 320 | chmod(vcs, 0600); |
320 | chown(vcsa, 0, id); | 321 | chown(vcsa, 0, id); |
@@ -628,8 +629,8 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat | |||
628 | tp->c_cflag |= CS7; | 629 | tp->c_cflag |= CS7; |
629 | break; | 630 | break; |
630 | } | 631 | } |
631 | /* Account for upper case without lower case. */ | ||
632 | 632 | ||
633 | /* Account for upper case without lower case. */ | ||
633 | #ifdef HANDLE_ALLCAPS | 634 | #ifdef HANDLE_ALLCAPS |
634 | if (cp->capslock) { | 635 | if (cp->capslock) { |
635 | tp->c_iflag |= IUCLC; | 636 | tp->c_iflag |= IUCLC; |