diff options
author | Jeremy Allison <jra@samba.org> | 2019-10-03 14:02:13 -0700 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-10-07 08:13:44 +0000 |
commit | ea82bca8cef0d736305a7a40b3198fc55ea66af8 (patch) | |
tree | eabebc859a6be6669fe12d9f361b60e1a194b3df /source3/client | |
parent | 4b62c4f7addba3ce47f1d0d5f2b64103602b7ca2 (diff) | |
download | samba-ea82bca8cef0d736305a7a40b3198fc55ea66af8.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>
Diffstat (limited to 'source3/client')
-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); |