[PATCH] Introduce the 'usertemp' filesystem type

2015-09-16 Thread Johannes Schindelin
till needs to allow users to write into the /tmp/ directory. This is the case in the context of Git for Windows, where the Cygwin (MSys2) root directory lives inside C:\Program Files and hence /tmp/ would not be writable otherwise. Signed-off-by: Johannes Schindelin --- wins

[PATCH] Allow overriding the home directory via the HOME variable

2015-09-16 Thread Johannes Schindelin
d explicitly via `db_home: env` in `/etc/nsswitch.conf`. Signed-off-by: Johannes Schindelin --- winsup/cygwin/cygheap.h | 3 ++- winsup/cygwin/uinfo.cc | 47 +++ winsup/doc/ntsec.xml| 20 3 files changed, 69 insertions(+), 1 delet

Re: [PATCH] Introduce the 'usertemp' filesystem type

2015-10-20 Thread Johannes Schindelin
Hi Corinna, On Tue, 20 Oct 2015, Corinna Vinschen wrote: > Preliminaries: we need a copyright assignment from you before being able > to include your patches. Please see https://cygwin.com/assign.txt. Thanks for pointing that out. It is in the works. > On Sep 16 09:35, Johannes S

Re: [PATCH] Introduce the 'usertemp' filesystem type

2015-10-22 Thread Johannes Schindelin
Hi Corinna, On Wed, 21 Oct 2015, Corinna Vinschen wrote: > On Oct 20 13:47, Johannes Schindelin wrote: > > On Tue, 20 Oct 2015, Corinna Vinschen wrote: > > > On Sep 16 09:35, Johannes Schindelin wrote: > > > > > > > By specifying > > > > &g

Re: [PATCH] Allow overriding the home directory via the HOME variable

2015-10-22 Thread Johannes Schindelin
Hi Corinna, On Wed, 21 Oct 2015, Corinna Vinschen wrote: > On Sep 16 15:06, Johannes Schindelin wrote: > > * uinfo.cc (cygheap_pwdgrp::get_home): Offer an option in > > nsswitch.conf that let's the environment variable HOME (or > > HOMEDRIVE & HOMEPA

Re: [PATCH] Allow overriding the home directory via the HOME variable

2015-10-23 Thread Johannes Schindelin
Hi Corinna, On Fri, 23 Oct 2015, Corinna Vinschen wrote: > On Oct 23 11:10, Corinna Vinschen wrote: > > On Oct 22 17:38, Johannes Schindelin wrote: > > > > > > On Wed, 21 Oct 2015, Corinna Vinschen wrote: > > > > > > > On Sep 16 15:06, Johan

[PATCH v2] Introduce the 'usertemp' filesystem type

2015-12-01 Thread Johannes Schindelin
till needs to allow users to write into the /tmp/ directory. This is the case in the context of Git for Windows, where the Cygwin (MSys2) root directory lives inside C:\Program Files and hence /tmp/ would not be writable otherwise. Signed-off-by: Johannes Schindelin --- winsup/cygwin/include/sys

Re: [PATCH v2] Introduce the 'usertemp' filesystem type

