SMB3 issues with smbclient
Paul Smedley
paul at smedley.id.au
Wed Dec 21 08:26:23 UTC 2016
Hi Again Metze!
On 21/12/16 07:10, Paul Smedley wrote:
<snip>
>> What was the problem in your case? Did you send the value "1" over
>> the net?
>
> In this case, a particular application (MED editor) when saving a file
> on a SMB2+ share, creates a 0 byte file. Same application and plugin
> over SMB1 works fine.
>
> I'll comb back through the logs and potentially add some more logging
> and see what I can fine.
>
> I'll also test against a Win2k server, just to rule out the issue being
> with Samba Server.
OK some updates.
Issues happens with both Samba Server 4.4.5 & Win2k08.
I had a closer look at the logs. cli_ftruncate() is failing with SMB2+.
Part of the Netdrive (kinda like Fuse but for OS/2) api is a command to
set the file size.
The implementation of this calls:
if (!NT_STATUS_IS_OK(cli_ftruncate(cli, file->fd, newsize)))
file->fd is the fnum of the file handle, newsize is the size.
This works fine with SMB1. With SMB3, cli_errno(cli) returns an errno of 22.
Digging in more now....
Cheers,
Paul
More information about the samba-technical
mailing list