iadd OpenBSD unveil support - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70
hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70
1Log /scm/stagit-gopher/log.gph bitreich.org 70
1Files /scm/stagit-gopher/files.gph bitreich.org 70
1Refs /scm/stagit-gopher/refs.gph bitreich.org 70
1Tags /scm/stagit-gopher/tag bitreich.org 70
1README /scm/stagit-gopher/file/README.gph bitreich.org 70
1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70
i--- Err bitreich.org 70
1commit 2d17ff69d90329bbbfadbf258f4a22f26358943b /scm/stagit-gopher/commit/2d17ff69d90329bbbfadbf258f4a22f26358943b.gph bitreich.org 70
1parent 44e1ef57a375794bea37555ac1bc417d37156caf /scm/stagit-gopher/commit/44e1ef57a375794bea37555ac1bc417d37156caf.gph bitreich.org 70
hAuthor: Hiltjo Posthuma <hiltjo@codemadness.org> URL:mailto:hiltjo@codemadness.org bitreich.org 70
iDate: Sun, 22 Dec 2019 12:52:49 +0100 Err bitreich.org 70
i Err bitreich.org 70
iadd OpenBSD unveil support Err bitreich.org 70
i Err bitreich.org 70
iThe unveil() system call first appeared in OpenBSD 6.4. Err bitreich.org 70
i Err bitreich.org 70
iFor stagit-gopher it has the following properties now: Err bitreich.org 70
i Err bitreich.org 70
i- stagit-gopher-index: only read-access to the file-system for the specified Err bitreich.org 70
i directories/repositories. Err bitreich.org 70
i- stagit-gopher: read-access to the specified directory/repository. Err bitreich.org 70
i read-write and creation access to the current directory for the output files. Err bitreich.org 70
i read-write and creation access to the specified cache file Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M stagit-gopher-index.c | 4 ++++ Err bitreich.org 70
i M stagit-gopher.c | 7 +++++++ Err bitreich.org 70
i Err bitreich.org 70
i2 files changed, 11 insertions(+), 0 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/stagit-gopher-index.c b/stagit-gopher-index.c /scm/stagit-gopher/file/stagit-gopher-index.c.gph bitreich.org 70
i@@ -219,6 +219,10 @@ main(int argc, char *argv[]) Err bitreich.org 70
i git_libgit2_init(); Err bitreich.org 70
i Err bitreich.org 70
i #ifdef __OpenBSD__ Err bitreich.org 70
i+ for (i = 1; i < argc; i++) Err bitreich.org 70
i+ if (unveil(argv[i], "r") == -1) Err bitreich.org 70
i+ err(1, "unveil: %s", argv[i]); Err bitreich.org 70
i+ Err bitreich.org 70
i if (pledge("stdio rpath", NULL) == -1) Err bitreich.org 70
i err(1, "pledge"); Err bitreich.org 70
i #endif Err bitreich.org 70
1diff --git a/stagit-gopher.c b/stagit-gopher.c /scm/stagit-gopher/file/stagit-gopher.c.gph bitreich.org 70
i@@ -1177,6 +1177,13 @@ main(int argc, char *argv[]) Err bitreich.org 70
i git_libgit2_init(); Err bitreich.org 70
i Err bitreich.org 70
i #ifdef __OpenBSD__ Err bitreich.org 70
i+ if (unveil(repodir, "r") == -1) Err bitreich.org 70
i+ err(1, "unveil: %s", repodir); Err bitreich.org 70
i+ if (unveil(".", "rwc") == -1) Err bitreich.org 70
i+ err(1, "unveil: ."); Err bitreich.org 70
i+ if (cachefile && unveil(cachefile, "rwc") == -1) Err bitreich.org 70
i+ err(1, "unveil: %s", cachefile); Err bitreich.org 70
i+ Err bitreich.org 70
i if (cachefile) { Err bitreich.org 70
i if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) Err bitreich.org 70
i err(1, "pledge"); Err bitreich.org 70
.
Response:
text/plain