X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=blobdiff_plain;f=stagit.c;h=dcac01609fd98046eb1c3503f36f12a1f393a7da;hp=a6cfebc043b62d54695612a0482ff097a061fb2e;hb=edee68f398f5b190f4be0127338956c0a2500662;hpb=b5607f75afb9c6e6e6ab49128f9760d3538809cd 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");