[28512] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix KDC race in t_unlockiter.py
daemon@ATHENA.MIT.EDU (Tom Yu)
Wed Aug 6 17:16:25 2014
Date: Wed, 6 Aug 2014 17:16:20 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201408062116.s76LGKML026226@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/9831cb6930e40af1240ee67eef31c83ecadcce5c
commit 9831cb6930e40af1240ee67eef31c83ecadcce5c
Author: Tom Yu <tlyu@mit.edu>
Date: Wed Aug 6 15:03:03 2014 -0400
Fix KDC race in t_unlockiter.py
The second KDC startup in t_unlockiter.py could race with the
garbage-collected shutdown of the first, causing the second one to
fail to bind the listening port. Avoid the situation by setting
start_kdc=False, because there doesn't need to be a KDC running for
these tests anyway. Also use create_user=False and create_host=False,
because those principals aren't necessary either.
ticket: 7977
src/tests/t_unlockiter.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/tests/t_unlockiter.py b/src/tests/t_unlockiter.py
index d4ca4c5..2a438e9 100644
--- a/src/tests/t_unlockiter.py
+++ b/src/tests/t_unlockiter.py
@@ -3,14 +3,15 @@ from k5test import *
# Default KDB iteration is locked. Expect write lock failure unless
# unlocked iteration is explicitly requested.
-realm = K5Realm()
+realm = K5Realm(create_user=False, create_host=False, start_kdc=False)
realm.run(['./unlockiter'], expected_code=1)
realm.run(['./unlockiter', '-u'])
realm.run(['./unlockiter', '-l'], expected_code=1)
# Set default to unlocked iteration. Only explicitly requested locked
# iteration should block the write lock.
-realm = K5Realm(krb5_conf={'dbmodules': {'db': {'unlockiter': 'true'}}})
+realm = K5Realm(create_user=False, create_host=False, start_kdc=False,
+ krb5_conf={'dbmodules': {'db': {'unlockiter': 'true'}}})
realm.run(['./unlockiter'])
realm.run(['./unlockiter', '-u'])
realm.run(['./unlockiter', '-l'], expected_code=1)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5