1 # This is a regression test for
2 # https://bugzilla.redhat.com/show_bug.cgi?id=586032 .
4 # We start a KDC, remove the kadm5 lock file, use the KDC, re-create the
5 # kadm5 lock file, and use kadmin.local. The kinit should fail, and the
6 # kadmin.local should succeed.
14 realm = K5Realm(create_user=False, bdb_only=True)
17 kadm5_lock = os.path.join(realm.testdir, 'db.kadm5.lock')
18 if not os.path.exists(kadm5_lock):
19 fail('kadm5 lock file not created: ' + kadm5_lock)
22 realm.kinit(p, p, [], expected_code=1,
23 expected_msg='A service is not available')
25 f = open(kadm5_lock, 'w')
28 output = realm.run([kadminl, 'modprinc', '-allow_tix', p])
29 if 'Cannot lock database' in output:
30 fail('krb5kdc still holds a lock on the principal db')
32 success('KDB locking tests')