git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] daemon: Set up PATH properly on startup.
@ 2008-02-09 11:17 Mark Wooding
  2008-02-10 20:00 ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wooding @ 2008-02-09 11:17 UTC (permalink / raw)
  To: git; +Cc: Mark Wooding

Since exec_cmd.c changed (511707d42b3b3e57d9623493092590546ffeae80) to
just use the PATH variable for finding Git binaries, the daemon has been
broken for people with picky inetds (such as the OpenBSD one) which
launder the environment on startup.  The result is that the daemon
mysteriously fails to do anything useful.

One line fix: call setup_paths() in main before doing anything.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
---
 daemon.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

	I've not addressed the other problem with git-daemon which this
	bug brought to my attention, which is that it doesn't log any
	kind of error if it fails to exec.

diff --git a/daemon.c b/daemon.c
index 41a60af..cfd6124 100644
--- a/daemon.c
+++ b/daemon.c
@@ -1149,6 +1149,7 @@ int main(int argc, char **argv)
 		usage(daemon_usage);
 	}
 
+	setup_path(NULL);
 	if (inetd_mode && (group_name || user_name))
 		die("--user and --group are incompatible with --inetd");
 
-- 
1.5.4.rc5.5.gab98-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-12  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-09 11:17 [PATCH] daemon: Set up PATH properly on startup Mark Wooding
2008-02-10 20:00 ` Johannes Sixt
2008-02-12  9:31   ` Mark Wooding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).