libsmb: Pass neg contexts through sync smbXcli_negprot_recv()
authorVolker Lendecke <vl@samba.org>
Tue, 19 Sep 2023 18:10:12 +0000 (11:10 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 25 Sep 2023 19:59:17 +0000 (19:59 +0000)
Looks much larger than it is, there's a lot of callers too feed NULL to.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Sep 25 19:59:17 UTC 2023 on atb-devel-224

12 files changed:
libcli/smb/smbXcli_base.c
libcli/smb/smbXcli_base.h
source3/libsmb/clidfs.c
source3/libsmb/libsmb_server.c
source3/libsmb/passchange.c
source3/nmbd/nmbd_synclists.c
source3/torture/test_posix.c
source3/torture/test_smb2.c
source3/torture/torture.c
source3/utils/net_rpc.c
source3/utils/net_time.c
source3/winbindd/winbindd_cm.c

index c3df227861811acbcbc51e3e1b48845759f8beac..d3a70cce85fd0312469561609a8df09c8636c8c5 100644 (file)
@@ -5595,7 +5595,10 @@ NTSTATUS smbXcli_negprot_recv(
 NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
                         uint32_t timeout_msec,
                         enum protocol_types min_protocol,
-                        enum protocol_types max_protocol)
+                        enum protocol_types max_protocol,
+                        struct smb2_negotiate_contexts *in_ctx,
+                        TALLOC_CTX *mem_ctx,
+                        struct smb2_negotiate_contexts **out_ctx)
 {
        TALLOC_CTX *frame = talloc_stackframe();
        struct tevent_context *ev;
@@ -5622,7 +5625,7 @@ NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
                min_protocol,
                max_protocol,
                WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK,
-               NULL);
+               in_ctx);
        if (req == NULL) {
                goto fail;
        }
@@ -5630,7 +5633,7 @@ NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
        if (!ok) {
                goto fail;
        }
-       status = smbXcli_negprot_recv(req, NULL, NULL);
+       status = smbXcli_negprot_recv(req, mem_ctx, out_ctx);
  fail:
        TALLOC_FREE(frame);
        return status;
