From: Stefan Metzmacher Date: Tue, 20 Jun 2017 06:02:40 +0000 (+0200) Subject: s3:pylibsmb: use CLI_FULL_CONNECTION_FORCE_SMB1 in py_cli_state_init() X-Git-Tag: tevent-0.9.32~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e35c63f4e665d42e9a844d9f9385d591bdfc7e0;p=thirdparty%2Fsamba.git s3:pylibsmb: use CLI_FULL_CONNECTION_FORCE_SMB1 in py_cli_state_init() For now we only support SMB1, as most of the cli_*_send() function don't support SMB2, it's only plugged into the sync wrapper functions currently. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 59c09983688..39afdc8a952 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -411,6 +411,13 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, struct cli_credentials *cli_creds; struct tevent_req *req; bool ret; + /* + * For now we only support SMB1, + * as most of the cli_*_send() function + * don't support SMB2, it's only plugged + * into the sync wrapper functions currently. + */ + int flags = CLI_FULL_CONNECTION_FORCE_SMB1; static const char *kwlist[] = { "host", "share", "credentials", NULL @@ -444,7 +451,7 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, req = cli_full_connection_creds_send( NULL, self->ev, "myname", host, NULL, 0, share, "?????", - cli_creds, 0, 0); + cli_creds, flags, 0); if (!py_tevent_req_wait_exc(self->ev, req)) { return -1; }