[Samba] Re: FINDNEXT problem, w2k and linux smbfs

Vlads vlads at sympatico.ca
Thu Jun 20 09:22:02 GMT 2002


Apparently
 There are OPEN bugs against this problem in smbfs
  PR#21407 and PR#24702 in http://bugs.samba.org/
  Also this is smbclient problem as well.

 smbclient Version 2.2.4

 Inconsistent directory listing on share mounted on linux from windows 2000.
 Some time not all files appear in the directory listing

This is automated test:

TDIR="YOURTESTDIR/LONGDIR90FILESORMORE"
TDIR="WINDOWS"
PASSWD=YourPWD
w2kservice=//w2k/c

dir_list() {
smbclient ${w2kservice} ${PASSWD} -D "${TDIR}" <<EOF
ls
exit 
EOF
}

smbl=`dir_list`
count1=`echo ${smbl} | wc -w`
cnt=1
ercnt=0
while true ; do
    smbl=`dir_list`
    count2=`echo ${smbl} | wc -w`
    if [ $count2 != 23 ]; then
       # count 23 when could not connect initialy. Ignore
    if [ $count2 != $count1 ]; then
       echo "Error: $count2 != $count1"
       echo $smbl
       ercnt=`expr ${ercnt} + 1`
    fi
    cnt=`expr ${cnt} + 1`
    echo "Test : $cnt -  ${ercnt} - $count2"
    if [ ${ercnt} -gt 3 ]; then
       exit
    fi
    fi
done


This is what it could make:
#1052 is words count in directory listing
Test : 1 -  0 -    1052
....
Test : 40 -  0 -    1052
#One file missing from lisisting
Error:    1039 !=    1052
Test : 41 -  1 -    1039
Error:    1039 !=    1052
Test : 42 -  2 -    1039
Test : 43 -  2 -    1052
Test : 44 -  2 -    1052
Test : 45 -  2 -    1052
....










More information about the samba mailing list