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

Re: [PATCH] Adding hooks.directory config option; wiring into run_hook

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2011, 19:23 UTC
Message-ID
<7viplgiamn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vmxasie6k.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Christopher Dale <chrelad@gmail.com> writes:
>
>> ...
>> trusted path execution policies. These systems require that any file
>> that can be executed exhibit at least the following characteristics:
>>
>>   * The executable, it's directory, and each directory above it are
>>     not writable.
>> 
>> Since the hooks directory is within a directory that by it's very nature
>> requires write permissions,...
>
> Sorry, but I am not interested at all. If you can write into $GIT_DIR/config
> then you can point at any directory with hooks.directory and that would mean
> it would defeat your "trusted path execution policies".

I was about to follow-up with "the only option that may make sense in such an environment may be to disable hooks", but after thinking about it more, if somebody enables hooks, the environment will make sure that they will fail to execute, and it would be an incentive enough for people to disable them. IOW, no need to have such an option, even.

Previous: Christopher DaleNext: Aaron Schrab
Message 4 of 6 in “Adding hooks.directory config option; wiring into run_hook”
  1. Adding hooks.directory config option; wiring into run_hookChristopher Dale, Dec 16, 2011
  2. Junio C HamanoDec 16, 2011
  3. Christopher DaleDec 16, 2011
  4. Junio C HamanoDec 16, 2011
  5. Aaron SchrabDec 17, 2011
  6. Aaron SchrabDec 17, 2011

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.