index fef68b6b38db82025e1237d62dceed634f2b3376..f582cc9964c139c03ed9f76f6ba7a8398f85474c 100644 (file)
@@ -481,7 +481,10 @@ NTSTATUS smbXcli_negprot_recv(
 NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
                         uint32_t timeout_msec,
                         enum protocol_types min_protocol,
-                        enum protocol_types max_protocol);
+                        enum protocol_types max_protocol,
+                        struct smb2_negotiate_contexts *in_ctx,
+                        TALLOC_CTX *mem_ctx,
+                        struct smb2_negotiate_contexts **out_ctx);
 
 struct tevent_req *smb2cli_validate_negotiate_info_send(TALLOC_CTX *mem_ctx,
                                                struct tevent_context *ev,
index d7dbf97f8fb877e62a8d1865cf041c8d9e9253ee..1437844b4271836958c074875361624a6b2f676e 100644 (file)
@@ -193,9 +193,13 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
 
        DEBUG(4,(" session request ok\n"));
 
-       status = smbXcli_negprot(c->conn, c->timeout,
+       status = smbXcli_negprot(c->conn,
+                                c->timeout,
                                 lp_client_min_protocol(),
-                                lp_client_max_protocol());
+                                lp_client_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
                d_printf("Protocol negotiation (with timeout %d ms) timed out against server %s\n",
index a65f0f356c34f3d57d702d4331cfcaed047108d7..69b51b829f6c1367ddd346d703d7fdbe3a5df6a9 100644 (file)
@@ -555,9 +555,13 @@ SMBC_server_internal(TALLOC_CTX *ctx,
 
        cli_set_timeout(c, smbc_getTimeout(context));
 
-       status = smbXcli_negprot(c->conn, c->timeout,
+       status = smbXcli_negprot(c->conn,
+                                c->timeout,
                                 lp_client_min_protocol(),
-                                lp_client_max_protocol());
+                                lp_client_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                cli_shutdown(c);
                errno = map_errno_from_nt_status(status);
index 716bfa39a3b8b31d1c101cdfdd5a0ba8217195f0..b3304ed6fc5d8e893d9c3de4c7734afbfb63067f 100644 (file)
@@ -74,9 +74,13 @@ NTSTATUS remote_password_change(const char *remote_machine,
                                       false); /* password_is_nt_hash */
        SMB_ASSERT(creds != NULL);
 
-       result = smbXcli_negprot(cli->conn, cli->timeout,
+       result = smbXcli_negprot(cli->conn,
+                                cli->timeout,
                                 lp_client_ipc_min_protocol(),
-                                lp_client_ipc_max_protocol());
+                                lp_client_ipc_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
 
        if (!NT_STATUS_IS_OK(result)) {
                if (asprintf(err_str, "machine %s rejected the negotiate "
index d291927fbc88c82b2bc3f0084f80d1cd0b3e4756..0f5c42f6a793c6557f3773e4123eec7162ed7bd3 100644 (file)
@@ -90,8 +90,13 @@ static void sync_child(char *name, int nm_type,
                return;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout, PROTOCOL_CORE,
-                                PROTOCOL_NT1);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_CORE,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                cli_shutdown(cli);
                return;
index 6ce5851d240e310e8d6fec4baad067b7d4330c94..dbf72db7b037a6eab64ffa96ebee31d265abb746 100644 (file)
@@ -320,7 +320,10 @@ bool run_posix_ls_single_test(int dummy)
        status = smbXcli_negprot(cli_win->conn,
                                 cli_win->timeout,
                                 lp_client_min_protocol(),
-                                lp_client_max_protocol());
+                                lp_client_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                TALLOC_FREE(frame);
index 672c38e2b55e2e9b73b288c60f7fd06e95c748d1..ff43764bb03510512cef211755f20f8affd74dae 100644 (file)
@@ -55,8 +55,13 @@ bool run_smb2_basic(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_SMB2_02);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB2_02,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -257,8 +262,13 @@ bool run_smb2_negprot(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_CORE, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_CORE,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -274,8 +284,13 @@ bool run_smb2_negprot(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                protocol, protocol);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                protocol,
+                                protocol,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET) &&
            !NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_DISCONNECTED) &&
            !NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_ABORTED)) {
@@ -306,8 +321,13 @@ bool run_smb2_anonymous(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -358,8 +378,13 @@ bool run_smb2_session_reconnect(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli1->conn, cli1->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli1->conn,
+                                cli1->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -446,8 +471,13 @@ bool run_smb2_session_reconnect(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli2->conn, cli2->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli2->conn,
+                                cli2->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -802,8 +832,13 @@ bool run_smb2_tcon_dependence(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -949,22 +984,37 @@ bool run_smb2_multi_channel(int dummy)
 
        cli_state_client_guid = saved_guid;
 
-       status = smbXcli_negprot(cli1->conn, cli1->timeout,
-                                PROTOCOL_SMB3_00, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli1->conn,
+                                cli1->timeout,
+                                PROTOCOL_SMB3_00,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
        }
 
-       status = smbXcli_negprot(cli2->conn, cli2->timeout,
-                                PROTOCOL_SMB3_00, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli2->conn,
+                                cli2->timeout,
+                                PROTOCOL_SMB3_00,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
        }
 
-       status = smbXcli_negprot(cli3->conn, cli3->timeout,
-                                PROTOCOL_SMB3_00, PROTOCOL_LATEST);
+       status = smbXcli_negprot(cli3->conn,
+                                cli3->timeout,
+                                PROTOCOL_SMB3_00,
+                                PROTOCOL_LATEST,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -1556,8 +1606,13 @@ bool run_smb2_session_reauth(int dummy)
         * and returns NT_STATUS_REQUEST_NOT_ACCEPTED,
         * while it allows it on PROTOCOL_SMB2_10.
         */
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_10, PROTOCOL_SMB2_10);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_10,
+                                PROTOCOL_SMB2_10,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -2110,8 +2165,13 @@ bool run_smb2_ftruncate(int dummy)
                goto fail;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_SMB2_02);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB2_02,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                goto fail;
@@ -2478,8 +2538,13 @@ bool run_smb2_dir_fsync(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_SMB2_02);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB2_02,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -2541,8 +2606,13 @@ bool run_smb2_path_slash(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
-                                PROTOCOL_SMB2_02, PROTOCOL_SMB2_02);
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB2_02,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -2786,9 +2856,12 @@ bool run_smb2_sacl(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3094,9 +3167,12 @@ bool run_smb2_quota1(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3164,9 +3240,12 @@ bool run_smb2_stream_acl(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3386,9 +3465,12 @@ bool run_list_dir_async_test(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3461,9 +3543,12 @@ bool run_delete_on_close_non_empty(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3615,9 +3700,12 @@ bool run_delete_on_close_nonwrite_delete_yes_test(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -3726,9 +3814,12 @@ bool run_delete_on_close_nonwrite_delete_no_test(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -4195,9 +4286,12 @@ bool run_smb2_dfs_paths(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -4599,9 +4693,12 @@ bool run_smb2_non_dfs_share(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -4764,9 +4861,12 @@ bool run_smb2_dfs_share_non_dfs_path(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -4979,9 +5079,12 @@ bool run_smb2_dfs_filename_leading_backslash(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
@@ -5162,9 +5265,12 @@ bool run_smb2_pipe_read_async_disconnect(int dummy)
        }
 
        status = smbXcli_negprot(cli->conn,
-                               cli->timeout,
-                               PROTOCOL_SMB2_02,
-                               PROTOCOL_SMB3_11);
+                                cli->timeout,
+                                PROTOCOL_SMB2_02,
+                                PROTOCOL_SMB3_11,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("smbXcli_negprot returned %s\n", nt_errstr(status));
                return false;
index 3598e301174902ea9ceeba01bfbd1d2ca4434395..e80e8f7d8b69126a47a49aa43da2b9625466c22f 100644 (file)
@@ -10318,8 +10318,13 @@ static bool run_error_map_extract(int dummy) {
        }
        disable_spnego = false;
 
-       status = smbXcli_negprot(c_nt->conn, c_nt->timeout, PROTOCOL_CORE,
-                                PROTOCOL_NT1);
+       status = smbXcli_negprot(c_nt->conn,
+                                c_nt->timeout,
+                                PROTOCOL_CORE,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                printf("%s rejected the NT-error negprot (%s)\n", host,
@@ -10346,8 +10351,13 @@ static bool run_error_map_extract(int dummy) {
        disable_spnego = false;
        force_dos_errors = false;
 
-       status = smbXcli_negprot(c_dos->conn, c_dos->timeout, PROTOCOL_CORE,
-                                PROTOCOL_NT1);
+       status = smbXcli_negprot(c_dos->conn,
+                                c_dos->timeout,
+                                PROTOCOL_CORE,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                printf("%s rejected the DOS-error negprot (%s)\n", host,
                       nt_errstr(status));
@@ -11525,7 +11535,10 @@ static bool run_large_readx(int dummy)
                status = smbXcli_negprot(cli2->conn,
                                         cli2->timeout,
                                         runs[i].protocol,
-                                        runs[i].protocol);
+                                        runs[i].protocol,
+                                        NULL,
+                                        NULL,
+                                        NULL);
                if (!NT_STATUS_IS_OK(status)) {
                        goto out;
                }
@@ -14865,7 +14878,13 @@ static bool run_smb1_truncated_sesssetup(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(conn, 0, PROTOCOL_NT1, PROTOCOL_NT1);
+       status = smbXcli_negprot(conn,
+                                0,
+                                PROTOCOL_NT1,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, "smbXcli_negprot failed!\n");
                return false;
@@ -15048,7 +15067,13 @@ static bool run_smb1_negotiate_exit(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(conn, 0, PROTOCOL_NT1, PROTOCOL_NT1);
+       status = smbXcli_negprot(conn,
+                                0,
+                                PROTOCOL_NT1,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, "smbXcli_negprot failed!\n");
                return false;
@@ -15094,7 +15119,13 @@ static bool run_smb1_negotiate_tcon(int dummy)
        }
        smbXcli_conn_set_sockopt(cli->conn, sockops);
 
-       status = smbXcli_negprot(cli->conn, 0, PROTOCOL_NT1, PROTOCOL_NT1);
+       status = smbXcli_negprot(cli->conn,
+                                0,
+                                PROTOCOL_NT1,
+                                PROTOCOL_NT1,
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, "smbXcli_negprot failed %s!\n",
                        nt_errstr(status));
@@ -15147,7 +15178,13 @@ static bool run_ign_bad_negprot(int dummy)
                return false;
        }
 
-       status = smbXcli_negprot(conn, 0, PROTOCOL_CORE, PROTOCOL_CORE);
+       status = smbXcli_negprot(conn,
+                                0,
+                                PROTOCOL_CORE,
+                                PROTOCOL_CORE,
+                                NULL,
+                                NULL,
+                                NULL);
        if (NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, "smbXcli_negprot succeeded!\n");
                return false;
index a55de7d5df8ebfcaf9665c73a3e8c4b3e44a2f82..19c8f096281a5f01ab63e1c9039626d96f2bc995 100644 (file)
@@ -7463,9 +7463,13 @@ bool net_rpc_check(struct net_context *c, unsigned flags)
                }
                return false;
        }
-       status = smbXcli_negprot(cli->conn, cli->timeout,
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
                                 lp_client_min_protocol(),
-                                lp_client_max_protocol());
+                                lp_client_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status))
                goto done;
        if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_NT1)
index d102f84614f4e20f1a3da91372d8ebde54bd094e..f58d62b45ce002ff882b41daf1f6d8462011d33c 100644 (file)
@@ -47,9 +47,13 @@ static time_t cli_servertime(const char *host,
                goto done;
        }
 
-       status = smbXcli_negprot(cli->conn, cli->timeout,
+       status = smbXcli_negprot(cli->conn,
+                                cli->timeout,
                                 lp_client_min_protocol(),
-                                lp_client_max_protocol());
+                                lp_client_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
        if (!NT_STATUS_IS_OK(status)) {
                fprintf(stderr, _("Protocol negotiation failed: %s\n"),
                        nt_errstr(status));
index 2fab9ceadf76aab0095b39fe8107241d9433f178..13ab6754fd3be63b92c094b2faa44f641134fe94 100644 (file)
@@ -782,9 +782,13 @@ static NTSTATUS cm_prepare_connection(struct winbindd_domain *domain,
 
        set_socket_options(sockfd, lp_socket_options());
 
-       result = smbXcli_negprot((*cli)->conn, (*cli)->timeout,
+       result = smbXcli_negprot((*cli)->conn,
+                                (*cli)->timeout,
                                 lp_client_ipc_min_protocol(),
-                                lp_client_ipc_max_protocol());
+                                lp_client_ipc_max_protocol(),
+                                NULL,
+                                NULL,
+                                NULL);
 
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(1, ("cli_negprot failed: %s\n", nt_errstr(result)));