From a80614fe3098be42f330a73c5af28e646a86a042 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 29 Dec 2023 14:32:51 +0000 Subject: [PATCH] third_party/*_wrapper: use SAMBA_LIBRARY(force_unversioned=True) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prevents --private-libraries=ALL from creating unuseable wrapper libraries, as they can't work with symbol versioning. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15545 Signed-off-by: Stefan Metzmacher Reviewed-by: Björn Jacke Reviewed-by: Ralph Boehme --- third_party/nss_wrapper/wscript | 3 ++- third_party/pam_wrapper/wscript | 4 +++- third_party/resolv_wrapper/wscript | 3 ++- third_party/socket_wrapper/wscript | 3 ++- third_party/uid_wrapper/wscript | 3 ++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/third_party/nss_wrapper/wscript b/third_party/nss_wrapper/wscript index 178e4e16eef..28aeb510719 100644 --- a/third_party/nss_wrapper/wscript +++ b/third_party/nss_wrapper/wscript @@ -87,10 +87,11 @@ def configure(conf): def build(bld): if bld.CONFIG_SET("HAVE_NSS_H") and not bld.CONFIG_SET("USING_SYSTEM_NSS_WRAPPER"): # We need to do it this way or the library wont work. - # Using private_library=True will add symbol version which + # We need force_unversioned=True as symbol versioning # breaks preloading! bld.SAMBA_LIBRARY('nss_wrapper', source='nss_wrapper.c nss_utils.c', deps='dl pthread', install=False, + force_unversioned=True, realname='libnss-wrapper.so') diff --git a/third_party/pam_wrapper/wscript b/third_party/pam_wrapper/wscript index 3ce89bbbc27..599072fe478 100644 --- a/third_party/pam_wrapper/wscript +++ b/third_party/pam_wrapper/wscript @@ -87,12 +87,13 @@ def configure(conf): def build(bld): if not bld.CONFIG_SET("USING_SYSTEM_PAM_WRAPPER"): # We need to do it this way or the library wont work. - # Using private_library=True will add symbol version which + # We need force_unversioned=True as symbol versioning # breaks preloading! bld.SAMBA_LIBRARY('pam_wrapper', source='pam_wrapper.c', deps='dl pthread', install=False, + force_unversioned=True, realname='libpam-wrapper.so') bld.SAMBA_SUBSYSTEM('libpamtest', @@ -103,6 +104,7 @@ def build(bld): source='modules/pam_set_items.c', deps='pam', install=False, + force_unversioned=True, realname='pam_set_items.so') pypamtest_cflags = '' diff --git a/third_party/resolv_wrapper/wscript b/third_party/resolv_wrapper/wscript index 9aa06bc1508..43b38d61b6a 100644 --- a/third_party/resolv_wrapper/wscript +++ b/third_party/resolv_wrapper/wscript @@ -85,10 +85,11 @@ def configure(conf): def build(bld): if bld.CONFIG_SET("HAVE_RESOLV_H") and not bld.CONFIG_SET("USING_SYSTEM_RESOLV_WRAPPER"): # We need to do it this way or the library wont work. - # Using private_library=True will add symbol version which + # We need force_unversioned=True as symbol versioning # breaks preloading! bld.SAMBA_LIBRARY('resolv_wrapper', source='resolv_wrapper.c', deps='dl resolv', install=False, + force_unversioned=True, realname='libresolv-wrapper.so') diff --git a/third_party/socket_wrapper/wscript b/third_party/socket_wrapper/wscript index fdd09f24ce9..9d2210d9c35 100644 --- a/third_party/socket_wrapper/wscript +++ b/third_party/socket_wrapper/wscript @@ -110,7 +110,7 @@ def configure(conf): def build(bld): if not bld.CONFIG_SET("USING_SYSTEM_SOCKET_WRAPPER"): # We need to do it this way or the library wont work. - # Using private_library=True will add symbol version which + # We need force_unversioned=True as symbol versioning # breaks preloading! bld.SAMBA_LIBRARY('socket_wrapper', source='socket_wrapper.c', @@ -121,4 +121,5 @@ def build(bld): VERSION), deps='dl pthread tirpc', install=False, + force_unversioned=True, realname='libsocket-wrapper.so') diff --git a/third_party/uid_wrapper/wscript b/third_party/uid_wrapper/wscript index c9238818466..7b65d930640 100644 --- a/third_party/uid_wrapper/wscript +++ b/third_party/uid_wrapper/wscript @@ -115,10 +115,11 @@ syscall(SYS_setgroups32, 0, NULL); def build(bld): if not bld.CONFIG_SET("USING_SYSTEM_UID_WRAPPER"): # We need to do it this way or the library wont work. - # Using private_library=True will add symbol version which + # We need force_unversioned=True as symbol versioning # breaks preloading! bld.SAMBA_LIBRARY('uid_wrapper', source='uid_wrapper.c', deps='dl pthread', install=False, + force_unversioned=True, realname='libuid-wrapper.so')