Commit Diff


commit - e9a2eec25cbb6ffad890b7cd4034be1c86095a86
commit + a6955b87407110ed6d51627190bbb4a514e885d1
blob - f64718c7a221e24d8bd87dc9cda7479193609c10
blob + 548c0d44870a40bd593d7d989fd77521956d5680
--- got/got.c
+++ got/got.c
@@ -1697,6 +1697,11 @@ cmd_clone(int argc, char *argv[])
 	if (error)
 		goto done;
 
+#ifndef PROFILE
+	if (pledge("stdio rpath wpath cpath fattr flock proc exec sendfd",
+	     NULL) == -1)
+		err(1, "pledge");
+#endif
 	if (!list_refs_only) {
 		error = got_repo_init(repo_path, NULL);
 		if (error)
@@ -2568,7 +2573,11 @@ cmd_fetch(int argc, char *argv[])
 	    server_path, verbosity);
 	if (error)
 		goto done;
-
+#ifndef PROFILE
+	if (pledge("stdio rpath wpath cpath fattr flock proc exec sendfd",
+	     NULL) == -1)
+		err(1, "pledge");
+#endif
 	if (!have_bflag) {
 		/*
 		 * If set, get this remote's HEAD ref target so