aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 22:21:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 22:21:12 +0000
commite06bed30cfcde7b9e320aff8a4c878c72416c4c4 (patch)
treeda3276ab5bc224a64fb9f7d7d2a8a046816ec533 /loginutils/getty.c
parentcd75a96f0f9d446028cad7e4b9b9224e009752e1 (diff)
downloadbusybox-w32-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.tar.gz
busybox-w32-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.tar.bz2
busybox-w32-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.zip
use bb_sanitize_stdio() where appropriate
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c7
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;