diff options
author | Jeremy Allison <jra@samba.org> | 2019-10-03 14:02:13 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-10-16 19:25:10 +0000 |
commit | 2ce14ef46a5d5d9ab6b9c30f1fb00debc1be71a4 (patch) | |
tree | 4e738d1133f77410428e0247bf1b0fc329b3a174 /source3 | |
parent | e8cba5a8a88b47274305b56132a399117d074476 (diff) | |
download | samba-2ce14ef46a5d5d9ab6b9c30f1fb00debc1be71a4.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)
Diffstat (limited to 'source3')
-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 7a7ecd92eb6..e1de711c8e4 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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); |