git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 2/4] mingw: drop Windows 7-specific work-around
Date: Mon, 4 Aug 2025 10:54:54 +0200	[thread overview]
Message-ID: <aJB1Xkr09XNjb-ON@ugly> (raw)
In-Reply-To: <6b4f062d82a80d82eb927cda7304d053b2984aba.1754256318.git.gitgitgadget@gmail.com>

On Sun, Aug 03, 2025 at 09:25:16PM +0000, Johannes Schindelin via GitGitGadget wrote:
>From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
>In ac33519ddfa8 (mingw: restrict file handle inheritance only on Windows
>7 and later, 2019-11-22), I introduced code to safe-guard the
>defense-in-depth handling that restricts handles' inheritance so that it
>would work with Windows 7, too.
>
>Let's revert this patch: Git for Windows dropped supporting Windows 7 (and
>Windows 8) directly after Git for Windows v2.46.2.
>
it doesn't follow from this why it's apparently ok to remove this for 
even newer versions.

>+	 * On the off-chance that something with the file handle restriction
>+	 * went wrong, silently fall back to trying without it.
> 	 */
>+	if (!ret && stdhandles_count) {
>
the comment should really spell out what that off chance is, so one 
doesn't have to check the log.

it may also make sense to elaborate why just dropping the restrictions 
isn't a problem - my first thought is "huh, doesn't this open the door 
for security holes, at least theoretically?"


  reply	other threads:[~2025-08-04  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-03 21:25 [PATCH 0/4] mingw: rename and open fixes Johannes Schindelin via GitGitGadget
2025-08-03 21:25 ` [PATCH 1/4] mingw_open_existing: handle directories better Matthias Aßhauer via GitGitGadget
2025-08-03 21:25 ` [PATCH 2/4] mingw: drop Windows 7-specific work-around Johannes Schindelin via GitGitGadget
2025-08-04  8:54   ` Oswald Buddenhagen [this message]
2025-08-03 21:25 ` [PATCH 3/4] mingw_rename: support ReFS on Windows 2022 Johannes Schindelin via GitGitGadget
2025-08-03 21:25 ` [PATCH 4/4] mingw: support Windows Server 2016 again Johannes Schindelin via GitGitGadget
2025-08-04  1:29 ` [PATCH 0/4] mingw: rename and open fixes Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJB1Xkr09XNjb-ON@ugly \
    --to=oswald.buddenhagen@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).