(gss_userok): remove poking inside the delegated handle

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12320 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-05-21 15:04:27 +00:00
parent 6ab45444b7
commit 59c5cdf594

View File

@@ -73,9 +73,7 @@ gss_userok(void *app_data, char *username)
/* more of krb-depend stuff :-( */ /* more of krb-depend stuff :-( */
/* gss_add_cred() ? */ /* gss_add_cred() ? */
if (data->delegated_cred_handle && if (data->delegated_cred_handle != GSS_C_NO_CREDENTIAL) {
data->delegated_cred_handle->ccache ) {
krb5_ccache ccache = NULL; krb5_ccache ccache = NULL;
char* ticketfile; char* ticketfile;
struct passwd *pw; struct passwd *pw;
@@ -98,8 +96,10 @@ gss_userok(void *app_data, char *username)
ret = gss_krb5_copy_ccache(&minor_status, ret = gss_krb5_copy_ccache(&minor_status,
data->delegated_cred_handle, data->delegated_cred_handle,
ccache); ccache);
if (ret) if (ret) {
ret = 0;
goto fail; goto fail;
}
chown (ticketfile+5, pw->pw_uid, pw->pw_gid); chown (ticketfile+5, pw->pw_uid, pw->pw_gid);
@@ -111,9 +111,6 @@ gss_userok(void *app_data, char *username)
fail: fail:
if (ccache) if (ccache)
krb5_cc_close(gssapi_krb5_context, ccache); krb5_cc_close(gssapi_krb5_context, ccache);
krb5_cc_destroy(gssapi_krb5_context,
data->delegated_cred_handle->ccache);
data->delegated_cred_handle->ccache = NULL;
free(ticketfile); free(ticketfile);
} }