[PATCH] [s4] Fix smbclient "ls" infinite loop on windows server 2003

Sam Liddicott sam at liddicott.com
Wed Sep 23 04:20:05 MDT 2009


I note that samba3 smbclient requests resume keys, and samba4 smbclient
does not.

When samba3 smbclient lists files on a windows 2003 share with more than
512 files, it completes correctly, using the resume keys.

When samba4 smbclient lists the files on the same share, windows ignores
the filename passed (perhaps paying attention to the resume key of 0,
which is normally set from the fileindex) and windows begins listing
from the beginning, and so an infinite loop starts continues with
smbclient hoping to continue from the "mentioned" last file and windows
starting again each time.

Thus samba4 smbclient is unable to complete the "ls" command on a
windows 2003 server with more than 512 files.

This patch uses a resume-key like samba3 smbclient and like windows clients.

Signed-off-by: Sam Liddicott <sam at liddicott.com>
---
  source4/libcli/clilist.c |    8 +++++---
  1 files changed, 5 insertions(+), 3 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8f64ada6797f043fa4b2b51f627e3af060e9d3d3.diff
Type: text/x-patch
Size: 1834 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090923/ff241756/attachment.bin>


More information about the samba-technical mailing list