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

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

From
Jacob Keller <jacob.keller@gmail.com>
Date
Apr 24, 2016, 20:32 UTC
Message-ID
<CA+P7+xqveyG7RTWb2k8UsFWRwjvM6JJkveRr3NV-bammqSkpkQ@mail.gmail.com>
In-Reply-To
<1461529229-15222-2-git-send-email-avarab@gmail.com>

On Sun, Apr 24, 2016 at 1:20 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 30 quoted lines
> 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
> 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 | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> index 2f3caf7..e9d169e 100644
> --- a/Documentation/githooks.txt
> +++ b/Documentation/githooks.txt
> @@ -275,9 +275,13 @@ 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.
> +Another use for this hook to implement access control which is finer
> +grained than the one based on filesystem group. Note that if the user
> +pushing has a normal login shell on the machine receiving the push
> +implementing access control like this can be trivially bypassed by
> +just using not executing the hook. In those cases consider using
"by just using not executing the hook."

This grammar doesn't make sense. It doesn't quite match what you said in the commit message either.

Show 12 quoted lines
> +e.g. linkgit:git-shell[1] as the login shell to restrict the user's
> +access.
>
>  Both standard output and standard error output are forwarded to
>  'git send-pack' on the other end, so you can simply `echo` messages
> --
> 2.1.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 of 17 in “githooks.txt: Improve the intro section”
  1. 1/3 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 24, 2016
  2. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 24, 2016
  3. Jacob KellerApr 24, 2016
  4. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 24, 2016
  5. Junio C HamanoApr 25, 2016
  6. Ævar Arnfjörð BjarmasonApr 26, 2016
  7. 3/3 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 24, 2016
  8. Junio C HamanoApr 25, 2016
  9. Ævar Arnfjörð BjarmasonApr 26, 2016
  10. Eric SunshineApr 25, 2016
  11. 0/3 Improvements to githooks.txt documentationÆvar Arnfjörð Bjarmason, Apr 25, 2016
  12. 1/3 githooks.txt: Improve the intro sectionÆvar Arnfjörð Bjarmason, Apr 25, 2016
  13. 2/3 githooks.txt: Amend dangerous advice about 'update' hook ACLÆvar Arnfjörð Bjarmason, Apr 25, 2016
  14. 3/3 githooks.txt: Minor improvements to the grammar & phrasingÆvar Arnfjörð Bjarmason, Apr 25, 2016
  15. Junio C HamanoApr 25, 2016
  16. Junio C HamanoApr 25, 2016
  17. Ævar Arnfjörð BjarmasonApr 26, 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.