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

Re: [gitolite] symlink hooks instead of copying them

From
MKmartin f krafft <madduck@madduck.net>
Date
Feb 4, 2010, 04:13 UTC
Message-ID
<20100204041318.GD13411@lapse.rw.madduck.net>
In-Reply-To
<20100204032239.GA5429@atcmail.atc.tcs.com>
also sprach Sitaram Chamarty <sitaram@atc.tcs.com> [2010.02.04.1622 +1300]:
Show 8 quoted lines
> > Wouldn't it thus make sense to check during authentication that
> > the symlink exists and points to the right file, and to deny
> > access completely if that isn't the case?
> 
> Yeah I guess that's easy enough really... just need to include
> a way to tell the code what is the right file to point to.
> (Currently it's all inside $GL_ADMINDIR but in the APT case that
> may not be true...?)

How about comparing the hash sums of where you think the file is? This would also ensure that repo access was disallowed if the hook hasn't been upgraded without symlinks (though I think the symlinks are still better than copies, and more expressive too). Does that fit your level of security-paranoia? ;)

About the APT case — leave that to us. If we distribute gitolite from /usr/share/gitolite, then we'll probably be patching the entire source anyway. Obviously, if it proves viable, then it might make sense to bring back that functionality and have it configurable at install or runtime.

Show 6 quoted lines
> This has to work on systems that don't even have bash (like plain
> old sh personality of ksh), leave alone zsh :)
> 
> Not saying it's hard; just a "find" in backticks.  I'd still
> rather put it inside the perl code somewhere that already gets run
> anyway, as it is now...
No objection.
Thanks!
-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
tempt not a desperate man.
                                                -- william shakespeare
 
spamtraps: madduck.bogus@madduck.net
Previous: Sitaram ChamartyNext: Bill Lear
Message 6 of 8 in “[gitolite] symlink hooks instead of copying them”
  1. martin f krafftFeb 3, 2010
  2. Sitaram ChamartyFeb 4, 2010
  3. Sitaram ChamartyFeb 4, 2010
  4. martin f krafftFeb 4, 2010
  5. Sitaram ChamartyFeb 4, 2010
  6. martin f krafftFeb 4, 2010
  7. Bill LearFeb 4, 2010
  8. martin f krafftFeb 4, 2010

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.