Re: git-daemon breakage in 1.5.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 6/2/2008, a las 11:28, Johannes Sixt escribió:

Which makes me think that you xinetd doesn't pass a PATH to git- daemon
that includes /usr/local/bin. Add this to your /etc/xinetd.d/git:

  env = PATH=/bin:/usr/bin:/usr/local/bin

(not tested).

That works. Thanks.

It's an acceptable workaround (the other is installing /usr instead of
/usr/local). Seeing as it worked in 1.5.3.8, does this qualify as
breakage, or should we not worry about it?

Does this patch make a difference? (It does for me.)

Nope. I applied this on top of "maint", removed the PATH setup from / etc/xinetd.d/git, and get the "remote end hung up unexpectedly" again. If I restore the PATH setup then it works, but then, so does does 1.5.4.

Cheers,
Wincent

diff --git a/daemon.c b/daemon.c
index 41a60af..c99285e 100644
--- a/daemon.c
+++ b/daemon.c
@@ -1026,6 +1026,7 @@ int main(int argc, char **argv)
	struct group *group;
	gid_t gid = 0;
	int i;
+	char *cmd_path = strdup(argv[0]), *slash;

	/* Without this we cannot rely on waitpid() to tell
	 * what happened to our children.
@@ -1184,6 +1185,13 @@ int main(int argc, char **argv)
	if (strict_paths && (!ok_paths || !*ok_paths))
		die("option --strict-paths requires a whitelist");

+	slash = strrchr(cmd_path, '/');
+	if (slash) {
+		*slash = 0;
+		setup_path(cmd_path);
+	}
+	free(cmd_path);
+
	if (inetd_mode) {
		struct sockaddr_storage ss;
		struct sockaddr *peer = (struct sockaddr *)&ss;


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux