git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Wooding <mdw@distorted.org.uk>
To: git@vger.kernel.org
Cc: Mark Wooding <mdw@distorted.org.uk>
Subject: [PATCH] daemon: Set up PATH properly on startup.
Date: Sat,  9 Feb 2008 11:17:53 +0000	[thread overview]
Message-ID: <1202555873-8099-1-git-send-email-mdw@distorted.org.uk> (raw)

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

             reply	other threads:[~2008-02-09 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 11:17 Mark Wooding [this message]
2008-02-10 20:00 ` [PATCH] daemon: Set up PATH properly on startup Johannes Sixt
2008-02-12  9:31   ` Mark Wooding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1202555873-8099-1-git-send-email-mdw@distorted.org.uk \
    --to=mdw@distorted.org.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).