diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-03 14:51:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-03 14:51:40 +0000 |
commit | bf5488d9df4818a6010b0905045bdb96668c6673 (patch) | |
tree | bfbdc9e2b386d9aa2d8822fee6bc18930455f748 | |
parent | 4a6fef59317af98c6cfde607002eee17683253ea (diff) |
hard to think of a simple program to add tame to. tame "stdio", obviously.
-rw-r--r-- | bin/echo/echo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/echo/echo.c b/bin/echo/echo.c index 36cfe5aefc8..76dac647782 100644 --- a/bin/echo/echo.c +++ b/bin/echo/echo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.8 2014/12/14 16:55:59 bcallah Exp $ */ +/* $OpenBSD: echo.c,v 1.9 2015/10/03 14:51:39 deraadt Exp $ */ /* $NetBSD: echo.c,v 1.6 1995/03/21 09:04:27 cgd Exp $ */ /* @@ -32,6 +32,8 @@ #include <stdio.h> #include <string.h> +#include <unistd.h> +#include <err.h> /* ARGSUSED */ int @@ -39,6 +41,9 @@ main(int argc, char *argv[]) { int nflag; + if (tame("stdio", NULL) == -1) + err(1, "tame"); + /* This utility may NOT do getopt(3) option parsing. */ if (*++argv && !strcmp(*argv, "-n")) { ++argv; |