diff options
author | Greg Hudson <ghudson@mit.edu> | 2015-04-21 13:39:34 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2015-07-06 14:51:05 -0400 |
commit | 1be1c3593e6a50cbed2e5d2d52b98d4413f669d4 (patch) | |
tree | ade5464cfeb44efb75fc7af1f4191ed8a8bba2f5 /src/appl | |
parent | e110ce6ed19f5349e304e826e6b8066312c6c15c (diff) | |
download | krb5-1be1c3593e6a50cbed2e5d2d52b98d4413f669d4.zip krb5-1be1c3593e6a50cbed2e5d2d52b98d4413f669d4.tar.gz krb5-1be1c3593e6a50cbed2e5d2d52b98d4413f669d4.tar.bz2 |
Use memory cache in gss_acquire_cred_with_password
gss_acquire_cred_with_password() was originally introduced in Solaris.
When we introduced it in 1.9, we unfortunately gave it different and
less useful semantics. Restore this function to the Solaris
semantics, which are to always get credentials and store them in a
private memory ccache. The caller can use gss_store_cred() to make
the resulting creds visible to other processes if desired.
ticket: 8152
Diffstat (limited to 'src/appl')
-rwxr-xr-x | src/appl/gss-sample/t_gss_sample.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/appl/gss-sample/t_gss_sample.py b/src/appl/gss-sample/t_gss_sample.py index c53edd6..f6cd18c 100755 --- a/src/appl/gss-sample/t_gss_sample.py +++ b/src/appl/gss-sample/t_gss_sample.py @@ -41,7 +41,6 @@ def server_client_test(realm, options): if 'Signature verified.' not in output: fail('Expected message not seen in gss-client output') stop_daemon(server) - realm.klist(realm.user_princ, realm.host_princ) # Make up a filename to hold user's initial credentials. def ccache_savefile(realm): @@ -59,19 +58,25 @@ def ccache_restore(realm): def tgs_test(realm, options): ccache_restore(realm) server_client_test(realm, options) + realm.klist(realm.user_princ, realm.host_princ) # Perform a test of the server and client with initial credentials # obtained through gss_acquire_cred_with_password(). def pw_test(realm, options): - os.remove(realm.ccache) + if os.path.exists(realm.ccache): + os.remove(realm.ccache) server_client_test(realm, options + ['-user', realm.user_princ, '-pass', password('user')]) + if os.path.exists(realm.ccache): + fail('gss_acquire_cred_with_password created ccache') # Perform a test of the server and client with initial credentials # obtained with the client keytab def kt_test(realm, options): - os.remove(realm.ccache) + if os.path.exists(realm.ccache): + os.remove(realm.ccache) server_client_test(realm, options) + realm.klist(realm.user_princ, realm.host_princ) for realm in multipass_realms(): ccache_save(realm) |