The OPENCLOSE flag is intended to be a matter of optimization, not correctness. Another thread using the already-open file shouldn't generally be a problem; it will just be a little faster. Are you seeing a more severe issue than this? (I can think of a scenario where there are two overlapping krb5_cc_retrieve_cred_seqs running in different threads, and when the first one finishes, it turns the OPENCLOSE flag back on, causing the other thread to run less efficiently. But I still don't see that causing a user-visible problem, just an efficiency issue.)