From 3dad2c141a31567e6061195829c0489fa42fab3a Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 10 Nov 2016 08:27:57 +0000 Subject: [PATCH] s3/client: obey 'disable netbios' smb.conf param, don't connect via NBT port. If 'disable netbios' is true 'smbclient -L //server' will try use the NBT port to list the servers, we should honour the config and not do that. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12418 Signed-off-by: Noel Power --- source3/client/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/client/client.c b/source3/client/client.c index e7531d3..a0df271 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -5598,6 +5598,10 @@ static int do_host_query(const char *query_host) } } + if (lp_disable_netbios()) { + goto out; + } + if (port != NBT_SMB_PORT) { /* Workgroups simply don't make sense over anything @@ -5621,7 +5625,7 @@ static int do_host_query(const char *query_host) cli_set_timeout(cli, io_timeout*1000); list_servers(lp_workgroup()); - +out: cli_shutdown(cli); return(0); -- 2.1.4