diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-10 05:47:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-10 05:47:55 +0000 |
commit | b3e9a6c6ebc9090c14fd311f1ff3ecf314cf3719 (patch) | |
tree | 79971fded45bc3baa75fd34ce2bde711eaacd0dd /usr.bin | |
parent | d8b44689d4d5a9556804597afd4db4d2f159f1e8 (diff) |
Some of these large so easy to contain, with "stdio rpath".
ok doug
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/lex/flexdef.h | 5 | ||||
-rw-r--r-- | usr.bin/lex/main.c | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/lex/flexdef.h b/usr.bin/lex/flexdef.h index 7828d1af629..21d04030ccf 100644 --- a/usr.bin/lex/flexdef.h +++ b/usr.bin/lex/flexdef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: flexdef.h,v 1.7 2004/02/03 21:20:17 espie Exp $ */ +/* $OpenBSD: flexdef.h,v 1.8 2015/10/10 05:47:54 deraadt Exp $ */ /* flexdef - definitions file for flex */ @@ -33,7 +33,7 @@ * PURPOSE. */ -/* @(#) $Header: /cvs/OpenBSD/src/usr.bin/lex/flexdef.h,v 1.7 2004/02/03 21:20:17 espie Exp $ (LBL) */ +/* @(#) $Header: /cvs/OpenBSD/src/usr.bin/lex/flexdef.h,v 1.8 2015/10/10 05:47:54 deraadt Exp $ (LBL) */ #include <stdio.h> #include <ctype.h> @@ -66,6 +66,7 @@ #ifdef STDC_HEADERS #include <stdlib.h> +#include <unistd.h> #else #ifdef HAVE_MALLOC_H #include <malloc.h> diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c index 4ed4414eaaa..ce8e98cfa83 100644 --- a/usr.bin/lex/main.c +++ b/usr.bin/lex/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.14 2014/03/16 18:38:30 guenther Exp $ */ +/* $OpenBSD: main.c,v 1.15 2015/10/10 05:47:54 deraadt Exp $ */ /* flex - tool to generate fast lexical analyzers */ @@ -33,7 +33,7 @@ * PURPOSE. */ -/* $Header: /cvs/OpenBSD/src/usr.bin/lex/main.c,v 1.14 2014/03/16 18:38:30 guenther Exp $ */ +/* $Header: /cvs/OpenBSD/src/usr.bin/lex/main.c,v 1.15 2015/10/10 05:47:54 deraadt Exp $ */ #include "flexdef.h" @@ -136,6 +136,13 @@ char **argv; { int i; + if (pledge("stdio rpath wpath cpath", NULL) == -1) + { + fprintf( stderr, _( "%s: pledge\n" ), + program_name); + exit(1); + } + #ifdef THINK_C argc = ccommand( &argv ); #endif |