Hi, Does anyone know how to clear out the Kerberos ticket cache on the local computer - using managed \ unmanaegd code?
Thanks in advance!
Hi, Does anyone know how to clear out the Kerberos ticket cache on the local computer - using managed \ unmanaegd code?
Thanks in advance!
The simple, stupid way:
system("kdestroy");
Or if you want to be more legit, just check out the source of a kdestroy
implementation. krb5_cc_destroy()
seems to be the relevant function call.
I believe you need to do a call to LsaCallAuthenticationPackage using KERB_PURGE_TKT_CACHE_REQUEST after using either LsaConnectUntrusted or LsaRegisterLogonProcess. Sorry no specifics, but I don't have my code for this around...
The most simple way is to take the source code of Microsoft's KList (Included in the platform SDK\ Samples), and to do like them...