diff options
author | Jeremy Allison <jra@samba.org> | 2019-10-03 14:02:13 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-10-16 12:15:53 +0000 |
commit | eafb3a20b9df8ecc208ba6f37c24873da68077e1 (patch) | |
tree | e9aa81a90167f3e1d9451b97bd38d091a0a225a1 | |
parent | 59c3bd1b15dad8de86748456a8671ff4fd1a06eb (diff) | |
download | samba-eafb3a20b9df8ecc208ba6f37c24873da68077e1.tar.gz |
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)
-rw-r--r-- | source3/client/client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 3a31463cdbb..701cd4e7d96 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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); |