Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-17 Thread Johannes Schindelin
Hi Jeremy, On Mon, 7 Jul 2025, Jeremy Drake wrote: > On Mon, 7 Jul 2025, Johannes Schindelin wrote: > > > fix by a regression test in `winsup/testsuite/`? > > > > For several days, I tried to find a way to reproduce a way to reproduce > > the SSH hang using combi

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-07 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Jul 2025, Takashi Yano wrote: > On Thu, 3 Jul 2025 11:15:44 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Thu, 3 Jul 2025, Takashi Yano wrote: > > > > > I noticed this patch needs additional fix. Please apply also > > > h

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-03 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Jul 2025, Takashi Yano wrote: > On Tue, 1 Jul 2025 14:01:45 +0200 (CEST) > Johannes Schindelin wrote: > > > > thank you so much for this patch! I released a new Git for Windows > > version including it: > > https://github.com/git-for-wi

Re: [PATCH] Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread

2025-07-01 Thread Johannes Schindelin
s: 746c8116dd4f ("Cygwin: console: Allow pasting very long text input.") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano > --- > winsup/cygwin/fhandler/console.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/winsup/

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (Drop using chunk)

2025-06-30 Thread Johannes Schindelin
conflicts with the SSH hang fix (because you dug deeper and identified a different part of the code as needing to be fixed), I'd be very happy if you fast-tracked this patch. Thank you, Johannes > > Reviewed-by: Johannes Schindelin > Signed-off-by: Takashi Yano > --- > wins

Re: [PATCH v2 3/3] Cygwin: pipe: Make pipe_data_available() return PDA_UNKNOWN

2025-06-30 Thread Johannes Schindelin
Hi Takashi, On Fri, 27 Jun 2025, Takashi Yano wrote: > ... rather than 1 when the pipe space estimation fails, so that > select() and raw_wrie() can perform appropriate fallback handling. > In select(), even if pipe space is unknown, return writable to avoid > deadlock. Even with select() return

Re: [PATCH v2 1/3] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-30 Thread Johannes Schindelin
rformed > even if NtQueryInformationFile() returns non-zero value so that > the amount of the writable space in the pipe is always estimated > correctly. > > Addresses: https://github.com/git-for-windows/git/issues/5682 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode t

Re: [PATCH v2 2/3] Cygwin: pipe; Update source comment align with previous commit

2025-06-30 Thread Johannes Schindelin
Hi Takashi, while I usually would like code comments to be in sync with the code (and therefore have it be changed in the same commit), in this instance I totally agree that it made sense to refactor them out into their own patch because they are quite extensive and would otherwise have drowned ou

Re: [PATCH] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-30 Thread Johannes Schindelin
Hi Takashi, On Fri, 27 Jun 2025, Takashi Yano wrote: > On Fri, 27 Jun 2025 12:25:18 +0200 (CEST) > Johannes Schindelin wrote: > > > > Also, pipe_data_available() returns PDA_UNKNOWN rather than 1 when the > > > pipe space estimation fails so that select()

Re: [PATCH] Cygwin: pipe: Fix SSH hang with non-cygwin pipe reader

2025-06-27 Thread Johannes Schindelin
unrelated? Would this not rather be in a separate patch, to make it substantially easier to review for correctness? > Addresses: https://github.com/git-for-windows/git/issues/5682 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode to blocking mode by > default") > Reporte

Re: [PATCH v2] Cygwin: pipe: Fix unexpected blocking mode change by pipe_data_available()

2025-06-26 Thread Johannes Schindelin
ttps://github.com/git-for-windows/git/issues/5682#issuecomment-2997428207 > Fixes: 7ed9adb356df ("Cygwin: pipe: Switch pipe mode to blocking mode by > default") > Reported-by: Andrew Ng (nga888 @github) You may want to use Andrew Ng instead. Other than that, this patch

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (stop to use chunk)

