]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Add test for kinit -C WRONG_REALM response 243/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 23 Jan 2015 17:52:31 +0000 (12:52 -0500)
committerGreg Hudson <ghudson@mit.edu>
Fri, 23 Jan 2015 21:10:30 +0000 (16:10 -0500)
ticket: 8060

src/tests/t_general.py

index 98e77a2f7444807fbab54e52ca34e8f60a7648eb..5349b05b5ac146f9ba136fcfc5374d0879792edd 100755 (executable)
@@ -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],