summaryrefslogtreecommitdiff
path: root/stagit.c
diff options
context:
space:
mode:
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/stagit.c b/stagit.c
index a6cfebc..dcac016 100644
--- a/stagit.c
+++ b/stagit.c
@@ -1095,6 +1095,13 @@ main(int argc, char *argv[])
git_libgit2_init();
#ifdef __OpenBSD__
+ if (unveil(repodir, "r") == -1)
+ err(1, "unveil: %s", repodir);
+ if (unveil(".", "rwc") == -1)
+ err(1, "unveil: .");
+ if (cachefile && unveil(cachefile, "rwc") == -1)
+ err(1, "unveil: %s", cachefile);
+
if (cachefile) {
if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
err(1, "pledge");