diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-04 13:16:11 +1100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-11-04 11:30:04 +0000 |
commit | 28f1228b01056dc6eefc64a24fe317d68e170195 (patch) | |
tree | 7f25a87938a6f8534edc7a80ebe5833d534f65c4 /source4 | |
parent | fea02db10f672635bc08b80c32bbd296b0d4fc9d (diff) | |
download | samba-28f1228b01056dc6eefc64a24fe317d68e170195.tar.gz samba-28f1228b01056dc6eefc64a24fe317d68e170195.tar.bz2 samba-28f1228b01056dc6eefc64a24fe317d68e170195.zip |
s4-dsdb Fix urgent_replication test not to set an invalid userAccountControl
A userAccountControl value of 0 or 1 is invalid, you must include one of
the account types.
Andrew Bartlett
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/urgent_replication.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py index 20c40a8e8f..be0b0b0062 100755 --- a/source4/dsdb/tests/python/urgent_replication.py +++ b/source4/dsdb/tests/python/urgent_replication.py @@ -17,6 +17,7 @@ from ldb import (SCOPE_BASE, LdbError, ERR_NO_SUCH_OBJECT, Message, MessageElement, Dn, FLAG_MOD_REPLACE) from samba.samdb import SamDB import samba.tests +import samba.dsdb as dsdb from subunit.run import SubunitTestRunner import unittest @@ -315,7 +316,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"]) "dn": "cn=user UrgAttr test,cn=users," + self.base_dn, "objectclass":"user", "samaccountname":"user UrgAttr test", - "userAccountControl":"1", + "userAccountControl":str(dsdb.UF_NORMAL_ACCOUNT), "lockoutTime":"0", "pwdLastSet":"0", "description":"urgent attributes test description"}) @@ -327,7 +328,7 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"]) # urgent replication should be enabled when modifying userAccountControl m = Message() m.dn = Dn(ldb, "cn=user UrgAttr test,cn=users," + self.base_dn) - m["userAccountControl"] = MessageElement("0", FLAG_MOD_REPLACE, + m["userAccountControl"] = MessageElement(str(dsdb.UF_NORMAL_ACCOUNT+dsdb.UF_SMARTCARD_REQUIRED), FLAG_MOD_REPLACE, "userAccountControl") ldb.modify(m) res = self.ldb.load_partition_usn(self.base_dn) |