tExit after perror. - git-restrict - simple utility for git repo permission management HTML git clone https://git.parazyd.org/git-restrict DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit e5234c68bbc2fc29304994afba04eb5a1c9b86d6 DIR parent fce572f45c5e908503ec65ae66e06d7cb0203b8a HTML Author: parazyd <parazyd@dyne.org> Date: Wed, 31 Mar 2021 10:43:09 +0200 Exit after perror. Otherwise a misleading message is printed. Diffstat: M git-restrict.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/git-restrict.c b/git-restrict.c t@@ -62,8 +62,10 @@ int main(int argc, char *argv[]) } if (authorized) - if (execlp("git-shell", " ", "-c", orig_cmd, (char *)NULL) < 0) + if (execlp("git-shell", " ", "-c", orig_cmd, (char *)NULL) < 0) { perror("execlp"); + return 1; + } die("fatal: Access to repository denied."); return 1;