2015-12-01 Thread Johannes Schindelin
... and here is the interdiff vs v1 (compare also to the 'pseudo Pull Request' at https://github.com/dscho/msys2-runtime/compare/tempfs-cygwin-v1-rebased...tempfs-cygwin-v2): diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h index 458cf80..ec92794 100644 --- a/wins

Re: [PATCH v2] Introduce the 'usertemp' filesystem type

2015-12-01 Thread Johannes Schindelin
Hi Corinna, On Tue, 1 Dec 2015, Corinna Vinschen wrote: > On Dec 1 15:02, Johannes Schindelin wrote: > > * mount.cc (mount_info::from_fstab_line): support mounting the > > current user's temp folder as /tmp/. This is particularly > > useful a feature w

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

2015-12-17 Thread Johannes Schindelin
determine the home directory, and it also allows users to override the home directory easily (e.g. in case that their real home directory is a network share that is not all that well handled by some commands such as cmd.exe's cd command). Sorry for sending out v2 so late...! Johannes Schindel

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

2015-12-17 Thread Johannes Schindelin
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-off-by: Johannes Schindelin --- winsup/cygwin/cygheap.h | 3 ++- winsup/cygwin/uinfo.cc | 49 +++

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

2015-12-17 Thread Johannes Schindelin
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 `db_home` line in the `/etc/nsswitch.conf` file. This fixes https://github.com/git-for-windows/git/issues/435 Signed-off-by: Johannes

[PATCH] Be truthful about reporting whether readahead is available

2016-04-05 Thread Johannes Schindelin
keys repeatedly. The full Git for Windows bug report is here: https://github.com/git-for-windows/git/issues/711 Let's just teach the get_cons_readahead_valid() method to handle a depleted readahead buffer correctly. Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler.

Re: Fwd: Re: [PATCH] Be truthful about reporting whether readahead is available

2016-04-06 Thread Johannes Schindelin
Hi Thomas, On Tue, 5 Apr 2016, Thomas Wolff wrote: > > > Betreff: Re: [PATCH] Be truthful about reporting whether readahead is > > > available > > > > > > Thomas? > > > > > > Any input? > > > > Yes, let's fix the patch so. Sorry for the flaw. No big deal, thanks for the ACK! Ciao, Johannes

[PATCH] FAST_CWD: adjust the initial search scope

2017-01-11 Thread Johannes Schindelin
, let's just double the area we search for said byte for good measure. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fast-cwd-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime fast-cwd-v1 winsup/cygwin/path.cc | 4 ++

Re: [PATCH] FAST_CWD: adjust the initial search scope

2017-01-11 Thread Johannes Schindelin
Hi Corinna, On Wed, 11 Jan 2017, Corinna Vinschen wrote: > On Jan 11 14:21, Johannes Schindelin wrote: > > A *very* recent Windows build adds more code to the preamble of > > RtlGetCurrentDirectory_U() so that the previous heuristic failed to > > find the call t

[PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-13 Thread Johannes Schindelin
. Reported as https://github.com/Alexpux/MINGW-packages/issues/2879 in the MSYS2 project. Cc: Sichen Zhao <1473996...@qq.com> Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/fix-strnstr-segfault-v1 Fetch-It-Via: git fetch https://github.com

Re: [PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-14 Thread Johannes Schindelin
Hi Yaakov, On Wed, 13 Sep 2017, Yaakov Selkowitz wrote: > On 2017-09-13 10:44, Johannes Schindelin wrote: > > As of f22054c94d (Modify strnstr.c., 2017-08-30), the strnstr() > > implementation was replaced by a version that segfaults (at least > > sometimes) on 64-bit

Re: [PATCH 4/5] Cygwin: fix GCC 8.3 'asm volatile' errors (fwd)

2019-07-18 Thread Johannes Schindelin
Apparently I ran afoul of some overzealous spam filter: SMTP error from remote server for TEXT command, host: sourceware.org (209.132.180.131) reason: 552 spam score exceeded threshold -- Forwarded message -- Date: Thu, 18 Jul 2019 11:01:33 +0200 (CEST) From: Johannes Schindelin

Re: [PATCH] Cygwin: remove %esp from asm clobber list

2020-02-28 Thread Johannes Schindelin
Hi, On Fri, 28 Feb 2020, Jon Turney wrote: > Mentioning the stack pointer in the clobber list is now a gcc warning. > > We never wanted gcc to try to restore %esp after this (x86-specific) > asm, since the whole point of the inline asm here is to adjust %esp to > satisfy alignment, so remove %esp

[PATCH] setup_pseudoconsole(): handle missing/incorrect helper gracefully

2020-05-02 Thread Johannes Schindelin
that more gracefully: if the process exited without signaling, we cannot use the pseudo console. In that case, let's just fall back to not using it. Signed-off-by: Johannes Schindelin --- It took me three days to bisect why my test build of the MSYS2 runtime hung Min

Re: [Patch] Fix incorrect code page when setting console title on Win10

2020-08-26 Thread Johannes Schindelin
Hi Corinna, On Wed, 26 Aug 2020, Corinna Vinschen wrote: > On Aug 26 16:43, 宫大汉 via Cygwin-patches wrote: > > When Cygwin sets console titles on Win10 (has_con_24bit_colors && > > !con_is_legacy), > > `WriteConsoleA` is used and causes an error if: > > 1. the environment variable of `LANG` is `*

[PATCH 0/3] pty: use the UTF-8 code page by default for non-Cygwin console applications

2020-09-01 Thread Johannes Schindelin
, i.e. in v3.0.x), it is clear to me that using ASCII by default is not desirable. So here are patches to address this. Incidentally, this addresses quite a few tickets in the MSYS2 and Git for Windows projects. Johannes Schindelin (3): fhandler_pty_slave::setup_locale: fix typo

[PATCH 1/3] fhandler_pty_slave::setup_locale: fix typo

2020-09-01 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 6294e2c20..b3458595a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin

[PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-01 Thread Johannes Schindelin
.com/msys2/MSYS2-packages/issues/2012, https://github.com/rust-lang/cargo/issues/8369, https://github.com/git-for-windows/git/issues/2734, https://github.com/git-for-windows/git/issues/2793, https://github.com/git-for-windows/git/issues/2792, and possibly quite a few others. Signed-off-by: Johannes

[PATCH 2/3] fhandler_pty_slave::setup_locale: fall back to UTF-8, not ASCII

2020-09-01 Thread Johannes Schindelin
ng.sh` essentially sets `LANG=$(locale -uU)` (where the `-U` says that `.UTF-8` should be appended). Meaning: we _really_ want to use the UTF-8 code page. Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler_tty.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/c

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi, On Tue, 1 Sep 2020, Johannes Schindelin wrote: > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > correct, but after that (at least if Pseudo Console support is enabled), > we try to find the default code page for that `LCID`, which is ASCII > (437). Subseque

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi Takashi, On Wed, 2 Sep 2020, Takashi Yano via Cygwin-patches wrote: > On Wed, 2 Sep 2020 10:30:14 +0200 > Corinna Vinschen wrote: > > On Sep 1 18:19, Johannes Schindelin wrote: > > > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > > > correc

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-02 Thread Johannes Schindelin
Hi Takashi, On Wed, 2 Sep 2020, Takashi Yano wrote: > On Wed, 2 Sep 2020 08:26:04 +0200 (CEST) > Johannes Schindelin wrote: > > Hi Takashi, > > > > On Wed, 2 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > On Wed, 2 Sep 2020 10:30:14 +0200 >

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-04 Thread Johannes Schindelin
Hi Takashi, On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > Hi Johannes and Corinna, > > On Tue, 1 Sep 2020 18:19:16 +0200 (CEST) > Johannes Schindelin wrote: > > > When `LANG=en_US.UTF-8`, the detected `LCID` is 0x0409, which is > > correct, but aft

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi, On Mon, 7 Sep 2020, Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 10:26:33 +0200 > Corinna Vinschen wrote: > > Hi Takashi, > > On Sep 5 17:43, Takashi Yano via Cygwin-patches wrote: > > > On Fri, 4 Sep 2020 21:22:35 +0200 > > > Corinna Vinschen wrote: > > > > > > > Btw., the ma

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-07 Thread Johannes Schindelin
Hi Takashi, On Sat, 5 Sep 2020, Takashi Yano wrote: > On Fri, 4 Sep 2020 08:23:42 +0200 (CEST) > Johannes Schindelin wrote: > > > > On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > On Tue, 1 Sep 2020 18:19:16 +0200 (CEST) > > > Joh

Re: [PATCH v2 0/2] Handle "app execution aliases"

2021-03-23 Thread Johannes Schindelin
Hi Corinna, On Tue, 23 Mar 2021, Corinna Vinschen wrote: > On Mar 22 16:51, Johannes Schindelin via Cygwin-patches wrote: > > When installing e.g. Python via the Windows Store, it is common that the > > `python3.exe` entry in the `PATH` is not actually an executable at all,

Re: [PATCH v6] Cygwin: rewrite cmdline parser

2021-05-14 Thread Johannes Schindelin
Hi, first of all: thank you for working on this. I have run afoul of the (de-)quoting differences between MSVCRT and Cygwin on more than one occasion. Having said this, I hope to make it clear that I care about your work, and I care about helping to make it as good as we can make it together. It

[PATCH] console: handle Unicode surrogate pairs

2021-11-16 Thread Johannes Schindelin
ps://github.com/git-for-windows/git/issues/3281 Signed-off-by: Johannes Schindelin --- This applies without merge conflict all the way back to cygwin_2_7_0-release. winsup/cygwin/fhandler_console.cc | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff

Re: [PATCH v2] Cygwin: pty: Reduce unecessary input transfer.

2021-12-09 Thread Johannes Schindelin
Hi Takashi, sorry for responding to a patch you sent almost 10 months ago... but... I am struggling with it. First of all, let me describe the problem I am seeing (see also https://github.com/git-for-windows/git/issues/3579): after upgrading the MSYS2 runtime to v3.3.3 in Git for Windows, wheneve

Re: [PATCH v2] Cygwin: pty: Reduce unecessary input transfer.

2021-12-10 Thread Johannes Schindelin
Hi Takashi, On Fri, 10 Dec 2021, Takashi Yano wrote: > On Fri, 10 Dec 2021 00:05:27 +0100 (CET) > Johannes Schindelin wrote: > > sorry for responding to a patch you sent almost 10 months ago... but... I > > am struggling with it. > > > > First of all, let me describ

[PATCH] path_conv: do not get confused by a directory with `.lnk` suffix

2022-01-17 Thread Johannes Schindelin
https://github.com/msys2/msys2-runtime/issues/81 Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/msys2-runtime/releases/tag/dont-confuse-a-xyz.lnk-directory-for-a-lnk-file-cygwin-v1 Fetch-It-Via: git fetch https://github.com/dscho/msys2-runtime dont-confuse-a-xyz.lnk-directory-

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

2022-02-21 Thread Johannes Schindelin
e Cygwin runtime. Therefore, let's just handle these symbolic links as implicit, virtual ones. If there is appetite for it, I wonder whether we should do something similar for `/dev/shm` and `/dev/mqueue`? Are these even still used in Cygwin? Johannes Schindelin (2): Implicitly support the /d

[PATCH 1/2] Implicitly support the /dev/fd symlink and friends

2022-02-21 Thread Johannes Schindelin
ial devices. Signed-off-by: Johannes Schindelin --- winsup/cygwin/Makefile.am| 1 + winsup/cygwin/devices.h | 3 +- winsup/cygwin/devices.in | 4 +++ winsup/cygwin/dtable.cc | 3 ++ winsup/cygwin/fhandler.h | 28 + winsup/cygwin/fhandler_dev

Re: [PATCH] Cygwin: pty, console: Refactor the code processing special keys.

2022-02-25 Thread Johannes Schindelin
Hi Takashi, On Sun, 20 Feb 2022, Takashi Yano wrote: > - This patch commonize the code which processes special keys in pty > and console to improve maintanancibility. I very much welcome the direction. Thank you for working on this! > As a result, some small bugs have been fixed. Whenever I

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

2022-02-25 Thread Johannes Schindelin
Hi Corinna, On Tue, 22 Feb 2022, Corinna Vinschen wrote: > On Feb 21 14:36, Johannes Schindelin wrote: > > These symbolic links are crucial e.g. to support process substitution > > (Bash's > > very nice `<(SOME-COMMAND)` feature). > > > > For va

[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

[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 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 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

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

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

[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] 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

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] 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] 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 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 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-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] 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] 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: 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: >>>>

[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

[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 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 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

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

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 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 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 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 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 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 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-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 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, 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

[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`

[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 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 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 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 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 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 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 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 ++

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

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 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 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

[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

[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 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 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 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] 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] 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 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

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'

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] 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 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 >

  1   2   >