Bug 2641 - cli_list_new fails to resume with XP SP 2
Summary: cli_list_new fails to resume with XP SP 2
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.0.14a
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-23 05:38 UTC by Eugeny Yakimovitch
Modified: 2005-10-04 04:51 UTC (History)
0 users

See Also:


Attachments
possible patch for the bug (667 bytes, patch)
2005-04-23 05:42 UTC, Eugeny Yakimovitch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugeny Yakimovitch 2005-04-23 05:38:55 UTC
how to reproduce: 
Bug reproduces itself when function cli_list_new is called. This happens, for 
example, when smbclient does ls or libsmbclient does the call. 
Connect to Win XP SP2 service, find a dir with list of files huge enough to 
be listed in more then one request. Do ls to invoke the cli_list_new.. It will 
get cycled. 
 
The problem is that listing doesn't resume from the right position. First i can 
receive 31 files (. .. film.avi, etc.) but after that i will receive the same 
31 minus first one file. 
 
Possible fix for me may look like this patch for cli_list.c 
208,209c208,214 
<                          can miss filenames. Use last filename continue 
instead. JRA */ 
<                       SSVAL(param,10,(FLAG_TRANS2_FIND_REQUIRE_RESUME|
FLAG_TRANS2_FIND_CLOSE_IF_END));        /* resume required + close on end */ 
--- 
>                          can miss filenames. Use last filename continue 
instead. JRA */ 
>                       if (strcmp(cli->server_os,"Windows 5.1")==0) { 
>                       /* But we still need this flag for WIN XP SP2 machines 
*/ 
>                           SSVAL(param,10,(FLAG_TRANS2_FIND_CONTINUE|
FLAG_TRANS2_FIND_REQUIRE_RESUME|FLAG_TRANS2_FIND_CLOSE_IF_END)); 
>                       } else { 
>                           SSVAL(param,10,(FLAG_TRANS2_FIND_REQUIRE_RESUME|
FLAG_TRANS2_FIND_CLOSE_IF_END));    /* resume required + close on end */ 
>                       }
Comment 1 Eugeny Yakimovitch 2005-04-23 05:42:02 UTC
Created attachment 1168 [details]
possible patch for the bug

We still need this continue flag. I don't know how to manage request without
it.
Comment 2 Jeremy Allison 2005-04-23 23:14:12 UTC
Can you send me an ethereal capture trace please of a Win2k or WinXP client
doing a findfirst/findnext against an XP SP2 server as well so I can see what it
does.

Thanks,

Jeremy.
Comment 3 Jeremy Allison 2005-04-25 13:46:11 UTC
Ok, I've tested this with a Windows 2003 SP1 client and an smbclient against a
directory containing 6000 files served from a WinXP SP2 box and they are both
identical (return all files). The W2K3 SP1 client does *not* use the "continue" bit.
I need to see your capture file as this is not reproducible here.
Jeremy.

Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-10-04 04:51:15 UTC
closing.  Should be fixed now (FAT on WinXP)