This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH v2 2/2] Respect `db_home` setting even for the SYSTEM account
- From: Johannes Schindelin <johannes dot schindelin at gmx dot de>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 17 Dec 2015 19:05:26 +0100 (CET)
- Subject: [PATCH v2 2/2] Respect `db_home` setting even for the SYSTEM account
- Authentication-results: sourceware.org; auth=none
- References: <0Lg1Tn-1YnzUw0ScN-00pcgi at mail dot gmx dot com> <cover dot 1450375424 dot git dot johannes dot schindelin at gmx dot de>
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 https://github.com/git-for-windows/git/issues/435
Signed-off-by: Johannes Schindelin <johannes.schindelin@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 a5d6270..8c51b82 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -2129,7 +2129,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 (acc_type)
{
case SidTypeUser:
--
2.6.3.windows.1.300.g1c25e49