summaryrefslogtreecommitdiffstats
path: root/bin/csh/csh.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-18 03:09:11 +0000
committerderaadt <deraadt@openbsd.org>2015-10-18 03:09:11 +0000
commit77f08cb6b301cd31db3cd0462976be1b0fe6a3e5 (patch)
treeab7eedb419165573c80acc63bb5ef2b75123e677 /bin/csh/csh.c
parentA whole buncha unsigned char casts for ctype function arguments. (diff)
downloadwireguard-openbsd-77f08cb6b301cd31db3cd0462976be1b0fe6a3e5.tar.xz
wireguard-openbsd-77f08cb6b301cd31db3cd0462976be1b0fe6a3e5.zip
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/csh/csh.c')
-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 */
/*