From 59c5cdf594969c41f8b130a0991f339e9304d078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 21 May 2003 15:04:27 +0000 Subject: [PATCH] (gss_userok): remove poking inside the delegated handle git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12320 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/gss_userok.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/appl/ftp/ftpd/gss_userok.c b/appl/ftp/ftpd/gss_userok.c index 560714ec1..c0658fb5e 100644 --- a/appl/ftp/ftpd/gss_userok.c +++ b/appl/ftp/ftpd/gss_userok.c @@ -73,9 +73,7 @@ gss_userok(void *app_data, char *username) /* more of krb-depend stuff :-( */ /* gss_add_cred() ? */ - if (data->delegated_cred_handle && - data->delegated_cred_handle->ccache ) { - + if (data->delegated_cred_handle != GSS_C_NO_CREDENTIAL) { krb5_ccache ccache = NULL; char* ticketfile; struct passwd *pw; @@ -98,8 +96,10 @@ gss_userok(void *app_data, char *username) ret = gss_krb5_copy_ccache(&minor_status, data->delegated_cred_handle, ccache); - if (ret) + if (ret) { + ret = 0; goto fail; + } chown (ticketfile+5, pw->pw_uid, pw->pw_gid); @@ -111,9 +111,6 @@ gss_userok(void *app_data, char *username) fail: if (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); }