From 18d07082b6110fccc90d219cc9bd276008ab9488 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 13 Jul 2017 15:37:47 +0300 Subject: [PATCH] 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 Reviewed-by: Andrew Bartlett (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.11.4.GIT