1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

this cpp operates file using pledge "stdio rpath wpath cpath"

This commit is contained in:
deraadt
2015-10-09 12:20:18 +00:00
parent bb9d77b9d0
commit 16b2abb210
+6
View File
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
@@ -1037,6 +1038,11 @@ main(int argc, char *argv[])
progname = progname == NULL ? argv[0] : progname + 1;
complain_init(progname);
if (pledge("stdio rpath wpath cpath", NULL) == -1) {
fprintf(stderr, "%s: pledge: %s", progname, strerror(errno));
exit(1);
}
init();
for (i=1; i<argc; i++) {