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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user