Re: Today's 'master' leaves .idx/.pack in 0400
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Apr 22, 2007, 19:29 UTC
- Message-ID
- <alpine.LFD.0.98.0704221225300.9964@woody.linux-foundation.org>
- In-Reply-To
- <7vd51wmd1a.fsf@assigned-by-dhcp.cox.net>
On Sun, 22 Apr 2007, Junio C Hamano wrote:
> > How about this as a replacement (hot off the press -- still > running the tests).
Looks good, but..
> + mode_t mode = umask(0); > + > + umask(mode); > + mode = 0666 & ~mode;
I would really suggest just defaulting to
mode = 0444 & ~mode;
since there simply is never any reason to allow a writable pack-file.
The fact that we have some tests that try to corrupt a pack-file is not really a reason. Just make them do "chmod +w" before corrupting it.
But your patch is an obvious improvement regardless, so I certainly don't think this is a *big* issue.
Linus