SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
27
textproc/mupdf/patches/patch-source_tools_mudraw_c
Normal file
27
textproc/mupdf/patches/patch-source_tools_mudraw_c
Normal file
|
@ -0,0 +1,27 @@
|
|||
add pledge(2) to "mutool draw"
|
||||
|
||||
Index: source/tools/mudraw.c
|
||||
--- source/tools/mudraw.c.orig
|
||||
+++ source/tools/mudraw.c
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "mupdf/helpers/mu-threads.h"
|
||||
#endif
|
||||
|
||||
+#include <errno.h>
|
||||
+#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
@@ -2135,6 +2137,12 @@ int mudraw_main(int argc, char **argv)
|
||||
|
||||
if (fz_optind == argc)
|
||||
return usage();
|
||||
+
|
||||
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
|
||||
+ {
|
||||
+ fprintf(stderr, "pledge: %s\n", strerror(errno));
|
||||
+ exit(1);
|
||||
+ }
|
||||
|
||||
if (num_workers > 0)
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue