aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-11-05 14:12:35 -0500
committerTom Yu <tlyu@mit.edu>2015-02-14 16:10:08 -0500
commite8b7e7be0a47fb6a014214755c0deb85a499c4e2 (patch)
tree42fa91f17300981f9ffcabaeef0569dfb6dc230b
parente4800ab5b69b09efcf9916b7130d1edabb2e6e01 (diff)
downloadkrb5-e8b7e7be0a47fb6a014214755c0deb85a499c4e2.zip
krb5-e8b7e7be0a47fb6a014214755c0deb85a499c4e2.tar.gz
krb5-e8b7e7be0a47fb6a014214755c0deb85a499c4e2.tar.bz2
Fix input race condition in t_skew.py
In two of the kinit tests run by t_skew.py, we expect kinit to exit before reading the password. If we supply a password input for those commands, we can fail with a broken pipe exception if the master process tries to write the password after the slave process exits. Also correctly check the output of the last kinit invocation. (cherry picked from commit 2457bf66c466321dd36cd3c76bc36bb589d31587) ticket: 8147 (new) version_fixed: 1.11.6 status: resolved
-rw-r--r--src/tests/t_skew.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/t_skew.py b/src/tests/t_skew.py
index 18bd922..0b2671b 100644
--- a/src/tests/t_skew.py
+++ b/src/tests/t_skew.py
@@ -40,7 +40,7 @@ realm.kinit(realm.user_princ, password('user'),
out = realm.kinit(realm.user_princ, password('user'), expected_code=1)
if 'Clock skew too great in KDC reply' not in out:
fail('Expected error message not seen in kinit skew case')
-out = realm.kinit(realm.user_princ, password('user'), flags=['-T', fast_cache],
+out = realm.kinit(realm.user_princ, None, flags=['-T', fast_cache],
expected_code=1)
if 'Clock skew too great while' not in out:
fail('Expected error message not seen in kinit FAST skew case')
@@ -50,8 +50,8 @@ realm.run_kadminl('modprinc +requires_preauth user')
out = realm.kinit(realm.user_princ, password('user'), expected_code=1)
if 'Clock skew too great while' not in out:
fail('Expected error message not seen in kinit skew case (preauth)')
-realm.kinit(realm.user_princ, password('user'), flags=['-T', fast_cache],
- expected_code=1)
+out = realm.kinit(realm.user_princ, None, flags=['-T', fast_cache],
+ expected_code=1)
if 'Clock skew too great while' not in out:
fail('Expected error message not seen in kinit FAST skew case (preauth)')