The branch, master has been updated
       via  95bf43b s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set 
STATUS_NO_MORE_FILES when handed a non-wildcard path.
      from  4bec186 samba-tool group add: Add option --nis-domain and --gid

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 95bf43bc6a0b6a4a47b8a556eee3b78446ea4123
Author: Jeremy Allison <j...@samba.org>
Date:   Tue Oct 21 14:41:32 2014 -0700

    s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set 
STATUS_NO_MORE_FILES when handed a non-wildcard path.
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Steve French <smfre...@gmail.com>
    Tested-by: Ralph Boehme <s...@samba.org>
    
    Autobuild-User(master): Steve French <sfre...@samba.org>
    Autobuild-Date(master): Thu Oct 23 20:44:31 CEST 2014 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/cli_smb2_fnum.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index a099e03..de4bd6f 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -667,6 +667,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
        bool processed_file = false;
        TALLOC_CTX *frame = talloc_stackframe();
        TALLOC_CTX *subframe = NULL;
+       bool mask_has_wild;
 
        if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
@@ -690,6 +691,8 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
                goto fail;
         }
 
+       mask_has_wild = ms_has_wild(mask);
+
        status = cli_smb2_create_fnum(cli,
                        parent_dir,
                        0,                      /* create_flags */
@@ -791,6 +794,17 @@ NTSTATUS cli_smb2_list(struct cli_state *cli,
 
                TALLOC_FREE(subframe);
 
+               if (!mask_has_wild) {
+                       /*
+                        * MacOSX 10 doesn't set STATUS_NO_MORE_FILES
+                        * when handed a non-wildcard path. Do it
+                        * for the server (with a non-wildcard path
+                        * there should only ever be one file returned.
+                        */
+                       status = STATUS_NO_MORE_FILES;
+                       break;
+               }
+
        } while (NT_STATUS_IS_OK(status));
 
        if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES)) {


-- 
Samba Shared Repository

Reply via email to