2025-06-26 Thread Johannes Schindelin
Hi Takashi, On Thu, 26 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 14:55:35 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > Reviewed-by: > > > Signed-off-by: Takashi Yano > > > >

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-26 Thread Johannes Schindelin
Hi Takashi, On Thu, 26 Jun 2025, Takashi Yano wrote: > On Thu, 26 Jun 2025 22:59:26 +0900 > Takashi Yano wrote: > > On Thu, 26 Jun 2025 14:22:49 +0900 > > Takashi Yano wrote: > > > On Wed, 25 Jun 2025 17:57:56 +0200 (CEST) > > > Johannes Schindelin wrote: >

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 20:51:02 +0900 > Takashi Yano wrote: > > On Wed, 25 Jun 2025 19:55:34 +0900 > > Takashi Yano wrote: > > > Hi Johannes, > > > > > > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 14:07:15 +0200 (CEST) > Johannes Schindelin wrote: > > Hi Takashi, > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > On Wed, 25 Jun 2025 19:55:34 +0900 > > > Tak

Re: [PATCH v2] Cygwin: pipe: Simplify raw_write() a bit (stop to use chunk)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > Reviewed-by: > Signed-off-by: Takashi Yano This is way too terse. There is a difference between being succinct and leaving things unsaid. Also, please make sure that v2 is a reply to v1 of the patch. I almost commented on v1 by mistake. >

Re: [PATCH] Cygwin: pipe: Fix unexpected blocking mode change by pipe_data_available()

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > pipe_data_available() is called in the raw_write() and if the pipe > is real_non_blocking_mode in raw_write(), the pipe mode can be > accidentally reverted to blocking mode in some cases by calling > pipe_data_available(). Okay, let's unpack

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 07:59:54 +0200 (CEST) > Johannes Schindelin wrote: > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > I found the patch blocks non-blocking write in some condition. > >

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST) > Johannes Schindelin wrote: > > > On Wed, 25 Jun 2025, Johannes Schindelin wrote: > > > > > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > > > &

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > On Wed, 25 Jun 2025 19:55:34 +0900 > Takashi Yano wrote: > > > > On Wed, 25 Jun 2025 09:38:17 +0200 (CEST) > > Johannes Schindelin wrote: > > > > > > On Wed, 25 Jun 2025, Johannes Schindelin

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-25 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Johannes Schindelin wrote: > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > I'd revise the patch as follows. Could you please test if the > > following patch also solves the issue? > > Will do. For the record, in my tests, this fi

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Johannes Schindelin wrote: > On Wed, 25 Jun 2025, Takashi Yano wrote: > > > I found the patch blocks non-blocking write in some condition. > > Could you please describe these conditions? I had _guessed_ from looking at the diff that on

Re: [PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
Hi Takashi, On Wed, 25 Jun 2025, Takashi Yano wrote: > I found the patch blocks non-blocking write in some condition. Could you please describe these conditions? > I'd revise the patch as follows. Could you please test if the > following patch also solves the issue? Will do. Thank you, Johann

[PATCH v2] pipe: fix SSH hang (again)

2025-06-24 Thread Johannes Schindelin
tch). Fixes: cbfaeba4f7 (Cygwin: pipe: Fix incorrect write length in raw_write(), 2024-11-06) Co-authored-by: Takashi Yano Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-ssh-hangs-reloaded-v2 Fetch-It-Via: git fetch https://github.com/d

[PATCH] Cygwin: add release note about `..` symlinks

2025-06-24 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-dotdot-native_symlink-relnote-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-dotdot-native_symlink-relnote-v1 Here you go, sorry for missing that

[PATCH] pipe: fix SSH hang (again)

2025-06-23 Thread Johannes Schindelin
wever, the following `while` loop expects `len - chunk` (which is assigned to `len1`) not to be positive in non-blocking mode. Let's reinstate that clamping logic and implicitly fix this SSH hang. Fixes: cbfaeba4f7 (Cygwin: pipe: Fix incorrect write length in raw_write(), 2024-11-06) Signed-o

[PATCH] symlink_native: allow linking to `..`

