1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-01 05:47:28 +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>
(cherry picked from commit ea82bca8cef0d736305a7a40b3198fc55ea66af8)
This commit is contained in:
Jeremy Allison 2019-10-03 14:02:13 -07:00 committed by Stefan Metzmacher
parent 59c3bd1b15
commit eafb3a20b9

View File

@ -4916,6 +4916,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);