diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-07 05:37:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-07 05:37:43 +0000 |
commit | 59b5cae488d6c2ee5534faf515a911036dd79f04 (patch) | |
tree | 502d60c038e84bcfcfb3a6967f1727eba09a4f31 /bin/ed/main.c | |
parent | 018dd96fbbc689b3264dbc5bf472daddf9d54ef8 (diff) |
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.
Diffstat (limited to 'bin/ed/main.c')
-rw-r--r-- | bin/ed/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 <setjmp.h> #include <unistd.h> #include <pwd.h> +#include <err.h> #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: |