#51193 Ticket 51175 - resolve plugin name leaking
Closed by spichugi. Opened by firstyear.
firstyear/389-ds-base 51175-rust-plugin-name-leak  into  master

Download 51193.patch

Bug Description: Previously pblock.c assumed that all plugin
names were static c strings. Rust can't create static C
strings, so these were intentionally leaked.

Fix Description: Rather than leak these, we do a dup/free
through the slapiplugin struct instead, meaning we can use
ephemeral, and properly managed strings in rust. This does not
affect any other existing code which will still handle the
static strings correctly.

https://pagure.io/389-ds-base/issue/51175

Author: William Brown william@blackhats.net.au

Review by: ???

The fix looks good to me. ACK for the C part.
For Rust, I just look at it but being novice on rust. I trust you :)

Why comment this logging out?

Do these need to be freed before overwriting the pointer with a duplicated array?

Why comment this logging out?

Because when you run with -d1 the server takes 15 minutes to shutdown if this exists. :|

Do these need to be freed before overwriting the pointer with a duplicated array?

This value is never over-written as I understand it, because every pblock with a slapiplugin is a new slapdplugin, and we are doing a first-time assignment here. Perhaps the right thing here is a PR_ASSERT that the value starts as null before we do the assignment?

For Rust, I just look at it but being novice on rust. I trust you :)

This seems like a mistake to trust me :) I make plenty of mistakes :)

rebased onto 55bf719e65ced0d9da301c44b1be35cdfdfa2256

rebased onto 55bf719e65ced0d9da301c44b1be35cdfdfa2256

Sorry for the delay, I've added the PR_ASSERTs in pblock for @mreynolds

cool. I'll probably merge this tomorrow I have an appointment I'm about to leave for. Appreciate it mate :)

rebased onto 017fda070b86844d4860041a6e42ab12d7588836

Pull-Request has been merged by firstyear

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 pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4246

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata