openbsd-ports/textproc/mupdf/patches/patch-source_tools_pdfclean_c
2016-01-19 05:20:51 +00:00

20 lines
523 B
Plaintext

$OpenBSD: patch-source_tools_pdfclean_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
add pledge(2) to "mutool clean"
--- source/tools/pdfclean.c.orig Sun Jan 17 11:59:42 2016
+++ source/tools/pdfclean.c Sun Jan 17 12:01:42 2016
@@ -79,6 +79,12 @@ int pdfclean_main(int argc, char **argv)
outfile = argv[fz_optind++];
}
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ {
+ fprintf(stderr, "pledge: %s\n", strerror(errno));
+ exit(1);
+ }
+
ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
if (!ctx)
{