smbXsrv.idl: add python bindings
authorStefan Metzmacher <metze@samba.org>
Fri, 24 Nov 2023 15:09:58 +0000 (16:09 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Jan 2024 10:21:34 +0000 (10:21 +0000)
This is useful for some scripting examples and debugging...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/librpc/idl/wscript_build
source4/librpc/wscript_build

index 28541d715b8327c6553db778488af13561913201..d12049b76d678dea9c8ccfc08ae5d63c64e85f19 100644 (file)
@@ -10,7 +10,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
                        smbXsrv.idl
                        leases_db.idl
                     ''',
-                    options='--includedir=%s --header --ndr-parser' % topinclude,
+                    options='--includedir=%s --header --ndr-parser --client --python' % topinclude,
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
index dd1494974e26dd7c1bb76fedacc60c1401f64d50..7cc12cf6ac6213673e38aa5ef3947b897bd6a532 100644 (file)
@@ -533,6 +533,18 @@ bld.SAMBA_PYTHON('python_mdssvc',
         cflags_end=gen_cflags
         )
 
+bld.SAMBA_SUBSYSTEM('RPC_NDR_SMBXSRV',
+    source='../../source3/librpc/gen_ndr/ndr_smbXsrv_c.c',
+    public_deps='dcerpc-binding NDR_SMBXSRV'
+    )
+
+bld.SAMBA_PYTHON('python_smbXsrv',
+        source='../../source3/librpc/gen_ndr/py_smbXsrv.c',
+        deps='RPC_NDR_SMBXSRV %s %s' % (pytalloc_util, pyrpc_util),
+        realname='samba/dcerpc/smbXsrv.so',
+        cflags_end=gen_cflags
+        )
+
 if bld.PYTHON_BUILD_IS_ENABLED():
     bld.SAMBA_SCRIPT('python_dcerpc_init',
                    pattern='rpc/dcerpc.py',