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

Re: Reason for objects still being written with a failing pre-receive hook?

From
Johan Sørensen <johan@johansorensen.com>
Date
Jun 24, 2009, 14:36 UTC
Message-ID
<9e0f31700906240736r50d2de51kc50822619ec619fa@mail.gmail.com>
In-Reply-To
<20090624135713.GE11191@spearce.org>
On Wed, Jun 24, 2009 at 3:57 PM, Shawn O. Pearce<spearce@spearce.org> wrote:
Show 8 quoted lines
> Johan S?rensen <johan@johansorensen.com> wrote:
>> I'm wondering what the reason is that objects are still being stored,
>> despite a non-zero exit code from the pre-receive hook?
>
> The pre-receive hook is allowed to inspect the objects that have
> been uploaded in order to make its access decision.  Thus those
> objects must have been unpacked (or indexed into a new pack) so
> git commands in the pre-receive hook can read them.
Yeah, noticed that after I started digging into the code a bit
Show 6 quoted lines
>> If it's expected and accepted behaviour, what other options do I have
>> to prevent a scenario like the above?
>
> There currently isn't a way to stop this, other than to use something
> in front of git-receive-pack, e.g. Gitosis, to deny even forking
> the receive-pack binary for the user.

Well, I already wrote such a thing (Gitorious.org) but I want to take the auth a little bit further and offer some more fine-grained access-controls and discovered the above during some smoke testing.

>
> --
> Shawn.

Thanks JS

Previous: Shawn O. Pearce
Message 3 of 3 in “Reason for objects still being written with a failing pre-receive hook?”
  1. Johan SørensenJun 24, 2009
  2. Shawn O. PearceJun 24, 2009
  3. Johan SørensenJun 24, 2009

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.