1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

s4:ldap.py - add testcase which demonstrates the reset of the "primaryGroupID"

This commit is contained in:
Matthias Dieter Wallnöfer 2010-06-10 16:18:41 +02:00
parent d604d49939
commit bdd83c0639

View File

@ -1028,6 +1028,13 @@ objectClass: container
"dn": "cn=ldaptestuser,cn=users," + self.base_dn,
"objectclass": ["user", "person"]})
# We should be able to reset our actual primary group
m = Message()
m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
m["primaryGroupID"] = MessageElement("513", FLAG_MOD_REPLACE,
"primaryGroupID")
ldb.modify(m)
# Try to add invalid primary group
m = Message()
m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)