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

Re: [PATCH v4 2/4] githooks.txt: Amend dangerous advice about 'update' hook ACL

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 26, 2016, 19:49 UTC
Message-ID
<xmqqmvogf8w7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1461694402-9629-3-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
> Any ACL you implement via an 'update' hook isn't actual access control
> if the user has login access to the machine running git, because they
> can trivially just built their own git version which doesn't run the
s/built their own git version/build their own version of git/;
Show 30 quoted lines
> hook.
>
> Change the documentation to take this dangerous edge case into account,
> and remove the mention of the advice originating on the mailing list,
> the users reading this don't care where the idea came up.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Documentation/githooks.txt | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> index 7660b95..9051584 100644
> --- a/Documentation/githooks.txt
> +++ b/Documentation/githooks.txt
> @@ -275,9 +275,11 @@ does not know the entire set of branches, so it would end up
>  firing one e-mail per ref when used naively, though.  The
>  <<post-receive,'post-receive'>> hook is more suited to that.
>  
> -Another use suggested on the mailing list is to use this hook to
> -implement access control which is finer grained than the one
> -based on filesystem group.
> +In an environment that restricts the users' access only to git
> +commands over the wire, this hook can be used to implement access
> +control without relying on filesystem ownership and group
> +membership. See linkgit:git-shell[1] for how you might use the login
> +shell to restrict the user's access to only git commands.
>  
>  Both standard output and standard error output are forwarded to
>  'git send-pack' on the other end, so you can simply `echo` messages
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 of 20 in “githooks.txt improvements + core.hooksDirectory”
  1. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, Apr 26, 2016
  2. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 26, 2016
  3. Junio C HamanoApr 26, 2016
  4. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 26, 2016
  5. Junio C HamanoApr 26, 2016
  6. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 26, 2016
  7. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, Apr 26, 2016
  8. Junio C HamanoApr 26, 2016
  9. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, May 4, 2016
  10. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, May 4, 2016
  11. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, May 4, 2016
  12. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, May 4, 2016
  13. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, May 4, 2016
  14. Junio C HamanoMay 4, 2016
  15. 0/4 githooks.txt improvements + core.hooksDirectoryÆvar Arnfjörð Bjarmason, May 4, 2016
  16. 1/4 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, May 4, 2016
  17. 2/4 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, May 4, 2016
  18. 3/4 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, May 4, 2016
  19. 4/4 hooks: Add ability to specify where the hook directory isÆvar Arnfjörð Bjarmason, May 4, 2016
  20. Junio C HamanoMay 4, 2016

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.