summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 198b314cc0..e43298e34d 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -887,6 +887,25 @@ userPassword: thatsAcomplPASS4
# Reset the test "dSHeuristics" (reactivate "userPassword" pwd changes)
ldb.set_dsheuristics("000000001")
+ def test_zero_length(self):
+ # Get the old "minPwdLength"
+ minPwdLength = ldb.get_minPwdLength()
+ # Set it temporarely to "0"
+ ldb.set_minPwdLength("0")
+
+ # Get the old "pwdProperties"
+ pwdProperties = ldb.get_pwdProperties()
+ # Set them temporarely to "0" (to deactivate eventually the complexity)
+ ldb.set_pwdProperties("0")
+
+ ldb.setpassword("(sAMAccountName=testuser)", "")
+
+ # Reset the "pwdProperties" as they were before
+ ldb.set_pwdProperties(pwdProperties)
+
+ # Reset the "minPwdLength" as it was before
+ ldb.set_minPwdLength(minPwdLength)
+
def tearDown(self):
super(PasswordTests, self).tearDown()
delete_force(self.ldb, "cn=testuser,cn=users," + self.base_dn)