summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-06-14 14:15:05 -0400
committerGreg Hudson <ghudson@mit.edu>2012-06-15 00:15:37 -0400
commitcdb50c57f1852dabda4929129e1470e6b334a812 (patch)
treee1f818416eab12a70202d6ef740271e5111ad8c2 /src/tests
parent85afc74759792cfd3ed53daa7f42bce11ca4c536 (diff)
downloadkrb5-cdb50c57f1852dabda4929129e1470e6b334a812.tar.gz
krb5-cdb50c57f1852dabda4929129e1470e6b334a812.tar.xz
krb5-cdb50c57f1852dabda4929129e1470e6b334a812.zip
Fail from gss_acquire_cred if we have no creds
If a caller tries to acquire krb5 initiator creds with no desired name and we have no credentials in the cache collection, fail from gss_acquire_cred intead of deferring until gss_init_sec_context. ticket: 7160
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/gssapi/t_ccselect.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/gssapi/t_ccselect.py b/src/tests/gssapi/t_ccselect.py
index a3a1330d6..5350d9209 100644
--- a/src/tests/gssapi/t_ccselect.py
+++ b/src/tests/gssapi/t_ccselect.py
@@ -45,6 +45,13 @@ refserver = 'host/' + hostname + '@'
#r1.run_as_client(['/bin/sh', '-c', '(echo rkt %s; echo wkt %s) | %s' %
# (r1.keytab, r2.keytab, ktutil)])
+# Verify that we can't get initiator creds with no credentials in the
+# collection.
+output = r1.run_as_client(['./t_ccselect', r1.host_princ, '-'],
+ expected_code=1)
+if 'No Kerberos credentials available' not in output:
+ fail('Expected error not seen in output when no credentials available')
+
# Make a directory collection and use it for client commands in both realms.
ccdir = os.path.join(r1.testdir, 'cc')
ccname = 'DIR:' + ccdir