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

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

From
MWMark Wooding <mdw@distorted.org.uk>
Date
Feb 4, 2006, 10:02 UTC
Message-ID
<slrndu8utr.2i8.mdw@metalzone.distorted.org.uk>
In-Reply-To
<7vr76kcggx.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> 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.

Show 6 quoted lines
> 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]
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 13 in “git-daemon hacking”
  1. 0/3 git-daemon hackingMark Wooding, Feb 3, 2006
  2. 1/3 daemon: Provide missing argument for logerror() call.Mark Wooding, Feb 3, 2006
  3. 2/3 daemon: Set SO_REUSEADDR on listening sockets.Mark Wooding, Feb 3, 2006
  4. Junio C HamanoFeb 3, 2006
  5. Junio C HamanoFeb 4, 2006
  6. Mark WoodingFeb 4, 2006
  7. 3/3 daemon: Support a --user-path option.Mark Wooding, Feb 3, 2006
  8. Junio C HamanoFeb 3, 2006
  9. Junio C HamanoFeb 4, 2006
  10. Mark WoodingFeb 4, 2006
  11. Junio C HamanoFeb 4, 2006
  12. Mark WoodingFeb 4, 2006
  13. Junio C HamanoFeb 4, 2006

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.