From: Sarah Day Date: Fri, 19 Aug 2016 20:06:48 +0000 (-0400) Subject: Test the minclasses policy field in LDAP X-Git-Tag: krb5-1.15-beta1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=058a688335019709a9135f5c6377bb41f7eac5c9;p=thirdparty%2Fkrb5.git Test the minclasses policy field in LDAP [ghudson@mit.edu: added reference to ticket 8193 in comment] --- diff --git a/src/tests/t_kdb.py b/src/tests/t_kdb.py index 46a051c984..5c17257dd4 100755 --- a/src/tests/t_kdb.py +++ b/src/tests/t_kdb.py @@ -384,6 +384,15 @@ def test_pwhist(nhist): for n in (1, 2, 3, 4, 5): test_pwhist(n) +# Regression test for #8193: test password character class requirements. +princ = 'charclassprinc' +pol = 'charclasspol' +realm.run([kadminl, 'addpol', '-minclasses', '3', pol]) +realm.run([kadminl, 'addprinc', '-policy', pol, '-nokey', princ]) +realm.run([kadminl, 'cpw', '-pw', 'abcdef', princ], expected_code=1) +realm.run([kadminl, 'cpw', '-pw', 'Abcdef', princ], expected_code=1) +realm.run([kadminl, 'cpw', '-pw', 'Abcdef1', princ]) + # Test principal renaming and make sure last modified is changed def get_princ(princ): out = realm.run([kadminl, 'getprinc', princ])