diff options
author | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-22 18:51:55 +0200 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@samba.org> | 2010-11-22 18:39:06 +0100 |
commit | 2c993f0d4eb43d39553857641d0686baba444b4b (patch) | |
tree | 3ef4d41dd0b53ed50f9cb748124f59193a3c8c2e /source4 | |
parent | 2c96be185d7d8222fc7f1aef513ca0e5b0ca2408 (diff) | |
download | samba-2c993f0d4eb43d39553857641d0686baba444b4b.tar.gz samba-2c993f0d4eb43d39553857641d0686baba444b4b.tar.bz2 samba-2c993f0d4eb43d39553857641d0686baba444b4b.zip |
s4-tests: Adapted passwords.py to use set_minPwdAge from SamDB.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Mon Nov 22 18:39:06 CET 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/passwords.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py index 461d135003..1512346402 100755 --- a/source4/dsdb/tests/python/passwords.py +++ b/source4/dsdb/tests/python/passwords.py @@ -948,14 +948,9 @@ m["dSHeuristics"] = MessageElement("000000001", FLAG_MOD_REPLACE, ldb.modify(m) # Get the old "minPwdAge" -res = ldb.search(base_dn, scope=SCOPE_BASE, attrs=["minPwdAge"]) -minPwdAge = res[0]["minPwdAge"][0] - +minPwdAge = ldb.get_minPwdAge() # Set it temporarely to "0" -m = Message() -m.dn = Dn(ldb, base_dn) -m["minPwdAge"] = MessageElement("0", FLAG_MOD_REPLACE, "minPwdAge") -ldb.modify(m) +ldb.set_minPwdAge("0") runner = SubunitTestRunner() rc = 0 @@ -974,9 +969,6 @@ else: ldb.modify(m) # Reset the "minPwdAge" as it was before -m = Message() -m.dn = Dn(ldb, base_dn) -m["minPwdAge"] = MessageElement(minPwdAge, FLAG_MOD_REPLACE, "minPwdAge") -ldb.modify(m) +ldb.set_minPwdAge(minPwdAge) sys.exit(rc) |