]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-libnet: Split up samba-net into samba-net and samba-net-join
authorAndrew Bartlett <abartlet@samba.org>
Mon, 27 May 2024 07:44:38 +0000 (19:44 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Jun 2024 20:42:34 +0000 (20:42 +0000)
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@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source4/lib/policy/wscript_build
source4/libnet/libnet_join.c
source4/libnet/libnet_vampire.c
source4/libnet/py_net.c
source4/libnet/wscript_build
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/rpc/testjoin.c
source4/torture/wscript_build

index 027d4bef0b67c6442dcb6eadf692ce222ebabd30..92eaafac64137200af7ddd02c644dc1391197f9d 100644 (file)
@@ -4,11 +4,10 @@
 
 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,
        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',
index d1afb4f22b94f7d3785a1934a9538e57cdf03728..e3d5e72fea15ad820ba3421a13707057b0c81a3c 100644 (file)
@@ -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>
index 54bbbe36d8a65f5f38733035e33b99e0d36a38f3..e29792f7db33ae4dff420f3a7d83829d933ebe03 100644 (file)
@@ -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"
index 071ad0481ecd47cfa6eaf8ab9567ca6e58434965..4544d1d90aa0fb3b3e19685553c20861c302ed27 100644 (file)
@@ -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"
index 2dce60246c2cc9ffee37489e9e0d123ba134ea43..3f89af10434dd534bf41f336f6204c1e0e85d4e1 100644 (file)
@@ -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'
         )
 
index 45d386b079f91e01d8f156f8feb27eef44852333..e88198daf2b84af2d7bf93f10dba5612fa20d79a 100644 (file)
@@ -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"
index 6fb5f8627a1234d4904f42821a09fc28afbc2b1a..6cf0232d82ef83698c4eaf4b436e1b5c4fcafff8 100644 (file)
@@ -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"
index 59db9f8f7d70cf6be6ac37f10d1f2936ac8ab5ee..b38a30c98da112a1bab35ffd6de3826fe04dea7e 100644 (file)
@@ -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()
        )