summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
committerGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
commit4a788fb072b06ab25fb39c7720e2fe7bb79fd7f4 (patch)
tree6518c12735e9b4eb1d96b9af7b58ab2b50aa6b21 /src/tests
parent18884ca01e1a64fcefafc0fdad0d360651c81f13 (diff)
downloadkrb5-4a788fb072b06ab25fb39c7720e2fe7bb79fd7f4.tar.gz
krb5-4a788fb072b06ab25fb39c7720e2fe7bb79fd7f4.tar.xz
krb5-4a788fb072b06ab25fb39c7720e2fe7bb79fd7f4.zip
Add default_ccache_name profile variable
Like default_keytab_name and default_client_keytab_name, default_ccache_name is subject to parameter expansion. ticket: 7220 (new)
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/t_ccache.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/t_ccache.py b/src/tests/t_ccache.py
index 8dac0ecad..e85d009dd 100644
--- a/src/tests/t_ccache.py
+++ b/src/tests/t_ccache.py
@@ -78,4 +78,15 @@ output = realm.run_as_client([klist, '-l'], expected_code=1)
if not output.endswith('---\n') or output.count('\n') != 2:
fail('kdestroy -a failed to empty cache collection.')
+# Test parameter expansion in default_ccache_name
+realm.stop()
+conf = {'client': {'libdefaults': {
+ 'default_ccache_name': 'testdir/%{null}abc%{uid}'}}}
+realm = K5Realm(krb5_conf=conf, create_kdb=False)
+del realm.env_client['KRB5CCNAME']
+uidstr = str(os.getuid())
+out = realm.run_as_client([klist], expected_code=1)
+if 'FILE:testdir/abc%s' % uidstr not in out:
+ fail('Wrong ccache in klist')
+
success('Credential cache tests')