=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/gprof/gprof.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- src/usr.bin/gprof/gprof.c 2015/08/20 22:32:41 1.22 +++ src/usr.bin/gprof/gprof.c 2015/11/16 17:43:17 1.23 @@ -1,4 +1,4 @@ -/* $OpenBSD: gprof.c,v 1.22 2015/08/20 22:32:41 deraadt Exp $ */ +/* $OpenBSD: gprof.c,v 1.23 2015/11/16 17:43:17 pascal Exp $ */ /* $NetBSD: gprof.c,v 1.8 1995/04/19 07:15:59 cgd Exp $ */ /* @@ -44,6 +44,9 @@ nltype **timesortnlp; char **defaultEs; + if (pledge("stdio rpath wpath cpath", NULL) == -1) + err(1, NULL); + --argc; argv++; debug = 0; @@ -128,6 +131,10 @@ argv++; } else { gmonname = GMONNAME; + } + if ( sflag == FALSE ) { + if (pledge("stdio rpath", NULL) == -1) + err(1, "pledge"); } /* * get information about a.out file.