summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-20 15:58:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-20 15:58:29 +0000
commit05761042d7e1ae34c8fd32d69b544947744e2e5b (patch)
tree070e43bc1ff45d73933570c516c2b296483311ca
parent4f6972189cef71aaa17867eaa30e35bdc4e97a15 (diff)
Cannot pledge bottom half of setting, because of the ioctl backing
"extproc", "ostart" and "ostop" are not allowed (yet?)
-rw-r--r--bin/stty/stty.c9
1 files changed, 5 insertions, 4 deletions
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;