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

Re: git-daemon: path validation, export all option

From
Junio C Hamano <junkio@cox.net>
Date
Sep 27, 2005, 04:19 UTC
Message-ID
<7vslvr6t1u.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<4338AACC.1050305@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
Show 6 quoted lines
> A first attempt to make git-daemon a bit more suitable for kernel.org 
> use: it allows the user to specify a whitelist of directories, rejects 
> paths which have . or .. in them (to avoid bypassing the whitelist), and 
> allows for an --export-all option.
>
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>

I understand the motivation behind --export-all and directory whitelist and these changes look good. Thanks.

Show 7 quoted lines
> +	if ( ok_paths && *ok_paths ) {
> +		int ok = 0;
> +...
> +	}
> +
> +	return 1;		/* Path acceptable */
> +}

A microNit. You could lose 'int ok' and return 1 directly where you assign 1 to it and break.

> -	chdir(".git");

I am unsure about this removal of "minor convenience feature". Although I do not think git-daemon is widely used on the field, this change breaks existing setup if there is any.

Previous: H. Peter AnvinNext: Anton Altaparmakov
Message 2 of 7 in “git-daemon: path validation, export all option”
  1. H. Peter AnvinSep 27, 2005
  2. Junio C HamanoSep 27, 2005
  3. Anton AltaparmakovSep 27, 2005
  4. H. Peter AnvinSep 27, 2005
  5. Junio C HamanoSep 27, 2005
  6. Linus TorvaldsSep 27, 2005
  7. H. Peter AnvinSep 27, 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.