apply unveil(2) to 'got log'
diff --git a/got/got.c b/got/got.c
index 1ff73e5..7be0a15 100644
--- a/got/got.c
+++ b/got/got.c
@@ -718,7 +718,8 @@ cmd_log(int argc, char *argv[])
const char *errstr;
#ifndef PROFILE
- if (pledge("stdio rpath wpath cpath flock proc exec sendfd", NULL)
+ if (pledge("stdio rpath wpath cpath flock proc exec sendfd unveil",
+ NULL)
== -1)
err(1, "pledge");
#endif
@@ -781,6 +782,10 @@ cmd_log(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;