diff options
Diffstat (limited to 'bin/echo')
| -rw-r--r-- | bin/echo/echo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/echo/echo.c b/bin/echo/echo.c index 68ff581f8475..e40a2a3071a0 100644 --- a/bin/echo/echo.c +++ b/bin/echo/echo.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include <sys/uio.h> #include <assert.h> +#include <capsicum_helpers.h> +#include <err.h> #include <errno.h> #include <limits.h> #include <stdlib.h> @@ -78,6 +80,9 @@ main(int argc, char *argv[]) char newline[] = "\n"; char *progname = argv[0]; + if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) + err(1, "capsicum"); + /* This utility may NOT do getopt(3) option parsing. */ if (*++argv && !strcmp(*argv, "-n")) { ++argv; |
