smbc_opendir from 2.2.8a misses some files

Cameron Paine cbp at null.net
Mon Oct 20 07:01:45 GMT 2003


Apologies first:: I'm struggling with this one and a search of every
list/NG/bugtracker I can think of has returned only one possibly relevant
result.

The problem: when I call libsmbclient.so:smbc_opendir() on a directory I get
a variable number of entries returned from a directory with a static number
of files (and directories). I have confirmed this by placing a counter in
the list call-back function. The problem seems to be exacerbated by the
number of objects in the directory--the more there are, the more that are
missed. The same objects tend to be missed but the result can differ from
call to call.

The shares I've tested this on are hosted on w2k with SP[234] applied.
Unfortunately that's the only environment I have access to. I'm running
Samba 2.2.8a on Solaros 5.8 (2/02). I compiled it myself with gcc 3.0.1.

I found a posting to NG linux.samba from Yasuoka Masahiko
(yasuoka at second-software.com). He describes a similar problem and proposes a
fix to clilist.c:cli_list_new(). Unfortunately, his description and my
understanding of the code in that function do no align sufficiently for me
to experiment with coding changes. In summary his observation is that
cli_list_new() correctly implements the specified behaviour but that w2k
does not conform.

I need a fix for this urgently. I have recently deployed an application that
collects files from 90 wintel servers. The problem did not manifest itself
on the test platform (do they ever?), presumably because we were testing
with only a dozen-or-so files. I'm happy to hack the code but I'll need
guidance from someone who knows how cli_list_new() deals with the
findfirst/findnext transactions.

If people reply to me directly with substantive information I will summarise
back to the list.

The item I mentioned above is:

> From: Yasuoka Masahiko <yasuoka at second-software.com>
> Newsgroups: linux.samba
> Subject: [Samba] patch: smbclient lost some files
> Date: Fri, 18 Jul 2003 05:40:05 +0200
> Message-ID: augd.7Ti.3 at gated-at.bofh.it


Here's a google-link to it (beware of line breaks):

http://groups.google.com.au/groups?selm=augd.7Ti.3%40gated-at.bofh.it&oe=UTF
-8&output=gplain

Cameron Paine
cbp at null.net





More information about the samba-technical mailing list