[PATCH] Fix smbclient against Azure SMB2 server.

Jeremy Allison jra at samba.org
Wed Jun 22 16:23:23 UTC 2016


On Wed, Jun 22, 2016 at 07:37:33AM +0300, Uri Simchoni wrote:
> On 06/22/2016 01:57 AM, Jeremy Allison wrote:
> > Discovered against the Microsoft Azure SMB2 server.
> > 
> > Doing :
> > 
> > smbclient //azure/share -mSMB3
> >> mkdir test
> >> cd test
> >> ls
> >   .                                   D        0  Tue Jun 21 14:59:16 2016
> >   ..                                  D        0  Tue Jun 21 14:59:16 2016
> > Error in dskattr: NT_STATUS_OBJECT_NAME_INVALID
> > 
> > smbclient passes the string "\\test\\" (current directory in smbclient) to cli_smb2_dskattr().
> > 
> > Fix attached.
> > 
> > BUG: https://bugzilla.samba.org/show_bug.cgi?id=11986
> > 
> > Please review and push !
> > 
> > Cheers,
> > 
> > 	Jeremy.
> > 
> 
> LGTM- pushed!
> 
> Is anyone aware of a torture test that test for handling of the '\' at
> the end of the path? Such a test may stop testing by this change because
> the client sanitizes the path - I couldn't find any.

No there isn't. I think this is a peculiarity of the Azure
server - the Windows server allows it (otherwise smbclient 'ls'
command would have failed against regular Windows server) and
we don't check for it. I think the spec says it's not allowed,
but probably Samba and Windows don't care.

I'll check with the dochelp people here at the conference.



More information about the samba-technical mailing list