From: Andreas Schneider Date: Thu, 28 May 2020 15:29:25 +0000 (+0200) Subject: s3:pylibsmb: Add ipc=True support for CLI_FULL_CONNECTION_IPC X-Git-Tag: talloc-2.3.2~791 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c06dc1365125dea3dd78ba1eba7586cdc640dfb;p=thirdparty%2Fsamba.git s3:pylibsmb: Add ipc=True support for CLI_FULL_CONNECTION_IPC Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 3fcc3424a57..3579a040830 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -445,6 +445,8 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, int signing_state = SMB_SIGNING_DEFAULT; PyObject *py_force_smb1 = Py_False; bool force_smb1 = false; + PyObject *py_ipc = Py_False; + bool use_ipc = false; struct tevent_req *req; bool ret; int flags = 0; @@ -452,6 +454,7 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, static const char *kwlist[] = { "host", "share", "lp", "creds", "multi_threaded", "sign", "force_smb1", + "ipc", NULL }; @@ -462,12 +465,13 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, } ret = ParseTupleAndKeywords( - args, kwds, "ssO|O!OOO", kwlist, + args, kwds, "ssO|O!OOOO", kwlist, &host, &share, &py_lp, py_type_Credentials, &creds, &py_multi_threaded, &py_sign, - &py_force_smb1); + &py_force_smb1, + &py_ipc); Py_DECREF(py_type_Credentials); @@ -493,6 +497,11 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, flags = CLI_FULL_CONNECTION_FORCE_SMB1; } + use_ipc = PyObject_IsTrue(py_ipc); + if (use_ipc) { + flags |= CLI_FULL_CONNECTION_IPC; + } + if (multi_threaded) { #ifdef HAVE_PTHREAD ret = py_cli_state_setup_mt_ev(self);