git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Next: Matthieu Moy
Message 1 of 11 in “Re: [PATCH 4/4] Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.”
  1. Matthieu MoyFeb 19, 2010
  2. 1/6 Add a testcase for ACL with restrictive umask.Matthieu Moy, Feb 19, 2010
  3. 2/6 Move gitmkstemps to path.cMatthieu Moy, Feb 19, 2010
  4. 3/6 git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.Matthieu Moy, Feb 19, 2010
  5. Junio C HamanoFeb 20, 2010
  6. 4/6 Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.Matthieu Moy, Feb 19, 2010
  7. 5/6 git_mkstemps_mode: don't set errno to EINVAL for any error.Matthieu Moy, Feb 19, 2010
  8. Junio C HamanoFeb 20, 2010
  9. Matthieu MoyFeb 22, 2010
  10. Junio C HamanoFeb 22, 2010
  11. 6/6 Use git_mkstemp_mode instead of plain mkstemp to create object filesMatthieu Moy, Feb 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.