1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: smbclient: Stop an SMB2-connection from blundering into SMB1-specific calls.

Fix in the same way this was done in SMBC_opendir_ctx() for libsmbclient.
This fix means the admin no longer has to remember to set 'min client protocol ='
when connecting to an SMB2-only server (MacOSX for example) and trying to
list shares.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14152

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Jeremy Allison 2019-10-03 14:02:13 -07:00 committed by Andreas Schneider
parent 4b62c4f7ad
commit ea82bca8ce

View File

@ -4918,6 +4918,10 @@ static bool browse_host(bool sort)
return false;
}
if (smbXcli_conn_protocol(cli->conn) > PROTOCOL_NT1) {
return false;
}
ret = cli_RNetShareEnum(cli, browse_fn, NULL);
if (ret == -1) {
NTSTATUS status = cli_nt_error(cli);