From f92c28bf4e93524217ac8eb4c3f21c0ab360ba26 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 3 Mar 2010 11:22:07 +0100 Subject: s4:dcesrv_samr - Fix up "EnumDomainGroups" and "QueryDisplayInfo" calls We need to look for both global and universal group types when querying them. Found by ekacnet (http://lists.samba.org/archive/samba-technical/2010-March/069777.html). --- source4/rpc_server/samr/dcesrv_samr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index edfacfb4f4..b61c6f471d 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -1139,7 +1139,8 @@ static NTSTATUS dcesrv_samr_EnumDomainGroups(struct dcesrv_call_state *dce_call, ldb_cnt = samdb_search_domain(d_state->sam_ctx, mem_ctx, d_state->domain_dn, &res, attrs, d_state->domain_sid, - "(&(grouptype=%d)(objectclass=group))", + "(&(|(groupType=%d)(groupType=%d))(objectClass=group))", + GTYPE_SECURITY_UNIVERSAL_GROUP, GTYPE_SECURITY_GLOBAL_GROUP); if (ldb_cnt == -1) { return NT_STATUS_INTERNAL_DB_CORRUPTION; @@ -3776,8 +3777,10 @@ static NTSTATUS dcesrv_samr_QueryDisplayInfo(struct dcesrv_call_state *dce_call, break; case 3: case 5: - filter = talloc_asprintf(mem_ctx, "(&(grouptype=%d)" - "(objectclass=group))", + filter = talloc_asprintf(mem_ctx, + "(&(|(groupType=%d)(groupType=%d))" + "(objectClass=group))", + GTYPE_SECURITY_UNIVERSAL_GROUP, GTYPE_SECURITY_GLOBAL_GROUP); break; default: -- cgit