#48902 ns-slapd shutdown crashes if pwdstorageschema name is from stack.
Closed: Fixed None Opened 3 years ago by firstyear.

Due to 48872 we now actually free and close plugins correctly.

However, this has exposed a number of issues in other plugins not behaving correctly. In the TET tests the xorplugin assign a name to SLAPI_PLUGIN_PWD_STORAGE_SCHEME_NAME from the stack rather than the heap. When plugin_closeall is called, this causes a segfault as slapi_ch_free_string(&plugin->plg_pwdstorageschemename); is trying to free something that it cannot.

The fix is that we should be strduping the name, and then freeing that in the plugin_free. This way plugins can allocate from heap or stack and we do not cause these faults.


commit 2309c38
Writing objects: 100% (11/11), 1.46 KiB | 0 bytes/s, done.
Total 11 (delta 8), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
34c9293..2309c38 master -> master

Metadata Update from @nhosoi:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.5.9

2 years ago

Login to comment on this ticket.

Metadata