1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00

s4:sam.py - assign valid values when performing the special-attributes constraint checks

The problem is that s4 per construction does the checks in a different order. It
first checks for validity (pre-operation trigger in samldb LDB module) and then
for the schema (post-operation trigger in objectclass_attrs LDB module).
constraints (post-operation trigger
This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-03 18:02:28 +01:00
parent b78bf4d721
commit 53d9d4ee0e

View File

@ -592,7 +592,7 @@ class SamTests(unittest.TestCase):
m = Message()
m.dn = Dn(ldb, "cn=ldaptestgroup,cn=users," + self.base_dn)
m["groupType"] = MessageElement("0", FLAG_MOD_ADD,
m["groupType"] = MessageElement(str(GTYPE_SECURITY_GLOBAL_GROUP), FLAG_MOD_ADD,
"groupType")
try:
ldb.modify(m)
@ -612,7 +612,7 @@ class SamTests(unittest.TestCase):
m = Message()
m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
m["primaryGroupID"] = MessageElement("0", FLAG_MOD_ADD,
m["primaryGroupID"] = MessageElement("513", FLAG_MOD_ADD,
"primaryGroupID")
try:
ldb.modify(m)
@ -632,7 +632,7 @@ class SamTests(unittest.TestCase):
m = Message()
m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
m["userAccountControl"] = MessageElement("0", FLAG_MOD_ADD,
m["userAccountControl"] = MessageElement(str(UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD), FLAG_MOD_ADD,
"userAccountControl")
try:
ldb.modify(m)