From b209d68f8cae400bfc18cc7057572e10055c3ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 17 Apr 2004 17:09:31 +0000 Subject: [PATCH] (fcc_remove_cred): simplistic implementation, XXX add locking git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13730 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/fcache.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index 1a14afd3a..5ea93b6ba 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -618,7 +618,31 @@ fcc_remove_cred(krb5_context context, krb5_flags which, krb5_creds *cred) { - return 0; /* XXX */ + krb5_error_code ret; + krb5_ccache copy; + + ret = krb5_cc_gen_new(context, &krb5_mcc_ops, ©); + if (ret) + return ret; + + ret = krb5_cc_copy_cache(context, id, copy); + if (ret) { + krb5_cc_destroy(context, copy); + return ret; + } + + ret = krb5_cc_remove_cred(context, copy, which, cred); + if (ret) { + krb5_cc_destroy(context, copy); + return ret; + } + + fcc_destroy(context, id); + + ret = krb5_cc_copy_cache(context, copy, id); + krb5_cc_destroy(context, copy); + + return ret; } static krb5_error_code