<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/daemon.c, branch v1.0rc6</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.0rc6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.0rc6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2005-12-04T07:17:42Z</updated>
<entry>
<title>[PATCH] daemon.c and path.enter_repo(): revamp path validation.</title>
<updated>2005-12-04T07:17:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-12-03T09:45:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d79374c7b58d3814ffdc277de608243f8e665e3a'/>
<id>urn:sha1:d79374c7b58d3814ffdc277de608243f8e665e3a</id>
<content type='text'>
The whitelist of git-daemon is checked against return value from
enter_repo(), and enter_repo() used to return the value obtained
from getcwd() to avoid directory aliasing issues as discussed
earier (mid October 2005).

Unfortunately, it did not go well as we hoped.

For example, /pub on a kernel.org public machine is a symlink to
its real mountpoint, and it is understandable that the
administrator does not want to adjust the whitelist every time
/pub needs to point at a different partition for storage
allcation or whatever reasons.  Being able to keep using
/pub/scm as the whitelist is a desirable property.

So this version of enter_repo() reports what it used to chdir()
and validate, but does not use getcwd() to canonicalize the
directory name.  When it sees a user relative path ~user/path,
it internally resolves it to try chdir() there, but it still
reports ~user/path (possibly after appending .git if allowed to
do so, in which case it would report ~user/path.git).

What this means is that if a whitelist wants to allow a user
relative path, it needs to say "~" (for all users) or list user
home directories like "~alice" "~bob".  And no, you cannot say
/home if the advertised way to access user home directories are
~alice,~bob, etc.  The whole point of this is to avoid
unnecessary aliasing issues.

Anyway, because of this, daemon needs to do a bit more work to
guard itself.  Namely, it needs to make sure that the accessor
does not try to exploit its leading path match rule by inserting
/../ in the middle or hanging /.. at the end.  I resurrected the
belts and suspender paranoia code HPA did for this purpose.

This check cannot be done in the enter_repo() unconditionally,
because there are valid callers of enter_repo() that want to
honor /../; authorized users coming over ssh to run send-pack
and fetch-pack should be allowed to do so.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>git-daemon not listening when compiled with -DNO_IPV6</title>
<updated>2005-11-21T22:36:43Z</updated>
<author>
<name>Paul Serice</name>
<email>paul@serice.net</email>
</author>
<published>2005-11-21T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f35230fb1123a0db4776c574a874aecec1f38db8'/>
<id>urn:sha1:f35230fb1123a0db4776c574a874aecec1f38db8</id>
<content type='text'>
git-daemon was not listening when compiled with -DNO_IPV6.
socksetup() was not returning socket count when compiled with -DNO_IPV6.

Signed-off-by: Paul Serice &lt;paul@serice.net&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>daemon: further tweaks.</title>
<updated>2005-11-21T21:47:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-21T09:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ce335fe04f32261e0204280281989ffbb5d990c6'/>
<id>urn:sha1:ce335fe04f32261e0204280281989ffbb5d990c6</id>
<content type='text'>
 - Do validation only on canonicalized paths
 - Run upload-pack with "." as repository argument

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>git-daemon support for user-relative paths.</title>
<updated>2005-11-21T21:47:00Z</updated>
<author>
<name>Andreas Ericsson</name>
<email>exon@op5.se</email>
</author>
<published>2005-11-17T19:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4dbd13527933261076bbed1a5a2daa60a752d096'/>
<id>urn:sha1:4dbd13527933261076bbed1a5a2daa60a752d096</id>
<content type='text'>
Dropped a fair amount of reundant code in favour of the library code
in path.c

Added option --strict-paths with documentation, with backwards
compatibility for whitelist entries with symlinks.

Everything that worked earlier still works insofar as I have
remembered testing it.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>daemon.c: fix arg parsing bugs</title>
<updated>2005-11-17T04:34:26Z</updated>
<author>
<name>Andreas Ericsson</name>
<email>exon@op5.se</email>
</author>
<published>2005-11-16T23:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a8883288fa1240996a9c5715e060a88a03796fe0'/>
<id>urn:sha1:a8883288fa1240996a9c5715e060a88a03796fe0</id>
<content type='text'>
Allow --init-timeout and --timeout to be specified without falling
through to usage().

Make sure openlog() is called even if implied by --inetd, or messages
will be sent to wherever LOG_USER ends up.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>git-daemon: --inetd implies --syslog</title>
<updated>2005-11-15T08:19:32Z</updated>
<author>
<name>Andreas Ericsson</name>
<email>exon@op5.se</email>
</author>
<published>2005-11-14T16:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=bce8230d5d897a738cc004954df71f50a40295db'/>
<id>urn:sha1:bce8230d5d897a738cc004954df71f50a40295db</id>
<content type='text'>
Otherwise nothing is logged anywhere, which is a Bad Thing.

Signed-off-by: Andreas Ericsson &lt;ae@op5.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>fix daemon.c to compile on OpenBSD</title>
<updated>2005-10-26T00:37:59Z</updated>
<author>
<name>Randal L. Schwartz</name>
<email>merlyn@stonehenge.com</email>
</author>
<published>2005-10-25T23:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=979e32fa1483a32faa4ec331e29b357e5eb5ef25'/>
<id>urn:sha1:979e32fa1483a32faa4ec331e29b357e5eb5ef25</id>
<content type='text'>
I can confirm that the following patch lets the current origin
compile on OpenBSD.  If you could apply this until you sort out the
rest of the namespace issue, I would be happy.  Thanks.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes'</title>
<updated>2005-10-21T06:21:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-10-21T06:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4ae22d96fe9248dac4f26b1fc91154ba5e879799'/>
<id>urn:sha1:4ae22d96fe9248dac4f26b1fc91154ba5e879799</id>
<content type='text'>
</content>
</entry>
<entry>
<title>daemon.c: remove trailing whitespace.</title>
<updated>2005-10-21T06:19:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-10-21T06:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a935c3972749095e7ea6c341e539a94de705ecfd'/>
<id>urn:sha1:a935c3972749095e7ea6c341e539a94de705ecfd</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Fix git-daemon argument-parsing bug</title>
<updated>2005-10-21T05:46:03Z</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2005-10-21T01:34:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=54e31a205c63d8bc8cd3dcf6956f81d3b968ea48'/>
<id>urn:sha1:54e31a205c63d8bc8cd3dcf6956f81d3b968ea48</id>
<content type='text'>
Fix stupid bug in parsing the --init-timeout option.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
