From 77f08cb6b301cd31db3cd0462976be1b0fe6a3e5 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 18 Oct 2015 03:09:11 +0000 Subject: [PATCH] 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...) --- bin/csh/csh.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 */ /* -- 2.20.1