SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,27 @@
add pledge(2) to "mutool info"
Index: source/tools/pdfinfo.c
--- source/tools/pdfinfo.c.orig
+++ source/tools/pdfinfo.c
@@ -28,6 +28,8 @@
#include "mupdf/fitz.h"
#include "mupdf/pdf.h"
+#include <unistd.h>
+#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -1046,6 +1048,12 @@ int pdfinfo_main(int argc, char **argv)
{
infousage();
return 1;
+ }
+
+ if (pledge("stdio rpath", NULL) == -1)
+ {
+ fprintf(stderr, "pledge: %s\n", strerror(errno));
+ exit(1);
}
ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);