From 05761042d7e1ae34c8fd32d69b544947744e2e5b Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 20 Nov 2015 15:58:29 +0000 Subject: Cannot pledge bottom half of setting, because of the ioctl backing "extproc", "ostart" and "ostop" are not allowed (yet?) --- bin/stty/stty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin/stty') diff --git a/bin/stty/stty.c b/bin/stty/stty.c index beb80f08d9d..80d5baca40b 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stty.c,v 1.17 2015/10/11 15:27:19 deraadt Exp $ */ +/* $OpenBSD: stty.c,v 1.18 2015/11/20 15:58:28 deraadt Exp $ */ /* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */ /*- @@ -83,9 +83,6 @@ args: argc -= optind; if (ioctl(i.fd, TIOCGETD, &i.ldisc) < 0 ) err(1, "TIOCGETD"); - if (pledge("stdio tty", NULL) == -1) - err(1, "pledge"); - if (tcgetattr(i.fd, &i.t) < 0) errx(1, "not a terminal"); if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0) @@ -109,6 +106,10 @@ args: argc -= optind; break; } + /* + * Cannot pledge, because of "extproc", "ostart" and "ostop" + */ + for (i.set = i.wset = 0; *argv; ++argv) { if (ksearch(&argv, &i)) continue; -- cgit v1.2.3