Subject: Re: [PATCH 0/2] Don't make $GIT_DIR executable

From: Michael Haggerty <[email-masked]>
Date: Sun, 16 Nov 2014 07:14:21 +0100

On 11/15/2014 08:50 AM, Eric Wong wrote:
> Michael Haggerty <[email-masked]> wrote:
>> Michael Haggerty (2):
>>   create_default_files(): don't set u+x bit on $GIT_DIR/config
>>   config: clear the executable bits (if any) on $GIT_DIR/config
> 
> Thanks, I should've noticed this earlier :x
> Tested-by: Eric Wong <[email-masked]>
> 
> Since the damage is done, perhaps removing +x from $GIT_DIR/config on
> _any_ git operation would be appropriate.

I believe that the u+x bit on the config file should be pretty harmless.
Nobody is likely to try to execute their config files, and even if they
do, the file contents are unlikely to resemble a script enough to do
anything bad.

So my feeling is that it is unnecessary to make every git invocation try
to remove the u+x bit on the file. Thus I'd rather skip the code clutter
and extra system call, limiting cleanup attempts to when the config file
is being rewritten anyway.

But if other people are more alarmed than I am about having executable
config files, I could certainly be persuaded that the extra effort is
justified.

Michael

-- 
Michael Haggerty
[email-masked]