Commit Diff


commit - 23b19d00d9aa2815c3e8eaa76bf67cf5b54fe4e5
commit + f8352b2a8477e272dcb6a1bae69e184d5f512389
blob - f6edbe0c48e2a16e9a972148efe589e563335657
blob + 1567c4357790f8c855326c23f1674ae7c13eff4b
--- regress/delta/delta_test.c
+++ regress/delta/delta_test.c
@@ -19,6 +19,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <err.h>
+#include <unistd.h>
 
 #include "got_error.h"
 
@@ -108,6 +110,9 @@ main(int argc, const char *argv[])
 		return 1;
 	}
 
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+		err(1, "pledge");
+
 	RUN_TEST(delta_apply(), "delta_apply");
 
 	return failure ? 1 : 0;
blob - 1d2959d7c776ea9687febe894c1e1a9805064b2a
blob + c986d4133f777602379731df498071f7b473a101
--- regress/repository/repository_test.c
+++ regress/repository/repository_test.c
@@ -21,6 +21,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
+#include <err.h>
 #include <unistd.h>
 
 #include "got_error.h"
@@ -405,6 +407,9 @@ main(int argc, char *argv[])
 	const char *repo_path;
 	int ch;
 
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+		err(1, "pledge");
+
 	while ((ch = getopt(argc, argv, "v")) != -1) {
 		switch (ch) {
 		case 'v':
blob - 84ee710753ca1f21948d16f4562723d4f880a12b
blob + eca73fef383405afa0f4a65f4e3965112f0005e5
--- regress/worktree/worktree_test.c
+++ regress/worktree/worktree_test.c
@@ -26,6 +26,8 @@
 #include <unistd.h>
 #include <errno.h>
 #include <util.h>
+#include <err.h>
+#include <unistd.h>
 
 #include "got_error.h"
 #include "got_object.h"
@@ -381,6 +383,9 @@ main(int argc, char *argv[])
 	const char *repo_path;
 	int ch;
 
+	if (pledge("stdio rpath wpath cpath flock", NULL) == -1)
+		err(1, "pledge");
+
 	while ((ch = getopt(argc, argv, "v")) != -1) {
 		switch (ch) {
 		case 'v':