Opened 8 years ago
Last modified 8 years ago
#313 new defect
Directory listings over SMB2+ do not report all files
Reported by: | Paul Smedley | Owned by: | Paul Smedley |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Samba Client Plugin | Version: | Client 3.0.x |
Keywords: | Cc: |
Description
A directory listing of a folder on a server over SMB2 or above does not report all files.
For example, a folder with 939 files in it (when viewed from linux) is reporting:
1,325,059,584 bytes (1,263MB) in 429 files and 2 dirs
using NDPSMB 3.0 (and Samba 4.4.x)
Change History (2)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
OK, http://smedley.id.au/tmp/ndpsmb-3.0-20170609.zip seems to fix this.
After wasting way too much time on it this afternoon, the answer was staring me in the face.
In list_files_smb2() I had previous added a workaround for a case where status is returned as NT_STATUS_WAIT_1 not NT_STATUS_OK.
Problem was that further down that function, status still equaled NT_STATUS_WAIT_1 not NT_STATUS_OK, so the function aborted, and we only got a partial directory listing.
I've added a patch for this, will check it into svn tomorrow (Saturday).
NT1 protocol:
SMB3 protocol:
No idea (yet) why....