2025-06-20 Thread Johannes Schindelin
prefix of the parent directory of the link itself. Let's fix that. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-dotdot-native_symlink-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-dotdot-native_symlink

[PATCH] Cygwin: do retrieve AzureAD users' information again

2025-06-03 Thread Johannes Schindelin
_windows: skip LookupAccountSid for SIDs known to fail, 2025-04-10) intact. Reported-by: Robert Fensterman Fixes: e04891d67a (Cygwin: fetch_account_from_windows: skip LookupAccountSid for SIDs known to fail, 2025-04-10) Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho

Re: [PATCH] Cygwin: console: Store console mode only when console is opened

2025-05-08 Thread Johannes Schindelin
t; Fixes: 0bfd91d57863 ("Cygwin: console: tty::restore really restores the > previous mode") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano Thank you! I can confirm that this re-fixes the problem fixed in 3312f2d21f (Cygwin: console: Redesign mode set strate

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Apr 2025, Takashi Yano wrote: > On Fri, 4 Apr 2025 14:13:57 +0200 (CEST) > Johannes Schindelin wrote: > > On Fri, 4 Apr 2025, Takashi Yano wrote: > > > On Fri, 04 Apr 2025 07:27:09 +0200 Johannes Schindelin wrote: > > > > > > > Is

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Apr 2025, Takashi Yano wrote: > On Fri, 04 Apr 2025 07:27:09 +0200 Johannes Schindelin wrote: > > > Is Jeremy's guess "if raw_write doesn't need to wait (ie, there's room > > in the pipe for the write) it doesn't hit the signal stu

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-03 Thread Johannes Schindelin
-0700 (PDT) Jeremy Drake wrote: > On Thu, 3 Apr 2025, Johannes Schindelin wrote: > > > I still have a question that I would like to be answered in the commit > > message, too: > > > > If `signal_arrived` is only initialized in `fixup_after_fork()` but user > > callbacks

Re: [PATCH] Cygwin: fork: Call pthread::atforkchild () after other initializations

2025-04-03 Thread Johannes Schindelin
Hi Takashi, On Thu, 3 Apr 2025, Takashi Yano wrote: > Previously, the callback registered by pthread_atfork() is called > before _my_tls.fixup_after_fork(). This causes misbehaviour if the > callback uses tls related functions. Due to this problem, subprocess > of cmake (> 3.29.x) sometimes fails

[PATCH] Cygwin: pipe: Fix hang due to inadvertent 0-length raw_write()

2025-03-27 Thread Johannes Schindelin
rrect write length in raw_write()) Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-ninja-hang-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fix-ninja-hang-v1 As per Corinna's requ

Re: [PATCH 0/4] find_fast_cwd_pointer rewrite

2025-03-26 Thread Johannes Schindelin
Hi Jeremy, first of all: thank you for doing this! I had planned on investing some time to figure out a "cheap" way to determine opcode lengths and skip uninteresting ones, and it would invariably have been a lot hackier than the solution you came up with, and I would probably have taken six month

[PATCH] Cygwin: Adjust CWD magic to accommodate for the latest Windows previews

2025-03-01 Thread Johannes Schindelin
rsp`, etc, and focuses on finding the `lea`, `call ntdll!RtlEnterCriticalSection` and `mov ..., rbx` instructions, much like it was prototyped out for ARM64 at https://gist.github.com/jeremyd2019/aa167df0a0ae422fa6ebaea5b60c80c9 Signed-off-by: Johannes Schindelin --- Published-As: https://githu

Re: [PATCH] cygthread: suspend thread before terminating.

2024-11-13 Thread Johannes Schindelin
Hi Jeremy, On Tue, 12 Nov 2024, Jeremy Drake via Cygwin-patches wrote: > From: Jeremy Drake > > This addresses an extremely difficult to debug deadlock when running > under emulation on ARM64. > > A relatively easy way to trigger this bug is to call `fork()`, then within the > child process imme

Re: [PATCH] Cygwin: pipe: Restore blocking mode of read pipe on close()

2024-09-02 Thread Johannes Schindelin
Hi Corinna and Takashi, On Mon, 2 Sep 2024, Corinna Vinschen wrote: > On Aug 30 23:15, Takashi Yano wrote: > > If a cygwin app is executed from a non-cygwin app and the cygwin > > app exits, read pipe remains on non-blocking mode because of the > > commit fc691d0246b9. Due to this behaviour, the

Re: [PATCH] Cygwin: pipe: Give up to use query_hdl for non-cygwin apps.

2024-03-03 Thread Johannes Schindelin
on block in fhandler_pipe::get_query_hdl_per_process. > Therefore, stop to try to get query_hdl for non-cygwin apps. > > Addresses: https://github.com/msys2/msys2-runtime/issues/202 > > Fixes: b531d6b06eeb ("Cygwin: pipe: Introduce temporary query_hdl.") > Reported-

Re: [PATCH] Cygwin: console: Avoid slipping past disable_master_thread check.

2024-02-03 Thread Johannes Schindelin
Hi Takashi, On Sat, 3 Feb 2024, Takashi Yano wrote: > If disable_master_thread flag is set between the code checking that > flag not be set and the code acquiring input_mutex, input record is > processed once after setting disable_master_thread flag. This patch > prevents that. > > Fixes: d4aacd5

Re: [PATCH] Cygwin: console: Fix exit code for non-cygwin process.

2024-02-03 Thread Johannes Schindelin
Hi Takashi, On Sat, 3 Feb 2024, Johannes Schindelin wrote: > On Fri, 2 Feb 2024, Takashi Yano wrote: > > > If non-cygwin process is executed in console, the exit code is not > > set correctly. This is because the stub process for non-cygwin app > > cra

Re: [PATCH] Cygwin: console: Fix exit code for non-cygwin process.

2024-02-03 Thread Johannes Schindelin
le: Make the console accessible from other > terminals.") > Reported-by: Johannes Schindelin > Signed-off-by: Takashi Yano Thank you for fixing this so swiftly. I still wish the logic was drastically simpler to understand so that even mere humans like myself would stand a chance to f

Re: [PATCH 0/5] Fix AT_EMPTY_PATH handling

2023-07-26 Thread Johannes Schindelin
ly, this returns a valid path in path_ret. That > > in turn allows to remove the additional path generation code > > from the callers. > > > > Fixes: fa84aa4dd2fb ("Cygwin: fix errno values set by readlinkat") > > Reported-by: Johannes Schindelin >

Re: [PATCH] Cygwin: dtable: Delete old kludge code for /dev/tty.

2023-07-04 Thread Johannes Schindelin
Hi Takashi, On Tue, 4 Jul 2023, Takashi Yano wrote: > On Mon, 3 Jul 2023 12:52:25 +0200 > Corinna Vinschen wrote: > > > > On Jun 27 22:28, Takashi Yano wrote: > > > > > > diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc > > > index 18e0f3097..9427e238e 100644 > > > --- a/winsup/cygw

Re: [PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
Hi Jeremy, On Wed, 28 Jun 2023, Jeremy Drake wrote: > On Tue, 27 Jun 2023, Johannes Schindelin wrote: > > > In 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) > > the code of `readlinkat()` was adjusted to align the `errno` with Linux' > > behavio

Re: [PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Jul 2023, Corinna Vinschen wrote: > Hi Johannes, > > On Jun 27 22:51, Johannes Schindelin wrote: > > In 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) > > the code of `readlinkat()` was adjusted to align the `errno` with Linux'

[PATCH v2] fchmodat/fstatat: fix regression with empty `pathname`

2023-07-04 Thread Johannes Schindelin
annot change mode to rwxr-xr-x: Not a directory With this here fix, things start working as expected again. Fixes: 4b8222983f (Cygwin: fix errno values set by readlinkat, 2023-04-18) Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-t

[PATCH] fchmodat/fstatat: fix regression with empty `pathname`

2023-06-27 Thread Johannes Schindelin
like `readlinkat()`: `fchmodat()` and `fstatat()`. Therefore, these two callers need to be changed to expect `ENOTDIR` in case of an empty `pathname`, too. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-tar-xf-with-symlinks-cygwin-v1 Fetch-I

[PATCH] Adjust CWD magic to accommodate for the latest Windows previews

2023-05-22 Thread Johannes Schindelin
Reportedly Windows 11 build 25*** from Insider changed the current working directory logic a bit, and Cygwin's "magic" (or: "technologically sufficiently advanced") code needs to be adjusted accordingly. This fixes https://github.com/git-for-windows/git/issues/4429

[PATCH v7 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-05-22 Thread Johannes Schindelin
y to include absolute paths with drive prefixes, but also UNC paths. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 5e2d88bcd7..21d729d5dc 100644 --- a/

[PATCH v7 3/4] uinfo: special-case IIS APPPOOL accounts

2023-05-22 Thread Johannes Schindelin
ce these IIS APPPOOL accounts are relatively similar to AzureAD accounts in this scenario, let's imitate the latter to support also the former. Reported-by: David Ebbo Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 107

[PATCH v7 2/4] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-05-22 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v7 1/4] Allow deriving the current user's home directory via the HOME variable

2023-05-22 Thread Johannes Schindelin
ntation-fixes-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletion

[PATCH v7 0/4] Support deriving the current user's home directory via HOME

2023-05-22 Thread Johannes Schindelin
ome that this only affects the _current_ user's home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (4): Allow deriving the current user's home directory

Re: [PATCH v6 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-04-06 Thread Johannes Schindelin
Hi Corinna, On Thu, 6 Apr 2023, Corinna Vinschen wrote: > On Apr 4 17:07, Johannes Schindelin wrote: > > In the very early code path where `dll_crt0_1 ()` calls > > `user_shared->initialize ()`, the Cygwin runtime calls `internal_pwsid ()` > > to initialize the user

Re: [PATCH v5 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 16:45, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account (or > > of Microsoft accounts) to `/home/`, especially > > `/etc/nsswitch.conf` defines `db_home: e

Re: [PATCH v5 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 16:44, Johannes Schindelin wrote: > > This patch hails from Git for Windows (where the Cygwin runtime is used > > in the form of a slightly modified MSYS2 runtime), where it is a > > well-established techni

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-04 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 15:57, Johannes Schindelin wrote: > > On Mon, 3 Apr 2023, Corinna Vinschen wrote: > > > > So here is what is going on: > > > > > > > > - The domain is 'IIS APPPOOL' > &g

[PATCH v6 4/4] Do not rely on `getenv ("HOME")`'s path conversion

2023-04-04 Thread Johannes Schindelin
separator of that `/etc/passwd`-formatted line, and instead of a Windows path, we now have a mere drive letter. Let's detect when the `HOME` value is still in Windows format in `fetch_home_env ()`, and convert it in that case. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 8 ++

[PATCH v6 3/4] uinfo: special-case IIS APPPOOL accounts

2023-04-04 Thread Johannes Schindelin
ce these IIS APPPOOL accounts are relatively similar to AzureAD accounts in this scenario, let's imitate the latter to support also the former. Reported-by: David Ebbo Helped-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 107

[PATCH v6 2/4] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-04 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v6 1/4] Allow deriving the current user's home directory via the HOME variable

2023-04-04 Thread Johannes Schindelin
ntation-fixes-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletion

[PATCH v6 0/4] Support deriving the current user's home directory via HOME

2023-04-04 Thread Johannes Schindelin
he `GetEnvironmentVariableW()`/`cygwin_conv_path()` dance - Adjusted the documentation to drive home that this only affects the _current_ user's home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc c

[PATCH v5 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
ll receive the return value -1, and the subsequent `getpwuid()` call (whose return value's `pw_dir` is used as home directory) needs to be forced to respect `db_home: env`, which this here patch does. Reported-by: David Ebbo Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 1

[PATCH v5 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-03 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 6 +- 1

[PATCH v5 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-03 Thread Johannes Schindelin
ntation-fixes-by: Corinna Vinschen Signed-off-by: Johannes Schindelin --- winsup/cygwin/local_includes/cygheap.h | 3 +- winsup/cygwin/uinfo.cc | 51 ++ winsup/doc/ntsec.xml | 20 +- 3 files changed, 72 insertions(+), 2 deletion

[PATCH v5 0/3] Support deriving the current user's home directory via HOME

2023-04-03 Thread Johannes Schindelin
t_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (3): Allow deriving the current user's home directory via the HOME variable Respect `db_home` setting even for SYSTEM/Microsoft accounts Respect `db_home: env`

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 15:12, Johannes Schindelin wrote: > > > On Mon, 3 Apr 2023, Johannes Schindelin wrote: > > > > > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > > > > > On Mar 28 10:17, Johanne

Re: [PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Corinna Vinschen wrote: > On Apr 3 08:36, Johannes Schindelin wrote: > > Hi Corinna, > > > > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > > We should

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Johannes Schindelin wrote: > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc > > > index d493d29b3b..b01bcff5cb

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-03 Thread Johannes Schindelin
Hi Corinna, On Mon, 3 Apr 2023, Johannes Schindelin wrote: > On Tue, 28 Mar 2023, Corinna Vinschen wrote: > > > On Mar 28 10:17, Johannes Schindelin wrote: > > > In particular when we cannot figure out a uid for the current user, we > > > should still respect the

Re: [PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-04-02 Thread Johannes Schindelin
Hi Corinna, On Tue, 28 Mar 2023, Corinna Vinschen wrote: > On Mar 28 10:17, Johannes Schindelin wrote: > > In particular when we cannot figure out a uid for the current user, we > > should still respect the `db_home: env` setting. Such a situation occurs > > for example whe

Re: [PATCH v4 1/3] Allow deriving the current user's home directory via the HOME variable

2023-04-02 Thread Johannes Schindelin
Hi Corinna & Jon, On Wed, 29 Mar 2023, Corinna Vinschen wrote: > On Mar 28 15:31, Corinna Vinschen wrote: > > On Mar 28 13:34, Jon Turney wrote: > > > On 28/03/2023 11:35, Corinna Vinschen wrote: > > > > Apart from the doc change, the patch is ok now. > > > > > > The preceding text says "Four sch

Re: [PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-04-02 Thread Johannes Schindelin
Hi Corinna, On Tue, 28 Mar 2023, Corinna Vinschen wrote: > On Mar 28 10:17, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account (or > > of Microsoft accounts) to /home/SYSTEM, especially not

Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

2023-03-28 Thread Johannes Schindelin
Hi Brian, On Fri, 25 Feb 2022, Brian Inglis wrote: > On 2022-02-21 06:36, Johannes Schindelin wrote: > > These symbolic links are crucial e.g. to support process substitution > > (Bash's > > very nice `<(SOME-COMMAND)` feature). > > > > For various reaso

Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

2023-03-28 Thread Johannes Schindelin
Hi Corinna, On Mon, 28 Feb 2022, Corinna Vinschen wrote: > On Feb 28 10:24, Corinna Vinschen wrote: > > On Feb 25 16:46, Johannes Schindelin wrote: > > > On Tue, 22 Feb 2022, Corinna Vinschen wrote: > > > > On Feb 21 14:36, Johannes Schindelin wrote: > >

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2023-03-28 Thread Johannes Schindelin
Hi Jon, On Wed, 14 Dec 2022, Jon Turney wrote: > On 11/12/2022 14:45, Johannes Schindelin wrote: > > On December 11, 2022 2:54:02 PM GMT+01:00, Jon Turney > > wrote: > > > On 05/12/2022 15:23, Johannes Schindelin wrote: > > > > On Mon, 28 Nov 2022, Corinna Vi

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2023-03-28 Thread Johannes Schindelin
Hi Corinna, On Mon, 21 Nov 2022, Corinna Vinschen wrote: > On Nov 18 09:18, Johannes Schindelin wrote: > > Hi Corinna, > > > > On Thu, 10 Nov 2022, Corinna Vinschen wrote: > > > On Nov 10 16:16, Johannes Schindelin wrote: > > > > With this context in

[PATCH v4 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2023-03-28 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to /home/SYSTEM, especially not when that value disagrees with what is configured via the `db_home` line in the `/etc/nsswitch.conf` file. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc

[PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined

2023-03-28 Thread Johannes Schindelin
a cloud scenario. Reported by David Ebbo. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index d493d29b3b..b01bcff5cb 100644 --- a/winsup/cygwin

[PATCH v4 1/3] Allow deriving the current user's home directory via the HOME variable

2023-03-28 Thread Johannes Schindelin
tioned above: `$HOMEDRIVE$HOMEPATH` or `$USERPROFILE`. This has the additional advantage that it is much faster than querying the Windows user database. Of course this scheme needs to be opt-in. For that reason, it needs to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`. Signed-of

[PATCH v4 0/3] Support deriving the current user's home directory via HOME

2023-03-28 Thread Johannes Schindelin
VariableW()`/`cygwin_conv_path()` dance - Adjusted the documentation to drive home that this only affects the _current_ user's home directory - Using the `PUSER_INFO_3` variant of `get_home()` - Adjusted the commit messages - Added another patch, to support "ad-hoc cloud accounts&quo

[PATCH] dumper: avoid linker problem when `libbfd` depends on `libsframe`

2023-02-01 Thread Johannes Schindelin
ected, link to it in addition to `libbfd`. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/do-link-libsframe-if-available-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime do-link-libsframe-if-available-v1 winsup/configu

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2022-12-11 Thread Johannes Schindelin
On December 11, 2022 2:54:02 PM GMT+01:00, Jon Turney wrote: >On 05/12/2022 15:23, Johannes Schindelin wrote: >> On Mon, 28 Nov 2022, Corinna Vinschen wrote: >>> On Nov 28 13:00, Jon Turney wrote: >>>> On 15/11/2022 10:46, Corinna Vinschen wrote: >>>>

Re: [PATCH] Cygwin: Improve FAQ on early breakpoint for ASLR

2022-12-05 Thread Johannes Schindelin
Hi, On Mon, 28 Nov 2022, Corinna Vinschen wrote: > On Nov 28 13:00, Jon Turney wrote: > > On 15/11/2022 10:46, Corinna Vinschen wrote: > > > > > > It would be great if we could get used to using the same syntax as the > > > Linux kernel project to document stuff. I'm trying to follow their lead

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-11-18 Thread Johannes Schindelin
Hi Corinna, On Mon, 24 Oct 2022, Corinna Vinschen wrote: > However, two points: > > - I'm wondering if the patch (both of yours) doesn't actually just cover > a problem in child_info_spawn::worker(). Different runpath values, > depending on the app path being "cmd" or "cmd.exe"? That sounds

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-11-18 Thread Johannes Schindelin
Hi Corinna, On Thu, 10 Nov 2022, Corinna Vinschen wrote: > On Nov 10 16:16, Johannes Schindelin wrote: > > > On Mon, 24 Oct 2022, Corinna Vinschen wrote: > > > > > On Oct 23 23:04, Johannes Schindelin wrote: > > > > On Tue, 18 Oct 2022, Corinna Vinschen wr

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-11-10 Thread Johannes Schindelin
Hi Corinna, On Mon, 24 Oct 2022, Corinna Vinschen wrote: > On Oct 23 23:04, Johannes Schindelin wrote: > > On Tue, 18 Oct 2022, Corinna Vinschen wrote: > > [...] > > > That means, the results from the "env" method is equivalent to the > > > "windo

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-10-23 Thread Johannes Schindelin
Hi Corinna, On Tue, 18 Oct 2022, Corinna Vinschen wrote: > On Sep 21 13:58, Johannes Schindelin wrote: > > Hi Corinna, > > > > sorry for the blast from the past, but I am renewing my efforts to > > upstream Git for Windows' patches that can be upstreamed. >

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-23 Thread Johannes Schindelin
Hi Takashi, On Sat, 22 Oct 2022, Takashi Yano wrote: > On Sat, 22 Oct 2022 07:55:53 +0200 > Johannes Schindelin wrote: > > It's not very nice to simply drop my work, and then not even link to your > > "counter". > > I am sorry, however, your patch can

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-23 Thread Johannes Schindelin
Hi Takashi, On Sat, 22 Oct 2022, Takashi Yano wrote: > On Sat, 22 Oct 2022 07:58:37 +0200 > Johannes Schindelin wrote: > > On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano > > wrote: > > >- If the command executed is 'cmd.exe /c [...]', runpath in

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano wrote: >- If the command executed is 'cmd.exe /c [...]', runpath in spawn.cc > will be NULL. In this case, is_console_app(runpath) check causes > access violation. This case also the command executed is obviously > console app., therefore,

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:37:09 AM GMT+02:00, Takashi Yano wrote: >On Sat, 22 Oct 2022 10:54:06 +0900 >Takashi Yano wrote: >> On Sat, 22 Oct 2022 10:36:39 +0900 >> Takashi Yano wrote: >> > On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) >> > Johannes Schindelin wrot

[PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
`Bad address` error. Let's guard the code properly so that it does not try to look at the file name suffix of `(WCHAR *)NULL`. This fixes https://github.com/msys2/msys2-runtime/issues/108 Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/t

Re: [PATCH v2 2/2] Respect `db_home` setting even for the SYSTEM account

2022-09-21 Thread Johannes Schindelin
Hi Corinna, On Thu, 17 Dec 2015, Corinna Vinschen wrote: > On Dec 17 19:05, Johannes Schindelin wrote: > > We should not blindly set the home directory of the SYSTEM account to > > /home/SYSTEM, especially not when that value disagrees with what is > > configured via the

Re: [PATCH v2 1/2] Allow deriving the current user's home directory via the HOME variable

2022-09-21 Thread Johannes Schindelin
Hi Corinna, sorry for the blast from the past, but I am renewing my efforts to upstream Git for Windows' patches that can be upstreamed. On Thu, 17 Dec 2015, Corinna Vinschen wrote: > On Dec 17 19:05, Johannes Schindelin wrote: > > [...] > > diff --git a/winsup/cygwin/uinf

[PATCH v3 3/3] Respect `db_home: env` even when no uid can be determined

2022-09-21 Thread Johannes Schindelin
a cloud scenario. Reported by David Ebbo. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 5e4243fa4e..b79c2b265d 100644 --- a/winsup/cygwin

[PATCH v3 2/3] Respect `db_home` setting even for SYSTEM/Microsoft accounts

2022-09-21 Thread Johannes Schindelin
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to /home/SYSTEM, especially not when that value disagrees with what is configured via the `db_home` line in the `/etc/nsswitch.conf` file. Signed-off-by: Johannes Schindelin --- winsup/cygwin/uinfo.cc

[PATCH v3 1/3] Allow deriving the current user's home directory via the HOME variable

2022-09-21 Thread Johannes Schindelin
tioned above: `$HOMEDRIVE$HOMEPATH` or `$USERPROFILE`. This has the additional advantage that it is much faster than querying the Windows user database. Of course this scheme needs to be opt-in. For that reason, it needs to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`. Signed-of

[PATCH v3 0/3] Support deriving the current user's home directory via HOME

2022-09-21 Thread Johannes Schindelin
mit messages - Added another patch, to support "ad-hoc cloud accounts" Johannes Schindelin (3): Allow deriving the current user's home directory via the HOME variable Respect `db_home` setting even for SYSTEM/Microsoft accounts Respect `db_home: env` even when no ui

  1   2   >