Opened 7 years ago

Last modified 7 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 Changed 7 years ago by Paul Smedley

NT1 protocol:

3,184,425,513 bytes (3,036MB) in 951 files and 3 dirs

SMB3 protocol:

1,325,059,584 bytes (1,263MB) in 429 files and 2 dirs

No idea (yet) why....

comment:2 Changed 7 years ago by Paul Smedley

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).

Note: See TracTickets for help on using tickets.