apply unveil(2) to 'got blame'
diff --git a/got/got.c b/got/got.c
index 2bf611f..2277622 100644
--- a/got/got.c
+++ b/got/got.c
@@ -985,8 +985,8 @@ cmd_blame(int argc, char *argv[])
int ch;
#ifndef PROFILE
- if (pledge("stdio rpath wpath cpath flock proc exec sendfd", NULL)
- == -1)
+ if (pledge("stdio rpath wpath cpath flock proc exec sendfd unveil",
+ NULL) == -1)
err(1, "pledge");
#endif
@@ -1027,6 +1027,10 @@ cmd_blame(int argc, char *argv[])
}
}
+ error = apply_unveil(repo_path, NULL);
+ if (error)
+ goto done;
+
error = got_repo_open(&repo, repo_path);
if (error != NULL)
goto done;