[38275] in Kerberos

home help back first fref pref prev next nref lref last post

Re: krb5 ccache of MEMORY type

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jun 29 15:47:05 2018

To: Roman Semenov <rasemenov@yahoo.com>, "kerberos@mit.edu" <kerberos@mit.edu>
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <9176f227-34a5-be65-4639-b49ef80cb5bf@mit.edu>
Date: Fri, 29 Jun 2018 15:46:49 -0400
MIME-Version: 1.0
In-Reply-To: <1886810138.473864.1530299085673@mail.yahoo.com>
Content-Language: en-US
Content-Type: text/plain; charset="utf-8"
Errors-To: kerberos-bounces@mit.edu
Content-Transfer-Encoding: 8bit

On 06/29/2018 03:04 PM, Roman Semenov wrote:
> I have a question regarding the subject:Is the krb5_ccahe thread safe at all when it's of type MEMORY?

Yes.  Memory ccache objects are internally locked, as is the global 
table mapping names to memory caches.

> Everything works fine while krb5 FILE type of ccache is in use. ow I want to improve performance and switch to MEMORY type of ccache. And I start getting my app crashed intermittently.

I'm not currently aware of a memory ccache bug which would account for this.

> That makes me think - is the krb5_ccahe thread safe at all when it's of type MEMORY?Should I have a global krb5_context associated with that cache in this scenario?

No, it's fine to use the same memory ccache with different krb5_context 
objects, and is preferrable in a multi-threaded program since 
krb5_context objects are not themselves internally locked.
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


home help back first fref pref prev next nref lref last post