git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johan Sørensen" <johan@johansorensen.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: Reason for objects still being written with a failing pre-receive  hook?
Date: Wed, 24 Jun 2009 16:36:38 +0200	[thread overview]
Message-ID: <9e0f31700906240736r50d2de51kc50822619ec619fa@mail.gmail.com> (raw)
In-Reply-To: <20090624135713.GE11191@spearce.org>

On Wed, Jun 24, 2009 at 3:57 PM, Shawn O. Pearce<spearce@spearce.org> wrote:
> 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

>> 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

      reply	other threads:[~2009-06-24 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 13:21 Reason for objects still being written with a failing pre-receive hook? Johan Sørensen
2009-06-24 13:57 ` Shawn O. Pearce
2009-06-24 14:36   ` Johan Sørensen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e0f31700906240736r50d2de51kc50822619ec619fa@mail.gmail.com \
    --to=johan@johansorensen.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).