From: Greg Hudson Date: Fri, 23 Jan 2015 17:52:31 +0000 (-0500) Subject: Add test for kinit -C WRONG_REALM response X-Git-Tag: krb5-1.14-alpha1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0778ab2252ece4c3510788d9b72f7f5e3bb05dd;p=thirdparty%2Fkrb5.git Add test for kinit -C WRONG_REALM response ticket: 8060 --- diff --git a/src/tests/t_general.py b/src/tests/t_general.py index 98e77a2f74..5349b05b5a 100755 --- a/src/tests/t_general.py +++ b/src/tests/t_general.py @@ -33,6 +33,13 @@ realm.stop() realm = K5Realm(create_host=False) +# Test that WRONG_REALM responses aren't treated as referrals unless +# they contain a crealm field pointing to a different realm. +# (Regression test for #8060.) +out = realm.run([kinit, '-C', 'notfoundprinc'], expected_code=1) +if 'not found in Kerberos database' not in out: + fail('Expected error message not seen in kinit -C output') + # Spot-check KRB5_TRACE output tracefile = os.path.join(realm.testdir, 'trace') realm.run(['env', 'KRB5_TRACE=' + tracefile, kinit, realm.user_princ],