summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/grp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index ea20e926c..40e1ca763 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -643,13 +643,17 @@ internal_getgroups (int gidsetsize, gid_t *grouplist, cyg_ldap *pldap)
{
for (ULONG ncnt = 0; ncnt < scnt; ++ncnt)
{
+ static UNICODE_STRING empty = { 0, 0, (PWSTR) L"" };
fetch_acc_t full_acc =
{
.sid = sidp_buf[ncnt],
.name = &nlst[ncnt].Name,
- .dom = &dlst->Domains[nlst[ncnt].DomainIndex].Name,
+ .dom = &empty,
.acc_type = nlst[ncnt].Use
};
+
+ if (nlst[ncnt].DomainIndex >= 0)
+ full_acc.dom = &dlst->Domains[nlst[ncnt].DomainIndex].Name;
if ((grp = internal_getgrfull (full_acc, pldap)))
{
if (cnt < gidsetsize)