summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-16 03:03:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-16 03:03:29 +0000
commit62ed856fb18079eb71f588a401fe842ba9afbaab (patch)
tree44128afa887ff782157e40fd52584073cdf7b9c5 /usr.bin
parent82412d401037daa66d141f2c0cbc28847f1e6059 (diff)
pledge "stdio rpath wpath tty"
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tput/tput.c5
-rw-r--r--usr.bin/tset/tset.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c
index fbe7f672fab..8289ad3d2f3 100644
--- a/usr.bin/tput/tput.c
+++ b/usr.bin/tput/tput.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tput.c,v 1.21 2015/01/16 06:40:13 deraadt Exp $ */
+/* $OpenBSD: tput.c,v 1.22 2015/11/16 03:03:28 deraadt Exp $ */
/*
* Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -75,6 +75,9 @@ main(int argc, char *argv[])
char *p, *term, *str;
char **oargv;
+ if (pledge("stdio rpath wpath tty", NULL) == -1)
+ err(1, "pledge");
+
oargv = argv;
term = NULL;
Sflag = exitval = 0;
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c
index ed7718573ae..82b9d5280ff 100644
--- a/usr.bin/tset/tset.c
+++ b/usr.bin/tset/tset.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tset.c,v 1.38 2015/11/15 14:14:20 deraadt Exp $ */
+/* $OpenBSD: tset.c,v 1.39 2015/11/16 03:02:40 deraadt Exp $ */
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
@@ -1136,6 +1136,9 @@ main(int argc, char **argv)
const char *p;
const char *ttype;
+ if (pledge("stdio rpath wpath tty", NULL) == -1)
+ err("pledge: %s", strerror(errno));
+
obsolete(argv);
noinit = noset = quiet = Sflag = sflag = showterm = 0;
while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:np:qQSrsVw")) != -1) {