blob: 7e863071c6b4e390f3d72918a191c608c4237e25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-src_validator.c,v 1.1 2020/09/01 10:21:55 schmonz Exp $
From OpenBSD ports, add pledge() support.
--- src/validator.c.orig Thu Jan 1 00:00:00 1970
+++ src/validator.c
@@ -28,6 +28,9 @@
#include <locale.h>
+#ifdef HAVE_PLEDGE
+#include <unistd.h>
+#endif
#include "validate.h"
static gboolean warn_kde = FALSE;
@@ -50,6 +53,13 @@ main (int argc, char *argv[])
GError *error;
int i;
gboolean all_valid;
+
+#ifdef HAVE_PLEDGE
+ if (pledge ("stdio rpath", NULL) == -1) {
+ g_printerr ("pledge\n");
+ return 1;
+ }
+#endif
setlocale (LC_ALL, "");
|