Otherwise this would search outside the unveiled paths and cause an unveil
violation.
Reported by Anton Lindqvist, thanks!
return 1;
}
+ /* do not search outside the git repository:
+ GIT_CONFIG_LEVEL_APP is the highest level currently */
git_libgit2_init();
+ for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++)
+ git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, "");
#ifdef __OpenBSD__
if (pledge("stdio rpath", NULL) == -1)
if (!realpath(repodir, repodirabs))
err(1, "realpath");
+ /* do not search outside the git repository:
+ GIT_CONFIG_LEVEL_APP is the highest level currently */
git_libgit2_init();
+ for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++)
+ git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, "");
#ifdef __OpenBSD__
if (unveil(repodir, "r") == -1)