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 `db_home` line in the `/e

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/uinfo.cc b/winsup/cygwin/ui

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

2022-09-21 Thread Johannes Schindelin
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 when the domain returned by `LookupAccountSid()` is not our machine name and at the same time our machine is no domain member: In that case, we

[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
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 v3 0/3] Support deriving the current user's home directory via HOME

2022-09-21 Thread Johannes Schindelin
This patch mini-series supports Git for Windows' main 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