Skip to content

Commit

Permalink
Respect db_home setting even for the SYSTEM account
Browse files Browse the repository at this point in the history
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 git-for-windows/git#435

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 29, 2023
1 parent 81a0e5d commit 22854f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion winsup/cygwin/uinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
it to a well-known group here. */
if (acc_type == SidTypeUser
&& (sid_sub_auth_count (sid) <= 3 || sid_id_auth (sid) == 11))
acc_type = SidTypeWellKnownGroup;
{
acc_type = SidTypeWellKnownGroup;
home = cygheap->pg.get_home (pldap, sid, dom, domain, name,
fully_qualified_name);
}
switch ((int) acc_type)
{
case SidTypeUser:
Expand Down

0 comments on commit 22854f6

Please sign in to comment.