345 lines
11 KiB
Diff
345 lines
11 KiB
Diff
From 6793948ff3224a23768c4e525867c3201365122e Mon Sep 17 00:00:00 2001
|
|
From: Alexander Bokovoy <ab@samba.org>
|
|
Date: Thu, 13 Jul 2017 15:37:47 +0300
|
|
Subject: [PATCH 1/2] py3: Make sure to specify METH_VARARGS together with
|
|
METH_KEYWORDS
|
|
|
|
A Python 3 bug https://bugs.python.org/issue15657 explains that one should
|
|
always use METH_VARARGS|METH_KEYWORDS when defining a function rather
|
|
than a lonely METH_KEYWORDS. We had only one definition like this in
|
|
Samba and it was the one that affects FreeIPA when running in Python 3
|
|
mode.
|
|
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12905
|
|
|
|
Signed-off-by: Alexander Bokovoy <ab@samba.org>
|
|
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
(cherry picked from commit 303a52d8d48e4f5754448a876fedc98d7829e2bb)
|
|
---
|
|
source4/libnet/py_net.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
|
|
index 78e60f6d6a6..7ddee2df92c 100644
|
|
--- a/source4/libnet/py_net.c
|
|
+++ b/source4/libnet/py_net.c
|
|
@@ -745,7 +745,7 @@ static PyMethodDef net_obj_methods[] = {
|
|
{"replicate_init", (PyCFunction)py_net_replicate_init, METH_VARARGS|METH_KEYWORDS, py_net_replicate_init_doc},
|
|
{"replicate_chunk", (PyCFunction)py_net_replicate_chunk, METH_VARARGS|METH_KEYWORDS, py_net_replicate_chunk_doc},
|
|
{"replicate_decrypt", (PyCFunction)py_net_replicate_decrypt, METH_VARARGS|METH_KEYWORDS, py_net_replicate_decrypt_doc},
|
|
- {"finddc", (PyCFunction)py_net_finddc, METH_KEYWORDS, py_net_finddc_doc},
|
|
+ {"finddc", (PyCFunction)py_net_finddc, METH_VARARGS|METH_KEYWORDS, py_net_finddc_doc},
|
|
{ NULL }
|
|
};
|
|
|
|
--
|
|
2.13.0
|
|
|
|
|
|
From 02a40c970ccf3d6e9fb3a3c3b2052da93ff118a0 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Bokovoy <ab@samba.org>
|
|
Date: Thu, 13 Jul 2017 14:49:12 +0300
|
|
Subject: [PATCH 2/2] Build py3 versions of other rpc modules
|
|
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12905
|
|
|
|
Signed-off-by: Alexander Bokovoy <ab@samba.org>
|
|
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
|
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
|
|
Autobuild-Date(master): Fri Jul 14 11:36:53 CEST 2017 on sn-devel-144
|
|
|
|
(cherry picked from commit 0ed918ef5276c459d46c9e77c9e9d84bc41d4b14)
|
|
---
|
|
source4/librpc/wscript_build | 242 +++++++++++++++++++++----------------------
|
|
1 file changed, 121 insertions(+), 121 deletions(-)
|
|
|
|
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
|
|
index a14215bc5ac..e341432fa14 100644
|
|
--- a/source4/librpc/wscript_build
|
|
+++ b/source4/librpc/wscript_build
|
|
@@ -252,159 +252,159 @@ for env in bld.gen_python_environments():
|
|
realname='samba/dcerpc/ntlmssp.so'
|
|
)
|
|
|
|
-bld.SAMBA_PYTHON('python_srvsvc',
|
|
- source='../../librpc/gen_ndr/py_srvsvc.c',
|
|
- deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/srvsvc.so'
|
|
- )
|
|
-
|
|
-bld.SAMBA_PYTHON('python_echo',
|
|
- source='../../librpc/gen_ndr/py_echo.c',
|
|
- deps='RPC_NDR_ECHO pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/echo.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_srvsvc',
|
|
+ source='../../librpc/gen_ndr/py_srvsvc.c',
|
|
+ deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/srvsvc.so'
|
|
+ )
|
|
+
|
|
+ bld.SAMBA_PYTHON('python_echo',
|
|
+ source='../../librpc/gen_ndr/py_echo.c',
|
|
+ deps='RPC_NDR_ECHO pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/echo.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dns',
|
|
- source='../../librpc/gen_ndr/py_dns.c',
|
|
- deps='NDR_DNS pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/dns.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dns',
|
|
+ source='../../librpc/gen_ndr/py_dns.c',
|
|
+ deps='NDR_DNS pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/dns.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_winreg',
|
|
- source='../../librpc/gen_ndr/py_winreg.c',
|
|
- deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/winreg.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_winreg',
|
|
+ source='../../librpc/gen_ndr/py_winreg.c',
|
|
+ deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/winreg.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_initshutdown',
|
|
- source='../../librpc/gen_ndr/py_initshutdown.c',
|
|
- deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/initshutdown.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_initshutdown',
|
|
+ source='../../librpc/gen_ndr/py_initshutdown.c',
|
|
+ deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/initshutdown.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_epmapper',
|
|
- source='../../librpc/gen_ndr/py_epmapper.c',
|
|
- deps='dcerpc pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/epmapper.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_epmapper',
|
|
+ source='../../librpc/gen_ndr/py_epmapper.c',
|
|
+ deps='dcerpc pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/epmapper.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_mgmt',
|
|
- source='../../librpc/gen_ndr/py_mgmt.c',
|
|
- deps='pytalloc-util dcerpc pyrpc_util',
|
|
- realname='samba/dcerpc/mgmt.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_mgmt',
|
|
+ source='../../librpc/gen_ndr/py_mgmt.c',
|
|
+ deps='pytalloc-util dcerpc pyrpc_util',
|
|
+ realname='samba/dcerpc/mgmt.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_atsvc',
|
|
- source='../../librpc/gen_ndr/py_atsvc.c',
|
|
- deps='RPC_NDR_ATSVC pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/atsvc.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_atsvc',
|
|
+ source='../../librpc/gen_ndr/py_atsvc.c',
|
|
+ deps='RPC_NDR_ATSVC pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/atsvc.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_svcctl',
|
|
- source='../../librpc/gen_ndr/py_svcctl.c',
|
|
- deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/svcctl.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_svcctl',
|
|
+ source='../../librpc/gen_ndr/py_svcctl.c',
|
|
+ deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/svcctl.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_wkssvc',
|
|
- source='../../librpc/gen_ndr/py_wkssvc.c',
|
|
- deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/wkssvc.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_wkssvc',
|
|
+ source='../../librpc/gen_ndr/py_wkssvc.c',
|
|
+ deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/wkssvc.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_dfs',
|
|
- source='../../librpc/gen_ndr/py_dfs.c',
|
|
- deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/dfs.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dfs',
|
|
+ source='../../librpc/gen_ndr/py_dfs.c',
|
|
+ deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/dfs.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dcerpc_dcerpc',
|
|
- source='../../librpc/gen_ndr/py_dcerpc.c',
|
|
- deps='NDR_DCERPC pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/dcerpc.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dcerpc_dcerpc',
|
|
+ source='../../librpc/gen_ndr/py_dcerpc.c',
|
|
+ deps='NDR_DCERPC pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/dcerpc.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_unixinfo',
|
|
- source='../../librpc/gen_ndr/py_unixinfo.c',
|
|
- deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/unixinfo.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_unixinfo',
|
|
+ source='../../librpc/gen_ndr/py_unixinfo.c',
|
|
+ deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/unixinfo.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_irpc',
|
|
- source='gen_ndr/py_irpc.c',
|
|
- deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/irpc.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_irpc',
|
|
+ source='gen_ndr/py_irpc.c',
|
|
+ deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/irpc.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_server_id',
|
|
- source='../../librpc/gen_ndr/py_server_id.c',
|
|
- deps='RPC_NDR_SERVER_ID pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/server_id.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_server_id',
|
|
+ source='../../librpc/gen_ndr/py_server_id.c',
|
|
+ deps='RPC_NDR_SERVER_ID pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/server_id.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_winbind',
|
|
- source='../../librpc/gen_ndr/py_winbind.c',
|
|
- deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
|
|
- realname='samba/dcerpc/winbind.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_winbind',
|
|
+ source='../../librpc/gen_ndr/py_winbind.c',
|
|
+ deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
|
|
+ realname='samba/dcerpc/winbind.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_idmap',
|
|
- source='../../librpc/gen_ndr/py_idmap.c',
|
|
- deps='NDR_IDMAP pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/idmap.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_idmap',
|
|
+ source='../../librpc/gen_ndr/py_idmap.c',
|
|
+ deps='NDR_IDMAP pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/idmap.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_drsuapi',
|
|
- source='../../librpc/gen_ndr/py_drsuapi.c',
|
|
- deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/drsuapi.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_drsuapi',
|
|
+ source='../../librpc/gen_ndr/py_drsuapi.c',
|
|
+ deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/drsuapi.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dcerpc_dnsp',
|
|
- source='../../librpc/gen_ndr/py_dnsp.c',
|
|
- deps='pytalloc-util pyrpc_util NDR_SECURITY NDR_DNSP',
|
|
- realname='samba/dcerpc/dnsp.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dcerpc_dnsp',
|
|
+ source='../../librpc/gen_ndr/py_dnsp.c',
|
|
+ deps='pytalloc-util pyrpc_util NDR_SECURITY NDR_DNSP',
|
|
+ realname='samba/dcerpc/dnsp.so'
|
|
+ )
|
|
|
|
|
|
-bld.SAMBA_PYTHON('python_dcerpc_xattr',
|
|
- source='../../librpc/gen_ndr/py_xattr.c',
|
|
- deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
|
|
- realname='samba/dcerpc/xattr.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dcerpc_xattr',
|
|
+ source='../../librpc/gen_ndr/py_xattr.c',
|
|
+ deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
|
|
+ realname='samba/dcerpc/xattr.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dcerpc_idmap',
|
|
- source='../../librpc/gen_ndr/py_idmap.c',
|
|
- deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
|
|
- realname='samba/dcerpc/idmap.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dcerpc_idmap',
|
|
+ source='../../librpc/gen_ndr/py_idmap.c',
|
|
+ deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
|
|
+ realname='samba/dcerpc/idmap.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dnsserver',
|
|
- source='../../librpc/gen_ndr/py_dnsserver.c',
|
|
- deps='RPC_NDR_DNSSERVER pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/dnsserver.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dnsserver',
|
|
+ source='../../librpc/gen_ndr/py_dnsserver.c',
|
|
+ deps='RPC_NDR_DNSSERVER pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/dnsserver.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('python_dcerpc_smb_acl',
|
|
- source='../../librpc/gen_ndr/py_smb_acl.c',
|
|
- deps='pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/smb_acl.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('python_dcerpc_smb_acl',
|
|
+ source='../../librpc/gen_ndr/py_smb_acl.c',
|
|
+ deps='pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/smb_acl.so'
|
|
+ )
|
|
|
|
-bld.SAMBA_PYTHON('dcerpc_python_messaging',
|
|
- source='../../librpc/gen_ndr/py_messaging.c',
|
|
- deps='pytalloc-util pyrpc_util',
|
|
- realname='samba/dcerpc/messaging.so'
|
|
- )
|
|
+ bld.SAMBA_PYTHON('dcerpc_python_messaging',
|
|
+ source='../../librpc/gen_ndr/py_messaging.c',
|
|
+ deps='pytalloc-util pyrpc_util',
|
|
+ realname='samba/dcerpc/messaging.so'
|
|
+ )
|
|
|
|
if bld.PYTHON_BUILD_IS_ENABLED():
|
|
bld.SAMBA_SCRIPT('python_dcerpc_init',
|
|
--
|
|
2.13.0
|
|
|