Re: what are the chances of a 'pre-upload' hook?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2011, 23:13 UTC
- Message-ID
- <7vr50uwk7x.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20111126225519.GA29482@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Bob could run a specialized server for (b) that listens on a unix socket > and triggers his hook. But why? Why not just do the whole thing over > git-daemon or smart http, which already exist?
If that "whole thing" is "to allow an arbitrary code to run anywhere as incoming user", I would apply the "why?" to a different part of the statemennt. Why allow running an arbitrary code at all?
Running things as Bob with setuid is not a solution, either.
A pre-anything hook wants to see if the accessing user, not the owner of the repository, can or cannot do something to the repository and decide what to do.