[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Wed Jun 5 21:48:01 UTC 2024


The branch, master has been updated
       via  096d3807b05 build: Make "samba4" public libraries provided (mostly) for OpenChange private
       via  d11b281aefa build: Remove incorrect pyembed=True from samba-policy
       via  829b52f99d5 s4-libnet: Split up samba-net into samba-net and samba-net-join
      from  a54dca4ea54 tests/krb5: Calculate correct gMSA password to fix flapping test

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 096d3807b0588ed4d03bd99bc96163a4821ec010
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 27 09:24:13 2024 +1200

    build: Make "samba4" public libraries provided (mostly) for OpenChange private
    
    These libraries, mostly with ABI versions of 0.0.1 were made public in
    the early development of Samba4 and have not been seriously considered
    since.  Most are to allow OpenChange to build.
    
    While the OpenChange server is no longer actively used, the MAPI
    client is used and we need to allow packages to be built that will
    allow the Evolution MAPI client to still work.
    
    Some appear to be mistakes (dcerpc-samr), historical abberations
    (tevent-util) or ideas that did not go very far (the samba-policy
    library for example).
    
    To allow any remaining users to access them, they are not made private
    in the build system but are instead listed so that they can be made
    public again via ./configure with the same --private-libraries='!LIB'
    syntax introduced to make ldb private by default.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Jun  5 21:47:24 UTC 2024 on atb-devel-224

commit d11b281aefa98e6850053ccd6142253c6cf0d04f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 27 07:28:33 2024 +1200

    build: Remove incorrect pyembed=True from samba-policy
    
    This is a normal C library, used by python but does not use
    any python itself (nor by dependencies any longer).
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

commit 829b52f99d5a9c9df19c9eb67611618095967edd
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 27 19:44:38 2024 +1200

    s4-libnet: Split up samba-net into samba-net and samba-net-join
    
    samba-net-join links to python and so needs the variable name
    with the python ABI tag, while samba-net is a normal C library
    and can be included in a package without python dependencies.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                             | 21 +++++++++++++++++++++
 source4/lib/policy/wscript_build         | 13 ++++---------
 source4/libnet/libnet_join.c             |  1 +
 source4/libnet/libnet_vampire.c          |  1 +
 source4/libnet/py_net.c                  |  1 +
 source4/libnet/wscript_build             | 23 +++++++++++++++--------
 source4/torture/libnet/libnet_BecomeDC.c |  1 +
 source4/torture/rpc/testjoin.c           |  1 +
 source4/torture/wscript_build            |  6 +++---
 wscript                                  | 20 +++++++++++++++++++-
 10 files changed, 67 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 67bdb963cca..6d1368c42b1 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -69,6 +69,27 @@ never took into account later changes, and so has not worked for a
 number of years.  Samba 4.21 and LDB 2.10 removes this unused and
 broken feature.
 
+Some Samba public libraries made private by default
+---------------------------------------------------
+
+The following Samba C libraries are currently made public due to their
+use by OpenChange or for historical reasons that are no longer clear.
+
+ dcerpc-samr, samba-policy, tevent-util, dcerpc, samba-hostconfig,
+ samba-credentials, dcerpc_server, samdb
+
+The libraries used by the OpenChange client now private, but can be
+made public (like ldb above) with:
+
+ ./configure --private-libraries='!dcerpc,!samba-hostconfig,!samba-credentials,!ldb'
+
+The C libraries without any known user or used only for the OpenChange
+server (a dead project) may be made private entirely in a future Samba
+version.
+
+If you use a Samba library in this list, please be in touch with the
+samba-technical mailing list.
+
 Using ldaps from 'winbindd' and 'net ads'
 -----------------------------------------
 
diff --git a/source4/lib/policy/wscript_build b/source4/lib/policy/wscript_build
index 027d4bef0b6..f7d9b555f6a 100644
--- a/source4/lib/policy/wscript_build
+++ b/source4/lib/policy/wscript_build
@@ -3,20 +3,15 @@
 
 
 pytalloc_util = bld.pyembed_libname('pytalloc-util')
-samba_policy = bld.pyembed_libname('samba-policy')
-samba_net = bld.pyembed_libname('samba-net')
-bld.SAMBA_LIBRARY(samba_policy,
+bld.SAMBA_LIBRARY('samba-policy',
 	source='gp_ldap.c gp_filesys.c gp_manage.c gp_ini.c',
 	pc_files='samba-policy.pc',
-	public_deps='ldb %s' % samba_net,
+	public_deps='ldb samba-net',
 	vnum='0.0.1',
-	pyembed=True,
-	public_headers='policy.h',
-	enabled=bld.PYTHON_BUILD_IS_ENABLED()
-	)
+	public_headers='policy.h')
 bld.SAMBA_PYTHON(
         'py_policy',
         source='pypolicy.c',
-        public_deps='%s %s' % (samba_policy, pytalloc_util),
+        public_deps=f'samba-policy {pytalloc_util}',
         realname='samba/policy.so'
         )
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index d1afb4f22b9..e3d5e72fea1 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "libnet/libnet.h"
+#include "libnet/libnet_join_proto.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
 #include <ldb.h>
 #include <ldb_errors.h>
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 54bbbe36d8a..e29792f7db3 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "libnet/libnet.h"
+#include "libnet/libnet_join_proto.h"
 #include "lib/events/events.h"
 #include "dsdb/samdb/samdb.h"
 #include "../lib/util/dlinklist.h"
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 071ad0481ec..4544d1d90aa 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -26,6 +26,7 @@
 #include <pyldb.h>
 #include <pytalloc.h>
 #include "libnet.h"
+#include "libnet_join_proto.h"
 #include "auth/credentials/pycredentials.h"
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
diff --git a/source4/libnet/wscript_build b/source4/libnet/wscript_build
index 2dce60246c2..3f89af10434 100644
--- a/source4/libnet/wscript_build
+++ b/source4/libnet/wscript_build
@@ -4,21 +4,28 @@ pytalloc_util = bld.pyembed_libname('pytalloc-util')
 pyrpc_util = bld.pyembed_libname('pyrpc_util')
 pyldb_util = bld.pyembed_libname('pyldb-util')
 provision = bld.pyembed_libname('PROVISION')
-name = bld.pyembed_libname('samba-net')
+name = bld.pyembed_libname('samba-net-join')
 auto_proto='libnet_proto.h'
-bld.SAMBA_LIBRARY(name,
-        source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_join.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_vampire.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c',
+bld.SAMBA_LIBRARY('samba-net',
+        source='libnet.c libnet_passwd.c libnet_time.c libnet_rpc.c libnet_site.c libnet_become_dc.c libnet_unbecome_dc.c libnet_user.c libnet_group.c libnet_share.c libnet_lookup.c libnet_domain.c userinfo.c groupinfo.c userman.c groupman.c prereq_domain.c',
         autoproto=auto_proto,
         deps='INIT_SAMR',
-        public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser %s LIBCLI_SAMSYNC LIBTSOCKET GNUTLS_HELPERS' % (provision),
-        private_library=True,
-        pyembed=True,
-        enabled=bld.PYTHON_BUILD_IS_ENABLED()
+        public_deps='samba-credentials dcerpc dcerpc-samr RPC_NDR_LSA RPC_NDR_SRVSVC RPC_NDR_DRSUAPI cli_composite LIBCLI_RESOLVE LIBCLI_FINDDCS cli_cldap LIBCLI_FINDDCS gensec_schannel LIBCLI_AUTH ndr smbpasswdparser LIBCLI_SAMSYNC LIBTSOCKET GNUTLS_HELPERS',
+        private_library=True
         )
 
+bld.SAMBA_LIBRARY(name,
+                  source='libnet_join.c libnet_vampire.c',
+                  autoproto='libnet_join_proto.h',
+                  deps=f'samba-net {provision}',
+                  private_library=True,
+                  pyembed=True,
+                  enabled=bld.PYTHON_BUILD_IS_ENABLED()
+                  )
+
 bld.SAMBA_PYTHON('python_net',
         source='py_net.c',
-        deps='%s %s %s' % (name, pyrpc_util, pytalloc_util),
+        deps=f'samba-net {name} {pyrpc_util} {pytalloc_util}',
         realname='samba/net.so'
         )
 
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 45d386b079f..e88198daf2b 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -23,6 +23,7 @@
 #include "lib/cmdline/cmdline.h"
 #include "torture/rpc/torture_rpc.h"
 #include "libnet/libnet.h"
+#include "libnet/libnet_join_proto.h"
 #include "dsdb/samdb/samdb.h"
 #include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 6fb5f8627a1..6cf0232d82e 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -27,6 +27,7 @@
 #include "includes.h"
 #include "system/time.h"
 #include "libnet/libnet.h"
+#include "libnet/libnet_join_proto.h"
 #include "lib/cmdline/cmdline.h"
 #include "librpc/gen_ndr/ndr_lsa_c.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build
index 59db9f8f7d7..b38a30c98da 100644
--- a/source4/torture/wscript_build
+++ b/source4/torture/wscript_build
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 provision = bld.pyembed_libname('PROVISION')
-samba_net = bld.pyembed_libname('samba-net')
+samba_net_join = bld.pyembed_libname('samba-net-join')
 
 bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
 	source='util_smb.c',
@@ -189,7 +189,7 @@ bld.SAMBA_MODULE('torture_rpc',
                       printer_driver
                       RPC_NDR_MDSSVC
                       mdssvc
-                      ''' % samba_net + ntvfs_specific['deps'],
+                      ''' % samba_net_join + ntvfs_specific['deps'],
                  internal_module=True,
                  enabled=bld.PYTHON_BUILD_IS_ENABLED())
 
@@ -284,7 +284,7 @@ bld.SAMBA_MODULE('TORTURE_NET',
 	autoproto='libnet/proto.h',
 	subsystem='smbtorture',
 	init_function='torture_net_init',
-	deps='%s torture_rpc %s' % (provision, samba_net),
+	deps='%s torture_rpc %s' % (provision, samba_net_join),
 	internal_module=True,
 	enabled=bld.PYTHON_BUILD_IS_ENABLED()
 	)
diff --git a/wscript b/wscript
index 2959b083d47..be4f3122af6 100644
--- a/wscript
+++ b/wscript
@@ -16,7 +16,25 @@ from waflib.Tools import bison
 samba_dist.DIST_DIRS('.')
 samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions')
 
-DEFAULT_PRIVATE_LIBS = ["ldb"]
+# A function so the variables are not in global scope
+def get_default_private_libs():
+    # LDB is used by sssd (was made private by default in Samba 4.21)
+    SSSD_LIBS=["ldb"]
+    # These following libs without ABI checking were made private by default in Samba 4.21
+    # Presumably unused (dcerpc-samr was probably a copy and paste error,
+    # and samba-policy has primary use via python bindings).  tevent-util
+    # was for openchange but was for PIDL output that is no longer
+    # generated
+    POSSIBLY_UNUSED_LIBS=["dcerpc-samr","samba-policy","tevent-util"]
+    # These were used by mapiproxy in OpenChange (also used LDB and
+    # the real public libs tdb, talloc, tevent)
+    OPENCHANGE_SERVER_LIBS = ["dcerpc_server","samdb"]
+    # These (plus LDB, ndr, talloc, tevent) are used by the OpenChange
+    # client, which is still in use (Fedora/Red Hat packages it)
+    OPENCHANGE_LIBS = ["dcerpc","samba-hostconfig","samba-credentials"]
+    return SSSD_LIBS + POSSIBLY_UNUSED_LIBS + OPENCHANGE_LIBS + OPENCHANGE_SERVER_LIBS
+
+DEFAULT_PRIVATE_LIBS = get_default_private_libs()
 
 # install in /usr/local/samba by default
 default_prefix = Options.default_prefix = '/usr/local/samba'


-- 
Samba Shared Repository



More information about the samba-cvs mailing list