From: Andreas Ericsson <ae@op5.se>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 5/5] git-daemon support for user-relative paths.
Date: Mon, 21 Nov 2005 12:10:48 +0100 [thread overview]
Message-ID: <4381AB38.7090209@op5.se> (raw)
In-Reply-To: <7vfypquz88.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Andreas Ericsson <ae@op5.se> writes:
>
>
>>I'll run the clone/fetch/push test-suite again tomorrow, with this
>>applied. It looks good though.
>
>
> Sorry, but there was a thinko in my butchered version of
> enter_repo(). While allowing only absolute path was good for
> the version with your daemon.c change, it was not with the
> current one that runs upload-pack with "." as repo. In either
> case we _do_ chdir() to it after validating the path, so I am
> wondering if it is a good idea to keep sending "." as repo when
> executing upload-pack with this patch as well.
It might be, and it's good since it prevents the otherwise possible race
that occurs when git-upload-pack chdir()'s again.
> This does not
> make any practical difference, but I think it makes the intent
> clearer -- "we are already there so do not try going anywhere
> else".
>
So enter_repo allows "." (exactly and without chdir()) and all paths
starting with '/' if strict?
> So I am thinking about applying something like this patch
> on top of the last part of your patch.
>
> - Do validation only on canonicalized paths;
> - Run upload-pack with "." as repo, not full path;
> - allow trailing slash under --strict-paths i.e. "git://host/my/repo.git/"
>
> What do you think?
>
Apart from comments and indentation it's more or less exactly what I
have in my revised git-daemon patch (although without what you mentioned
in your own reply to this mail).
Do you want the revised one from me or will you apply the original with
this on top?
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2005-11-21 11:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-17 19:37 [PATCH 5/5] git-daemon support for user-relative paths Andreas Ericsson
2005-11-18 0:49 ` Junio C Hamano
2005-11-18 10:18 ` Andreas Ericsson
2005-11-18 17:57 ` Matthias Urlichs
2005-11-18 20:41 ` H. Peter Anvin
2005-11-18 21:13 ` Junio C Hamano
2005-11-18 23:19 ` Junio C Hamano
2005-11-18 23:45 ` Andreas Ericsson
2005-11-21 9:28 ` Junio C Hamano
2005-11-21 9:49 ` Junio C Hamano
2005-11-21 11:10 ` Andreas Ericsson [this message]
2005-11-21 23:29 ` Junio C Hamano
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=4381AB38.7090209@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).