Bug 3274 - On OS/2 - smbclient does not allow to change directories with the "cd" command
Summary: On OS/2 - smbclient does not allow to change directories with the "cd" command
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.21
Hardware: Other OS/2
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-21 20:11 UTC by Guenter Kukkukk
Modified: 2005-11-21 22:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guenter Kukkukk 2005-11-21 20:11:59 UTC
Hi Derrell,

on OS/2, when using the latest samba3 svn revision (11837), smbclient
returns an error, when the "cd" command is used:
   smb: \> cd tmp_gk
   cd \tmp_gk\: ERRDOS - ERRbadfunc (Invalid function.)

In client.c, line 294
        if ( targetcli->protocol >= PROTOCOL_LANMAN2 && !targetcli->win95 ) {

it is assumed, that the LANMAN2.1 protocol is supporting the later used
    SMB_QUERY_FILE_BASIC_INFO 0x101
info level call.
But it does not!

SOLUTION:
line 294 should be modified:
        if ( targetcli->protocol > PROTOCOL_LANMAN2 && !targetcli->win95 ) {

I have checked that locally, it works for me now. I have not seen any
unwanted side-effects so far.

Best wishes.
Guenter Kukkukk
Comment 1 Guenter Kukkukk 2005-11-21 20:17:46 UTC
Hmmm

"on OS/2, ..." could be mis-leading.
smbclient is running on a Linux box against an OS/2 SMB share.
Guenter
Comment 2 Alex Masterov 2005-11-21 21:03:04 UTC
I can prove this bug exists in smbclient 3.0.20b and SVN build 11833.
When I changed client.c as Guenter wrote (and recompiled), smbclient works fine with OS/2.
Comment 3 Jeremy Allison 2005-11-21 22:29:52 UTC
Applied, thanks.
Jeremy.
Comment 4 Jeremy Allison 2005-11-21 22:40:31 UTC
Hmmm. Probably should restrict doing a info level 0x101 to NT1 protocol level.
Jeremy.