Milan Jurik wrote:
Hi Anton,
I agree that my use case is not usual (Native LDAP client on Solaris)
and Solaris fork is doing that. I was only surprised because based on
documentation NSS initialization should be done only once. Yes, in the
most use cases it should not be problem because there are not many
multithreaded consumers "fighting" for initialization on beginning.
Note that beginning with NSS 3.12.5 (and fixed in 3.12.6) there is
support for multiple NSS Init using the
NSS_InitContext/NSS_ShutdownContext API. This should be used in cases
where NSS may need to be initialized again e.g. from a library context
where the calling application may or may not have already initialized
NSS. It will require some changes to libssldap in order to use this new
API.
Best regards,
Milan
Anton Bobrov píše v pá 19. 03. 2010 v 17:08 +0100:
maybe, and i know it probably makes sense in your particular use case
where you fork continuously but for normal usage scenarios it never
has been a problem per se.
On 18/03/2010 10:46, Milan Jurik wrote:
I am looking at NSS initialization in libldap and I see that Mozilla
libldap is not protecting usage of inited variable:
On the beginning it tests for inited value if 0, but value is set much
later to 1, so several calls to ldapssl_clientauth_init() or
ldapssl_advclientauth_init() or ldapssl_pkcs_init() in parallel can lead
to many unnecessary ldapssl_basic_init() calls.
Would it be better to use some mutex for protection of it?
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap