Hi All,

Any one can give a thought on this ?



On Thu, Aug 1, 2019 at 7:55 PM sachidananda sahu <sachi059@gmail.com> wrote:

Hi All,

I recently upgraded to openldap 2.4.47, it's working with single threaded connection but with multi threaded getting problem due to global structure of ldapoptions in init.c

-------------------------
init.c
-------------------------
in tls2.c using the macro lo = LDAP_INT_GLOBAL_OPT(); 

So in case of multi threaded application multiple ldap connection will be using this global structure, for example ldo_tls_ctx of lapoptions will be used. In one thread it can be creating a tls connection and in one it can be destroying the connection. As it's global so it is getting corrupted. 

Is openldap library thread safe completely ? Because this variable seems to be not for this tls context variable, is there any other way of using this context . As i can see a local variable ldo_tls_ctx exist in dap ld->ldc->ldap_options->ldo_tls_ctx structure, but it's just got assigned with the same address of global structure in  ldap_int_tls_connect.

So can someone share some thoughts on it ?

--
Regards,
Sachidananda Sahu



--
Regards,
Sachidananda Sahu
+91-9035265767