s4-dsdb: Use correct primary group SID in token group test
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 15 Dec 2022 23:41:50 +0000 (12:41 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Feb 2023 00:03:40 +0000 (00:03 +0000)
This test will thereby continue to pass when we correct the handling of
primary groups.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/tests/python/token_group.py

index 2f81aab076fecc28fa0b44a20cb7b91e95d25bff..e5a15ee206d08a4532965fe235ea3574ecacabff 100755 (executable)
@@ -668,7 +668,7 @@ class DynamicTokenTest(samba.tests.TestCase):
         memberOf = set()
         # Add the primary group
         primary_group_sid = "%s-%d" % (domain_sid, user_info.primary_gid)
-        res2 = self.admin_ldb.search(base="<SID=%s>" % sid, scope=ldb.SCOPE_BASE,
+        res2 = self.admin_ldb.search(base="<SID=%s>" % primary_group_sid, scope=ldb.SCOPE_BASE,
                                      attrs=[])
 
         memberOf.add(res2[0].dn.get_casefold())