s4:dsdb Make primaryGroupToken calculation more efficient and correct
commit354b80b3ae3fd918d65f6425d054630d51ee18e0
authorAndrew Bartlett <abartlet@samba.org>
Mon, 7 Dec 2009 01:41:43 +0000 (7 12:41 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 7 Dec 2009 02:07:56 +0000 (7 13:07 +1100)
tree71c825b4a7c3d5db158e87d24986f2d01310b99a
parent45cd4c93fbcabe8e5c66f57f8ded08a860af1bce
s4:dsdb Make primaryGroupToken calculation more efficient and correct

The original code here would do a subtree search under each object,
attempting to determine if it was a group.  This was incorrect, and
inefficient - we just need to ask for the objectClass attribute, and
check that value before returning the group's RID.

(Much of this patch reworks operational.c to allow a search for 2
attributes for this calculation).

Andrew Bartlett
source4/dsdb/samdb/ldb_modules/operational.c