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: env`, in which case we wan

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 technique to let the `$HOME`

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' > > > > > > There's a domain, so why not pass it to the called f

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

2023-04-04 Thread Johannes Schindelin
In the very early code path where `dll_crt0_1 ()` calls `user_shared->initialize ()`, the Cygwin runtime calls `internal_pwsid ()` to initialize the user name in preparation for reading the `fstab` file. In case `db_home: env` is defined in `/etc/nsswitch.conf`, we need to look at the environment

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

2023-04-04 Thread Johannes Schindelin
The account under which Azure Web Apps run is an IIS APPOOL account that is generated on the fly. These are special because the virtual machines on which thes Apps run are not domain-joined, yet the accounts are domain accounts. To support the use case where such a Web App needs to call `ssh` (e.

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

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

2023-04-04 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 v6 0/4] Support deriving the current user's home directory via HOME

2023-04-04 Thread Johannes Schindelin
This patch 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 the h