From: deraadt Date: Sat, 10 Oct 2015 05:47:54 +0000 (+0000) Subject: Some of these large so easy to contain, with "stdio rpath". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5cd64a9361cd78c20a7500eeb0b6d61caf8b6c59;p=openbsd Some of these large so easy to contain, with "stdio rpath". ok doug --- diff --git a/usr.bin/lex/flexdef.h b/usr.bin/lex/flexdef.h index 0cea9e1dc57..2a6e1703c53 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: /home/cvs/src/usr.bin/lex/flexdef.h,v 1.7 2004/02/03 21:20:17 espie Exp $ (LBL) */ +/* @(#) $Header: /home/cvs/src/usr.bin/lex/flexdef.h,v 1.8 2015/10/10 05:47:54 deraadt Exp $ (LBL) */ #include #include @@ -66,6 +66,7 @@ #ifdef STDC_HEADERS #include +#include #else #ifdef HAVE_MALLOC_H #include diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c index c88f08311f8..1844147439e 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: /home/cvs/src/usr.bin/lex/main.c,v 1.14 2014/03/16 18:38:30 guenther Exp $ */ +/* $Header: /home/cvs/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