s3: libsmb: use smb2cli_conn_max_trans_size() in cli_smb2_list()
authorRalph Boehme <slow@samba.org>
Tue, 20 Mar 2018 14:27:44 +0000 (15:27 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 1 Feb 2019 10:34:09 +0000 (11:34 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13736

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 580ff206431969dc2924d520053b956b7169ca07)

source3/libsmb/cli_smb2_fnum.c

index 7192521e38a83cca8a41bb9c42e91b388b120633..3cf16b325dd0700e403c6b8e895ac499dcf42edb 100644 (file)
@@ -911,6 +911,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
        TALLOC_CTX *frame = talloc_stackframe();
        TALLOC_CTX *subframe = NULL;
        bool mask_has_wild;
+       uint32_t max_trans = smb2cli_conn_max_trans_size(cli->conn);
 
        if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
@@ -974,7 +975,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
                                        ph->fid_persistent,
                                        ph->fid_volatile,
                                        mask,
-                                       0xffff,
+                                       max_trans,
                                        subframe,
                                        &dir_data,
                                        &dir_data_length);