On Wed, Jun 11, 2014 at 12:11:39AM +1000, Adam Baxter
wrote:> Hi,
> What determines the protocol version that libsmbclient uses?
>
> Changing min and max protocol version in the client smb.conf seems to have
> no effect.
>
> I'm chasing up the performance issues I posted about earlier which may
be
> caused by my Linux clients defaulting to SMB1 (via gvfsd-smb) while Windows
> happily negotiates SMB2 with the servers.
>
> If I restrict the servers to SMB2, gvfs can't connect, while smbclient
on
> the console works fine if I pass -mSMB2.
>
> I can't see anything in
> https://git.gnome.org/browse/gvfs/tree/daemon/gvfsbackendsmb.c that would
> restrict the protocol version, either.
>
>
> Any ideas?
Internally the connect uses: lp_cli_maxprotocol() - see
source3/libsmb/libsmb_server.c:SMBC_server_internal()
which calls:
status = smbXcli_negprot(c->conn, c->timeout,
lp_cli_minprotocol(),
lp_cli_maxprotocol());
So I think you need to set "client max protocol"
to SMB2 in smb.conf, not "max protocol" (that's
the server max protocol).
Jeremy.