#47570 slapi_ldap_init unusable during independent plugin development
Closed: wontfix None Opened 7 years ago by beall.

Due to the uninitialized interaction_table_mutex in snmp_collator.c, slapi_ldap_init cannot be called when linked into an independent executable.

Independent development would be good to remain available without having to switch APIs to use regular ldap_initialize, and also so as to not confuse other developers if they try something like this.

The following hack compiled into libslapd.so allows the above development to work properly. Some other way of doing this properly should probably be considered.

diff ~/Downloads/389-ds-base-1.2.11.23/ldap/servers/slapd/snmp_collator.c ~/Downloads/389-ds-base-1.2.11.23-modified/ldap/servers/slapd/snmp_collator.c
239a240

if (! interaction_table_mutex) interaction_table_mutex = PR_NewLock();


Description:
RFE: making slapi_ldap_init callable without snmp_collator_init.
The api slapi_ldap_init calls set_snmp_interaction_row, in which
interaction_table_mutex is held. This patch replaces NSPR PR_(Un)Lock with
slapi_(un)lock_mutex. The slapi_(un)lock_mutex skips locking if the mutex
is not initialized.

Reviewed by Rich (Thank you!!)

Pushed to master:
4db4a0e..03533f2 master -> master
commit 03533f2

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.3 - 1/14 (January)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/907

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

9 months ago

Login to comment on this ticket.

Metadata