diff options
author | Justin Stephenson <jstephen@redhat.com> | 2018-12-17 15:17:24 -0500 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-01-09 22:38:21 +0100 |
commit | 08867de2efde05e4730b41a335d13f775e44e397 (patch) | |
tree | db656ceea44eeccc67534640703765fefc35ada3 /source3 | |
parent | ecbb2f78cec6d9e6f5180c8ba274a1da2152f098 (diff) | |
download | samba-08867de2efde05e4730b41a335d13f775e44e397.tar.gz |
s3:utils:net: Print debug message about Netbios
With a preceding patch, cli_connect_nb() will return
NT_STATUS_NOT_SUPPORTED when 'disable netbios' is set in smb.conf.
Print an informative error message to indicate Netbios is disabled
if this occurs.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13727
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Jan 9 22:38:21 CET 2019 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc.c | 3 | ||||
-rw-r--r-- | source3/utils/net_time.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index c300b8a4b3d..f2d63d2af65 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -7455,6 +7455,9 @@ bool net_rpc_check(struct net_context *c, unsigned flags) lp_netbios_name(), SMB_SIGNING_IPC_DEFAULT, 0, &cli); if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + DBG_ERR("NetBIOS support disabled, unable to connect\n"); + } return false; } status = smbXcli_negprot(cli->conn, cli->timeout, PROTOCOL_CORE, diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index 0091fc86333..5e6cf2ea15d 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -37,8 +37,13 @@ static time_t cli_servertime(const char *host, status = cli_connect_nb(host, dest_ss, 0, 0x20, lp_netbios_name(), SMB_SIGNING_DEFAULT, 0, &cli); if (!NT_STATUS_IS_OK(status)) { - fprintf(stderr, _("Can't contact server %s. Error %s\n"), - host, nt_errstr(status)); + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + fprintf(stderr, "Can't contact server %s. NetBIOS support disabled," + " Error %s\n", host, nt_errstr(status)); + } else { + fprintf(stderr, "Can't contact server %s. Error %s\n", + host, nt_errstr(status)); + } goto done; } |