git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git pull aborts in 50% of cases

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Dec 3, 2005, 04:22 UTC
Message-ID
<43911D9E.5030803@zytor.com>
In-Reply-To
<7vu0dq29wg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 29 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> 
>>>0.99.9k is clearly bad.
>>
>>Huh? It could be slower, and it could therefore hit the maximum client 
>>count faster, but it should not be bad.
>>
>>All changes to pull were done in a manner so as to be backward compatible. 
>>In both ways.
> 
> 
> I do not think the fetch-pack common computation changes is
> involved in this problem at all.
> 
> What is suspect is the repository validity check code,
> specifically (quoting from diff between 0.99.9j and 0.99.9k
> daemon.c::path_ok() function):
> 
> +               /* The validation is done on the paths after enter_repo
> +                * canonicalization, so whitelist should be written in
> +                * terms of real pathnames (i.e. after ~user is expanded
> +                * and symlinks resolved).
> +                */
> 
> I suspect (but have not heard back from HPA to confirm) that
> kernel.org runs git-daemon with /pub/scm as the whitelist, but
> there is a symbolic link (or bind mount?) involved, and the real
> path checked based on getcwd() return value is somewhere else.

/pub is a symbolic link. We shouldn't rely on getcwd() for this kind of stuff; it's bad for a whole bunch of reasons.

	-hpa
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 17 in “git pull aborts in 50% of cases”
  1. Alexey DobriyanDec 2, 2005
  2. H. Peter AnvinDec 2, 2005
  3. Alexey DobriyanDec 2, 2005
  4. H. Peter AnvinDec 2, 2005
  5. Junio C HamanoDec 2, 2005
  6. Johannes SchindelinDec 3, 2005
  7. Junio C HamanoDec 3, 2005
  8. H. Peter AnvinDec 3, 2005
  9. Junio C HamanoDec 3, 2005
  10. H. Peter AnvinDec 3, 2005
  11. [RFC] daemon whitelist handling (Re: git pull aborts in 50% of cases)Junio C Hamano, Dec 3, 2005
  12. H. Peter AnvinDec 3, 2005
  13. Linus TorvaldsDec 3, 2005
  14. Junio C HamanoDec 3, 2005
  15. Junio C HamanoDec 3, 2005
  16. Junio C HamanoDec 3, 2005
  17. H. Peter AnvinDec 3, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.