Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:07

"H. Peter Anvin" [off-list ref] writes:
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.
+	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help