[30080] in Kerberos

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

krb5_context in a threaded process

daemon@ATHENA.MIT.EDU (aditham@yahoo.com)
Tue Jul 8 17:19:52 2008

From: aditham@yahoo.com
Date: Tue, 8 Jul 2008 08:25:51 -0700 (PDT)
Message-ID: <e2fe0cfc-80a3-4f71-b74f-0781eed13872@c58g2000hsc.googlegroups.com>
Mime-Version: 1.0
X-Complaints-To: groups-abuse@google.com
Complaints-To: groups-abuse@google.com
To: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

I need to initialize multiple krb5_context's in a multi-threaded
program
and each context *must* be initialized from a different config file.

krb5_init_context() seems to read config from /etc/krb5.conf or the
file
pointed to by KRB5_CONFIG. Setting the environment variable will not
work since
"env"is for the process, not the thread.

I was wondering if there is a better way to do this, other than
creating a mutex
to set/get the KRB5_CONFIG env variable before each krb5_init_context.

thanks
R.K
________________________________________________
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