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 <johannes.schinde...@gmx.de>
---
 winsup/cygwin/uinfo.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 6e673ee39e..5e4243fa4e 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -2253,7 +2253,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 ((PUSER_INFO_3) NULL, sid, dom, name,
+                                      fully_qualified_name);
+       }
       switch ((int) acc_type)
        {
        case SidTypeUser:
--
2.38.0.rc0.windows.1


Reply via email to