The branch, master has been updated via 25a5a11 Avoid dclose(RTLD_NEXT) from edb5665 Bump version to 1.1.13
https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 25a5a112a87796b7ff309eb10d7e58519a641029 Author: Samuel Thibault <samuel.thiba...@ens-lyon.org> Date: Thu Nov 10 18:38:17 2022 +0000 Avoid dclose(RTLD_NEXT) In case the libc was not found and RTLD_NEXT is used instead, we should not dlclose it, otherwise mayhem happens. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15228 Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> Reviewed-by: Andreas Schneider <a...@samba.org> Reviewed-by: Pavel Filipenský <pfilipen...@samba.org> ----------------------------------------------------------------------- Summary of changes: src/nss_wrapper.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c index 07c9757..0b2066c 100644 --- a/src/nss_wrapper.c +++ b/src/nss_wrapper.c @@ -6499,13 +6499,25 @@ void nwrap_destructor(void) /* libc */ if (m->libc != NULL) { - if (m->libc->handle != NULL) { + if (m->libc->handle != NULL +#ifdef RTLD_NEXT + && m->libc->handle != RTLD_NEXT +#endif + ) { dlclose(m->libc->handle); } - if (m->libc->nsl_handle != NULL) { + if (m->libc->nsl_handle != NULL +#ifdef RTLD_NEXT + && m->libc->nsl_handle != RTLD_NEXT +#endif + ) { dlclose(m->libc->nsl_handle); } - if (m->libc->sock_handle != NULL) { + if (m->libc->sock_handle != NULL +#ifdef RTLD_NEXT + && m->libc->sock_handle != RTLD_NEXT +#endif + ) { dlclose(m->libc->sock_handle); } SAFE_FREE(m->libc); -- NSS Wrapper Repository