lib:ldb: Don't use RTLD_DEEPBIND by default
Bind has support for jemalloc and the bind developers suggest to build with jemalloc in the meantime, as it makes it a lot faster. However when bind is build with jemalloc support and the Samba bind DLZ module is loaded, bind crashes on startup. The reason is that bind uses malloc/free from jemalloc and the bind dlz module will use libc functions because we set RTLD_DEEPBIND. The mix of malloc/free leads to the crash.
See
- https://bugzilla.redhat.com/show_bug.cgi?id=2278016
- https://bugzilla.samba.org/show_bug.cgi?id=15643
We should not use deepbind by default. If you have a Linux distributions, there will only be one Kerberos library on the system. If someone self compiles Samba and mixes Kerberos libraries, he should deal with the issues.
The source code had the following comment:
* So in future we may remove this completely
* or at least invert the default behavior.
This inverts the behavior. It also documents the variables in the manpage!
Checklist
-
Commits have Signed-off-by:
with name/author being identical to the commit author -
(optional) This MR is just one part towards a larger feature. -
(optional, if backport required) Bugzilla bug filed and BUG:
tag added -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated -
CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
-
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
-
This feature/change has adequate documentation added -
No obvious mistakes in the code