summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-09-04 11:11:49 +0200
committerJeremy Allison <jra@samba.org>2018-09-05 18:22:24 +0200
commiteddcbfea91d012f70a00c3ff2865fb1a23bec023 (patch)
tree130c3193fca256bcf872d0ab2b8d94759a80218e /source3/client
parente0e86e8ae6245341ffd2b32d6abbade1371046e5 (diff)
downloadsamba-eddcbfea91d012f70a00c3ff2865fb1a23bec023.tar.gz
s3:smbclient: Do not call cli_RNetShareEnum if SMB1 is disabled
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index adc3fcab476..fc6d9a31c5b 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4901,6 +4901,7 @@ static bool browse_host_rpc(bool sort)
static bool browse_host(bool sort)
{
int ret;
+
if (!grepable) {
d_printf("\n\tSharename Type Comment\n");
d_printf("\t--------- ---- -------\n");
@@ -4910,7 +4911,12 @@ static bool browse_host(bool sort)
return true;
}
- if((ret = cli_RNetShareEnum(cli, browse_fn, NULL)) == -1) {
+ if (lp_client_min_protocol() > PROTOCOL_NT1) {
+ return false;
+ }
+
+ ret = cli_RNetShareEnum(cli, browse_fn, NULL);
+ if (ret == -1) {
NTSTATUS status = cli_nt_error(cli);
d_printf("Error returning browse list: %s\n",
nt_errstr(status));