pledge(2) support

This commit is contained in:
2025-12-08 10:01:38 -05:00
parent a439c7fc8e
commit 4206aea7fe

View File

@@ -67,6 +67,13 @@ int rm_path(const char *p) {
}
int main(int argc, char *argv[]) {
#ifdef __OpenBSD__
if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1) {
perror("pledge");
return 1;
}
#endif
char tmpname[] = "/tmp/vidirXXXXXX";
int fd;
FILE *tmp;