aboutsummaryrefslogtreecommitdiff
path: root/src/tests/t_kdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/t_kdb.py')
-rwxr-xr-xsrc/tests/t_kdb.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tests/t_kdb.py b/src/tests/t_kdb.py
index caa7e9d..de8ae9c 100755
--- a/src/tests/t_kdb.py
+++ b/src/tests/t_kdb.py
@@ -538,13 +538,19 @@ realm.run([kadminl, 'getprinc', 'pwuser'],
realm.stop()
-# Briefly test dump and load.
+# Test dump and load. Include a regression test for #8882
+# (pw_expiration not set during load operation).
mark('LDAP dump and load')
+realm.run([kadminl, 'modprinc', '-pwexpire', 'now', 'pwuser'])
dumpfile = os.path.join(realm.testdir, 'dump')
realm.run([kdb5_util, 'dump', dumpfile])
realm.run([kdb5_util, 'load', dumpfile], expected_code=1,
expected_msg='KDB module requires -update argument')
+realm.run([kadminl, 'delprinc', 'pwuser'])
realm.run([kdb5_util, 'load', '-update', dumpfile])
+out = realm.run([kadminl, 'getprinc', 'pwuser'])
+if 'Password expiration date: [never]' in out:
+ fail('pw_expiration not preserved across dump and load')
# Destroy the realm.
kldaputil(['destroy', '-f'])