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:
parent
e410a91ff4
commit
1c5a268f34
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user