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

2023-04-03 Thread Corinna Vinschen
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' > > > > There's a domain, so why not pass it to the called function?> > > Sorry, I was unclear. This domain _is_ used when looking

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

2023-04-03 Thread Corinna Vinschen
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: env`, in which case we want to > respect the `HOME` variable. > > Signed-off-by: Johannes S

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

2023-04-03 Thread Corinna Vinschen
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 technique to let the `$HOME` variable define where the > current user's home directory is, fall

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

2023-04-03 Thread Johannes Schindelin
When we cannot figure out a uid for the current user, we should still respect the `db_home: env` setting. This is particularly important when programs like `ssh` look for the home directory of the usr, the user overrode `HOME` to "help" Cygwin determine where the home directory is. Cygwin should n

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

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

2023-04-03 Thread Johannes Schindelin
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 technique to let the `$HOME` variable define where the current user's home directory is, falling back to `$HOMEDRIVE$HOMEPATH` and `$USERPROFILE`

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

2023-04-03 Thread Johannes Schindelin
This patch mini-series supports Git for Windows' default strategy to determine the current user's home directory by looking at the environment variable HOME, falling back to HOMEDRIVE and HOMEPATH, and if these variables are also unset, to USERPROFILE. This strategy is a quick method to determine

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, Johannes Schindelin wrote: > > > > > In particular when

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 not blindly set the home directory of the SYSTEM accou

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

2023-04-03 Thread Corinna Vinschen
On Apr 3 15:12, Johannes Schindelin wrote: > 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 > >

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 100644 > > > --- a/winsup/cygwin/uinf

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 `db_home: env` setting. Such a si

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

2023-04-03 Thread Corinna Vinschen
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 not blindly set the home directory of the SYSTEM account (or > > > of Microsoft accounts) to /home/SYSTEM, especially not wh