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

Re: [PATCH 3/3] daemon: Support a --user-path option.

From: Mark Wooding <hidden>
Date: 2016-06-15 22:42:18

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] wrote:
I am probably slow as usual but I do not see how this is useful.
I don't want the git-daemon roaming all over the file system.  Partly,
as a systems administrator, it makes me nervous about security (not for
any particularly good reason, I admit), but mainly because I don't want
to be exposing my local filesystem structure in my git://... namespace
-- it just seems like a bad idea.  This is what --base-path is all about.

I do still want users to be able to publish their repositories.  But I
also don't want git-daemon wandering all over their home directories --
restriction to sensible places is what --base-path is for, after all.
Wouldn't loosening the "request must be absolute if you use
--base-path" check in the area your first patch in the series
touches to also allow paths that start with a '~' be enough?
That way ~alice/foo would remain to be /home/alice/foo (with
/home/alice being alice's $HOME) and ~becky/bar would be
/home2/becky/bar (with /home2/becky being becky's $HOME).
That would still expose the structure of everyone's home directories in
git://~user URLs, which is rather unfortunate.  It's better than
nothing, though.
I suppose you are doing something similar to ~/public_html, but
I think that is an independent feature.
This is what I'm after, yes.  The above can be achieved
straightforwardly with --user-path=. if that's what you actually wanted.
(Indeed, --user-path= works too, but this is harder to explain.)

I think I'd probably either run with --user-path=public-git or
--user-path=public_html/git -- I've not made my mind up.

-- [mdw]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help