iAllow git to run on an other user repository - 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 8c74699abac4d2331eeb70c01c5b0367282a3281 /scm/stagit-gopher/commit/8c74699abac4d2331eeb70c01c5b0367282a3281.gph bitreich.org 70
1parent 9a8c60cb308d58cfc10d1ecfd6f6779bd8e806f5 /scm/stagit-gopher/commit/9a8c60cb308d58cfc10d1ecfd6f6779bd8e806f5.gph bitreich.org 70
hAuthor: Hiltjo Posthuma <hiltjo@codemadness.org> URL:mailto:hiltjo@codemadness.org bitreich.org 70
iDate: Tue, 24 May 2022 11:09:18 +0200 Err bitreich.org 70
i Err bitreich.org 70
iAllow git to run on an other user repository Err bitreich.org 70
i Err bitreich.org 70
iReported by Anton: Err bitreich.org 70
i Err bitreich.org 70
i"Recent versions of libgit2 broke stagit for me due to the added opt-out Err bitreich.org 70
iGIT_OPT_SET_OWNER_VALIDATION configuration knob. My repositories are owned by Err bitreich.org 70
iroot:vcs and I run stagit as another user which happens to be in vcs group but Err bitreich.org 70
inot the owner of the repository. Disabling the validation makes stagit work as Err bitreich.org 70
iexpected again." Err bitreich.org 70
i Err bitreich.org 70
iSome notes: Err bitreich.org 70
i Err bitreich.org 70
iWhen using regular git it also provides a knob. This is due to a security Err bitreich.org 70
iconcern in some cases, which is not applicable to stagit. Err bitreich.org 70
i Err bitreich.org 70
i git log somerepo Err bitreich.org 70
i Err bitreich.org 70
i fatal: unsafe repository ('somerepo' is owned by someone else) Err bitreich.org 70
i To add an exception for this directory, call: Err bitreich.org 70
i Err bitreich.org 70
i git config --global --add safe.directory somerepo Err bitreich.org 70
i Err bitreich.org 70
iSee also / related: Err bitreich.org 70
i- https://github.blog/2022-04-12-git-security-vulnerability-announced/ Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M stagit-gopher-index.c | 2 ++ Err bitreich.org 70
i M stagit-gopher.c | 2 ++ Err bitreich.org 70
i Err bitreich.org 70
i2 files changed, 4 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@@ -253,6 +253,8 @@ main(int argc, char *argv[]) Err bitreich.org 70
i git_libgit2_init(); Err bitreich.org 70
i for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) Err bitreich.org 70
i git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); Err bitreich.org 70
i+ /* do not require the git repository to be owned by the current user */ Err bitreich.org 70
i+ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); Err bitreich.org 70
i Err bitreich.org 70
i #ifdef __OpenBSD__ Err bitreich.org 70
i if (pledge("stdio rpath", NULL) == -1) 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@@ -1296,6 +1296,8 @@ main(int argc, char *argv[]) Err bitreich.org 70
i git_libgit2_init(); Err bitreich.org 70
i for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) Err bitreich.org 70
i git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); Err bitreich.org 70
i+ /* do not require the git repository to be owned by the current user */ Err bitreich.org 70
i+ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); 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
.
Response:
text/plain