Is MIT kerberos thread safe ??

Ken Raeburn raeburn at MIT.EDU
Fri Mar 13 10:23:28 EDT 2009

On Mar 13, 2009, at 02:19, Nikhil Mishra wrote:
> As far as I understand , Context object has some profile related  
> objects
> which is essentially a global static variable and this might give me  
> some
> trouble .

The profile objects are shared when derived from the same set of  
config files (which can be controlled via environment variables), to  
reduce file accesses for a common case; however, locking is used  
internally on the profile objects.

> The thing that I am trying to do here is , My box gets N users per  
> second
> and I would like to authenticate all of them ( so , basically fetch  
> the TGT)
> through kerberos. I was trying to run all of them through a thread  
> based
> solution .
> If thats the case I can may be create a context once and share it  
> across
> all
> the threads for fetching the credentials ?

Not without locking, as other data in the context is modified without  
additional locking.  A context can only be used in one thread at a  
time.  (And auth_context likewise.)


More information about the krbdev mailing list