s3:pylibsmb: use CLI_FULL_CONNECTION_FORCE_SMB1 in py_cli_state_init()
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Jun 2017 06:02:40 +0000 (08:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 22 Jun 2017 11:07:40 +0000 (13:07 +0200)
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 <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/pylibsmb.c

index 59c09983688d77f127d0dbcda924ebf1b4fc017d..39afdc8a9526fc8db02eb463bb43e819cda30b02 100644 (file)
@@ -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;
        }