From 53d9d4ee0e6ee889a06c2d1134ddb083be45f91a Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 3 Nov 2010 18:02:28 +0100 Subject: 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 --- source4/dsdb/tests/python/sam.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/dsdb/tests/python') diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py index 039ddf1e1c..e1dbc6b09c 100755 --- a/source4/dsdb/tests/python/sam.py +++ b/source4/dsdb/tests/python/sam.py @@ -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) -- cgit