Bug 2519 - 'smbclient' returns incomplete 'dir' listing
'smbclient' returns incomplete 'dir' listing
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.12
Sparc Solaris
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-22 11:42 UTC by starlight
Modified: 2005-08-24 10:27 UTC (History)
0 users

See Also:


Attachments
Output from 'smbclient' dir (2.77 KB, text/plain)
2005-03-22 13:11 UTC, starlight
no flags Details
'tcpdump' of 'smbclient' 'dir' command (15.83 KB, text/plain)
2005-03-22 13:13 UTC, starlight
no flags Details
output from 'smbclient' 'dir' command -- bad (2.76 KB, text/plain)
2005-03-22 13:30 UTC, starlight
no flags Details
'tcpdump' of 'smbclient' 'dir' command -- bad (61.07 KB, text/plain)
2005-03-22 13:32 UTC, starlight
no flags Details
output from 'smbclient' 'dir' command -- good (18.77 KB, text/plain)
2005-03-22 13:34 UTC, starlight
no flags Details
'tcpdump' of 'smbclient' 'dir' command -- good (444.66 KB, text/plain)
2005-03-22 13:35 UTC, starlight
no flags Details
'tcpdump' of 'smbclient' 'dir' command -- good, raw (35.03 KB, application/octet-stream)
2005-03-22 13:43 UTC, starlight
no flags Details
'tcpdump' of 'smbclient' 'dir' command -- bad, raw (5.27 KB, application/octet-stream)
2005-03-22 13:44 UTC, starlight
no flags Details
patch for fix breakage in cli_list_new() (722 bytes, patch)
2005-03-22 14:18 UTC, Gerald (Jerry) Carter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description starlight 2005-03-22 11:42:00 UTC
'smbclient' returns incomplete 'dir' listing against pretty much any SMB server 
(WinXP SP2, WinNT SP6a, Samba 3.0.12, Samba 2.2.7a-security-rollup-fix [Fedora 
Core 1)], Win98 SE).  Actually get trap from Win98 SE server:
   do_list: [\*] ERRDOS - ERRbadfunc (Invalid function.)
   Error in dskattr: ERRDOS - ERRbadfunc (Invalid function.)
   Segmentation Fault(coredump)

No problems from same servers when using x86 Fedora Core 1 'smbclient' (version 
above).

Compiled on Ultra 10 running Solaris 8 with recent patch cluster applied.  Used 
Sun Studio 7, cc 5.4 to compile 64-bit executables.

CFLAGS='-fast -xtarget=ultra2 -xarch=v9a'
Comment 1 Gerald (Jerry) Carter 2005-03-22 12:36:04 UTC
Can you send me a trace of a successful use on the FC1 box 
and the failure on the Solaris box ?  raw snoop, tcpdump, or 
ethereal captures is fine.  If using tcpdump set the snaplen 
to 0 (-s 0).
Comment 2 starlight 2005-03-22 13:11:14 UTC
Created attachment 1070 [details]
Output from 'smbclient' dir
Comment 3 starlight 2005-03-22 13:13:42 UTC
Created attachment 1071 [details]
'tcpdump' of 'smbclient' 'dir' command

Used "tcpdump -n -s 2048 port 139" command.

Solaris 'tcpdump' takes "-s 0" to me zero bytes, not unlimited bytes.
Comment 4 starlight 2005-03-22 13:30:54 UTC
Created attachment 1072 [details]
output from 'smbclient' 'dir' command -- bad
Comment 5 Gerald (Jerry) Carter 2005-03-22 13:31:28 UTC
sorry.  I need raw dumps.  So something like

   root# tcpdump -w /tmp/dump.pcap -s 4096 -i eth0 port 139 or port 445

for a successful run on the FC1 box and also a failed run from 
smbclient on the Solaris box.
Comment 6 starlight 2005-03-22 13:32:01 UTC
Created attachment 1073 [details]
'tcpdump' of 'smbclient' 'dir' command -- bad

tcpdump -n -vv -s 2048 -X port 139
Comment 7 starlight 2005-03-22 13:34:28 UTC
Created attachment 1074 [details]
output from 'smbclient' 'dir' command -- good
Comment 8 starlight 2005-03-22 13:35:29 UTC
Created attachment 1075 [details]
'tcpdump' of 'smbclient' 'dir' command -- good

tcpdump -n -vv -s 2048 -X port 139
Comment 9 starlight 2005-03-22 13:43:16 UTC
Created attachment 1076 [details]
'tcpdump' of 'smbclient' 'dir' command -- good, raw

tcpdump -w smbclient_dir_tcpdump_good.raw -s 4096 port 139
Comment 10 starlight 2005-03-22 13:44:12 UTC
Created attachment 1077 [details]
'tcpdump' of 'smbclient' 'dir' command -- bad, raw

tcpdump -w smbclient_dir_tcpdump_bad.raw -s 4096 port 139
Comment 11 Gerald (Jerry) Carter 2005-03-22 14:18:18 UTC
Created attachment 1078 [details]
patch for fix breakage in cli_list_new()

we were trashing the info level with the resume key.
Comment 12 Gerald (Jerry) Carter 2005-03-22 14:42:01 UTC
please test this patch.  There's more cli_list_new() patches 
from jeremy in the works to handle missing directories.
Comment 13 starlight 2005-03-22 15:01:29 UTC
That was fast.  Works!
Comment 14 Gerald (Jerry) Carter 2005-03-22 15:25:29 UTC
we had a couple of other reports that helped pinpoint the 
problem as well.  Thanks for reporting this.
Comment 15 Gerald (Jerry) Carter 2005-08-24 10:27:22 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.