Re: [PATCH 4/4] Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Feb 19, 2010, 23:19 UTC
- Message-ID
- <vpq7hq8stjt.fsf@bauges.imag.fr>
- In-Reply-To
- <1266597207-32036-5-git-send-email-Matthieu.Moy@imag.fr>
Junio C Hamano <gitster@pobox.com> writes:
> By not using mkstemp() from the platform but having our own would allow us > to not even worry about this issue (this can be seen by the removal of a > call to umask() in [PATCH 4/4]).
Exactly. BTW, we probably want to do the same for object files. The problem is less important since object files are created 0444, and therefore do not break ACLs, but that would at least increase consistancy a bit.
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 6 quoted lines
> - > + /* > + * we let the umask do it's job, don't try to be more > + * restrictive. > + */ > + int mode = 0666;
Actually, it may be safer to put 0444 here. With my patch, git still creates read-only pack files, but to be honnest, I don't understand which piece of code cuts the 'w' bit!
New patch serie comming with additional patches for the first point, and a corrected [PATCH 4] for the second.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/