[Samba] [PATCH] smbclient cli_list_new bug

Urban Widmark urban at teststation.com
Wed Jun 26 14:48:02 GMT 2002


On Mon, 24 Jun 2002, Vlad Skarzhevskyy wrote:

> >That is hard to do since the code isn't part of samba ... :)
> 
>  The same algorithm should be used in smbclient. This is what I was talinkg
> about.
>  The same readdir bug are in smbclient.

It certainly is (but it wasn't easy to read that from your message ;).

http://www.hojdpunkten.ac.se/054/samba/samba-2.2.5-nt-dirlisting.patch

Patch summary:
  Do not use the continue bit to continue a find_first/find_next.
  Under some circumstances NT/win2k (and win9x?) will drop files when 
  doing that. This patch mimics NT behaviour[1] of sending lastname and 
  not using the continue bit.

  I also removed the resume key flag, but didn't fix 
  interpret_long_filename()


Using your smbclient testscript I can easily trigger the failure with a
vanilla 2.2-something smbclient. You seemed to be able to trigger this
error much more easily than me before, so perhaps you'd like to give this 
patch a spin?


This patch borrows from some smbfs code I made to support win95 after
adding the lastname code you tested. Ironically this makes smbclient not
work with win95 anymore ... :)

That needs fixing before anyone should consider this for the tree.

I'll fix that once you have verified that this works for you.
(And I'll release an update smbfs patch once I get my bits untangled from 
 bitkeeper ...)

/Urban


[1] - NT4sp6 talking to a samba server. Should perhaps verify that they 
      send the same when talking to each other + win2k + xp.





More information about the samba mailing list