From 83cd3f76307edcba7df2fbbde54a029ce5b4e9f8 Mon Sep 17 00:00:00 2001
From: Matthias Dieter Wallnöfer <mdw@samba.org>
Date: Sat, 11 Sep 2010 14:02:11 +0200
Subject: s4:dcesrv_samr_GetGroupsForUser - also universal group memberships
 are returned here

Tested using User Manager for Domains against Windows Server 2008.
MS-SAMR 3.1.5.9.1 is wrong in this case therefore I've informed the dochelp team.
---
 source4/rpc_server/samr/dcesrv_samr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index e222a41d26..4a3f95e68d 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3564,9 +3564,10 @@ static NTSTATUS dcesrv_samr_GetGroupsForUser(struct dcesrv_call_state *dce_call,
 	count = samdb_search_domain(a_state->sam_ctx, mem_ctx,
 				    d_state->domain_dn, &res,
 				    attrs, d_state->domain_sid,
-				    "(&(member=%s)(grouptype=%d)(objectclass=group))",
+				    "(&(member=%s)(|(grouptype=%d)(grouptype=%d))(objectclass=group))",
 				    ldb_dn_get_linearized(a_state->account_dn),
-				    GTYPE_SECURITY_GLOBAL_GROUP);
+				    GTYPE_SECURITY_GLOBAL_GROUP,
+				    GTYPE_SECURITY_UNIVERSAL_GROUP);
 	if (count < 0)
 		return NT_STATUS_INTERNAL_DB_CORRUPTION;
 
-- 
cgit