Re: Careful object writing..
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 3, 2005, 23:22 UTC
- Message-ID
- <Pine.LNX.4.58.0505031618360.26698@ppc970.osdl.org>
- In-Reply-To
- <81b0412b05050316045fa31c2a@mail.gmail.com>
On Wed, 4 May 2005, Alex Riesen wrote:
Show 5 quoted lines
> > On 5/3/05, Linus Torvalds <torvalds@osdl.org> wrote: > > I also change the permission to 0444 before it gets its final name. > > Maybe umask it first? Just in case.
I considered it, but it's not worth it.
If you don't want somebody else to see your objects, you should just disable execute permission on your .git directory. "umask" is actually a fairly nasty interface, since it takes effect on create(), and we do want to fchmod _after_ the create (some filesystems don't like it when you create a non-writable object and then write to it, but more importantly, since we use "mkstemp()" for the temp-file handling, we don't even have control of the initial umask.
So to make it (0444 & umask) git would actually have to jump through silly hoops. Without actually buying you anything new, since the access permissions for git objects really are about the _directory_ anyway.
Linus