]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Add test for kinit -C WRONG_REALM response
authorTom Yu <tlyu@mit.edu>
Sat, 7 Feb 2015 03:17:30 +0000 (22:17 -0500)
committerTom Yu <tlyu@mit.edu>
Sat, 7 Feb 2015 03:19:57 +0000 (22:19 -0500)
(back ported from commit c0778ab2252ece4c3510788d9b72f7f5e3bb05dd)

ticket: 8122
version_fixed: 1.11.6
status: resolved

src/tests/t_general.py

index 77246d52f2f47ae0f46482593953abcbf74143eb..178de3755d4cc3746fca215d56e1983012556b3b 100755 (executable)
@@ -49,6 +49,13 @@ if 'fred\n' not in output:
 if 'barney\n' not in output:
     fail('Policy not preserved across dump/load.')
 
+# 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_as_client([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_as_client(['env', 'KRB5_TRACE=' + tracefile, kinit,