summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-03 18:02:28 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-03 17:48:18 +0000
commit53d9d4ee0e6ee889a06c2d1134ddb083be45f91a (patch)
treeb6f5f48c8ec2d55b04b2c9addfa377e415372b95
parentb78bf4d72100f9aa8c50ee36b30ba353e2b72eae (diff)
downloadsamba-53d9d4ee0e6ee889a06c2d1134ddb083be45f91a.tar.gz
samba-53d9d4ee0e6ee889a06c2d1134ddb083be45f91a.tar.bz2
samba-53d9d4ee0e6ee889a06c2d1134ddb083be45f91a.zip
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
-rwxr-xr-xsource4/dsdb/tests/python/sam.py6
1 files changed, 3 insertions, 3 deletions
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)