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

Re: [PATCH] wrapper: simplify xmkstemp()

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2025, 14:39 UTC
Message-ID
<xmqqbjkwahu1.fsf@gitster.g>
In-Reply-To
<20251120082328.GD1283645@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
>> > +#define mkstemp(template) git_mkstemp_mode((template), 0600)
>
> So this patch implements what I was thinking, though I probably would
> have made it more explicit: add mkstemp() to the banned list (not
> because it's evil but because it's unportable) and force callers to use
> git_mkstemp_mode() explicitly.

Because only a very small number (one?) of callers call mkstemp() in the current code, the above is probably a good thing to do.

Previous: Jeff KingNext: René Scharfe
Message 7 of 9 in “wrapper: simplify xmkstemp()”
  1. wrapper: simplify xmkstemp()René Scharfe, Nov 17, 2025
  2. Junio C HamanoNov 17, 2025
  3. Jeff KingNov 18, 2025
  4. René ScharfeNov 18, 2025
  5. Junio C HamanoNov 18, 2025
  6. Jeff KingNov 20, 2025
  7. Junio C HamanoNov 20, 2025
  8. René ScharfeNov 22, 2025
  9. René ScharfeNov 22, 2025

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.