Skip to content

Commit a24bc22

Browse files
committed
Respect db_home setting even for SYSTEM/Microsoft accounts
We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/<name>`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 83137f9 commit a24bc22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

winsup/cygwin/uinfo.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
22402240
it to a well-known group here. */
22412241
if (acc_type == SidTypeUser
22422242
&& (sid_sub_auth_count (sid) <= 3 || sid_id_auth (sid) == 11))
2243-
acc_type = SidTypeWellKnownGroup;
2243+
{
2244+
acc_type = SidTypeWellKnownGroup;
2245+
home = cygheap->pg.get_home ((PUSER_INFO_3) NULL, sid, dom, name,
2246+
fully_qualified_name);
2247+
}
22442248
switch ((int) acc_type)
22452249
{
22462250
case SidTypeUser:

0 commit comments

Comments
 (0)