mirror of
https://github.com/samba-team/samba.git
synced 2025-09-18 09:44:19 +03:00
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 and 'smbclient -M //server' use the netbios messaging WinPopup facility, we should honour the config and not do that. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12418 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
cc081c7831
commit
15fa802c77
@@ -5598,6 +5598,10 @@ static int do_host_query(const char *query_host)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lp_disable_netbios()) {
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (port != NBT_SMB_PORT) {
|
if (port != NBT_SMB_PORT) {
|
||||||
|
|
||||||
/* Workgroups simply don't make sense over anything
|
/* 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);
|
cli_set_timeout(cli, io_timeout*1000);
|
||||||
list_servers(lp_workgroup());
|
list_servers(lp_workgroup());
|
||||||
|
out:
|
||||||
cli_shutdown(cli);
|
cli_shutdown(cli);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
@@ -5676,6 +5680,11 @@ static int do_message_op(struct user_auth_info *a_info)
|
|||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
|
if (lp_disable_netbios()) {
|
||||||
|
d_printf("NetBIOS over TCP disabled.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
status = cli_connect_nb(desthost, have_ip ? &dest_ss : NULL,
|
status = cli_connect_nb(desthost, have_ip ? &dest_ss : NULL,
|
||||||
port ? port : NBT_SMB_PORT, name_type,
|
port ? port : NBT_SMB_PORT, name_type,
|
||||||
lp_netbios_name(), SMB_SIGNING_DEFAULT, 0, &cli);
|
lp_netbios_name(), SMB_SIGNING_DEFAULT, 0, &cli);
|
||||||
|
Reference in New Issue
Block a user