From: deraadt Date: Wed, 7 Oct 2015 05:37:42 +0000 (+0000) Subject: tame "stdio rpath wpath cpath proc exec tty". proc and exec because ed X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d92db9d4ad8e898dfa30b8def3b062722a8ad778;p=openbsd tame "stdio rpath wpath cpath proc exec tty". proc and exec because ed it is a shell (it has a !command). tty because it uses TIOCGWINSZ in a SIGWINCH handler. --- diff --git a/bin/ed/main.c b/bin/ed/main.c index 0674da79b01..ce29ed14c77 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.48 2015/10/04 15:23:24 millert Exp $ */ +/* $OpenBSD: main.c,v 1.49 2015/10/07 05:37:42 deraadt Exp $ */ /* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */ /* main.c: This file contains the main control and user-interface routines @@ -48,6 +48,7 @@ #include #include #include +#include #include "ed.h" @@ -102,6 +103,9 @@ main(volatile int argc, char ** volatile argv) int c, n; int status = 0; + if (tame("stdio rpath wpath cpath proc exec tty", NULL) == -1) + err(1, "tame"); + home = getenv("HOME"); top: