Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 09.07.2014 22:00, schrieb Eric Wong:
> Torsten Bögershausen <tboegi@xxxxxx> wrote:
>> (And why is it  "& 07777" and not  "& 0777")
> 
> This is to preserve the uncommon sticky/sgid/suid bits.  Probably not
> needed, but better to keep as much intact as possible.
> 
>> Can we avoid the fchmod()  all together ?
> 
> For single-user systems, sure.
> 
> For multi-user systems with git-imap-send users and passwords in
> $GIT_CONFIG, I suggest not.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

The Windows fchmod() problem is easily solved by using chmod() instead of
fchmod(). The file name is known in both cases (and even used in the error
message).

However, IMO there are more fundamental problems with your patch (not
related to Windows):

1.) Permissions of files in .git are controlled by the core.sharedRepository
setting, and your patch seems to break that (i.e. if someone accidentally
has made .git/config world readable, git-config no longer fixes that, even
if core.sharedRepository=0600).

2.) Sensitive data such as passwords doesn't belong in config files in the
first place, that's what git-credentials is good for.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]