1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

s4-ldaptest: need to use MessageElement for modify messages

Without MessageElement() the flags are not set, which is invalid
This commit is contained in:
Andrew Tridgell 2009-12-30 10:54:03 +11:00
parent e410a91ff4
commit 1c5a268f34

View File

@ -725,7 +725,8 @@ objectClass: container
# Try to add group 1 also as secondary - should be denied
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
m["member"] = "cn=ldaptestuser,cn=users," + self.base_dn
m["member"] = MessageElement("cn=ldaptestuser,cn=users," + self.base_dn,
FLAG_MOD_ADD, "member")
try:
ldb.modify(m)
self.fail()
@ -747,7 +748,8 @@ objectClass: container
# Make group 2 secondary
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup2,cn=users," + self.base_dn)
m["member"] = "cn=ldaptestuser,cn=users," + self.base_dn
m["member"] = MessageElement("cn=ldaptestuser,cn=users," + self.base_dn,
FLAG_MOD_ADD, "member")
ldb.modify(m)
# Swap the groups