summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:09:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-18 03:09:12 +0000
commit6b567033e04f2dde7fc4d9524cbf0a9a4418546b (patch)
tree536a803f37fbbec670365249e5ec5bb619416904 /bin
parent360ad43b1c7c5200327a685ce8284f63d4beb7b6 (diff)
With TIOCSTI supported in pledge "tty proc", csh is good enough to run
with pledge "stdio rpath wpath cpath fattr getpw proc exec tty". (Note that ksh "emacs mode" is also a abus^Wconsumer of TIOCSTI, but we had let that slide for a week since noone uses it...)
Diffstat (limited to 'bin')
-rw-r--r--bin/csh/csh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index 52fdbfcbcfd..3ef96b6e4a2 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.28 2015/02/08 05:51:37 tedu Exp $ */
+/* $OpenBSD: csh.c,v 1.29 2015/10/18 03:09:11 deraadt Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -104,6 +104,10 @@ main(int argc, char *argv[])
cshout = stdout;
csherr = stderr;
+ if (pledge("stdio rpath wpath cpath fattr getpw proc exec tty",
+ NULL) == -1)
+ perror("pledge");
+
settimes(); /* Immed. estab. timing base */
/*