third_party/*_wrapper: use SAMBA_LIBRARY(force_unversioned=True)
authorStefan Metzmacher <metze@samba.org>
Fri, 29 Dec 2023 14:32:51 +0000 (14:32 +0000)
committerStefan Metzmacher <metze@samba.org>
Thu, 4 Jan 2024 11:39:36 +0000 (11:39 +0000)
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 <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
third_party/nss_wrapper/wscript
third_party/pam_wrapper/wscript
third_party/resolv_wrapper/wscript
third_party/socket_wrapper/wscript
third_party/uid_wrapper/wscript

index 178e4e16eef31f872098463747d081b0be6b654b..28aeb51071982b0f0d98a97b4d19e55505fd080d 100644 (file)
@@ -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')
index 3ce89bbbc2797904c34cbaf676b92042ef3988cf..599072fe478c1da15985876339ad0761519b845c 100644 (file)
@@ -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 = ''
index 9aa06bc1508a42b89ca42f6d61a7e1a4bfe9c4a6..43b38d61b6a9cc44dee925a160130df1150b3733 100644 (file)
@@ -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')
index fdd09f24ce980200409fd4b938ba73571333a21a..9d2210d9c35ce898d59cc41230d221c2a4bb8c35 100644 (file)
@@ -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')
index c92388184665957239626e217f0d90f828f9b97d..7b65d930640c950aae74543b0dd9fcb2de674217 100644 (file)
@@ -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')