mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:pylibsmb: Add ipc=True support for CLI_FULL_CONNECTION_IPC
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
c58a301c27
commit
8c06dc1365
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user