From: Justin Stephenson Date: Mon, 17 Dec 2018 19:40:33 +0000 (-0500) Subject: s3:libsmb: Print debug message about Netbios X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=499f051c9d527a14f9712365f8403a1ee0662c5b;p=metze%2Fsamba%2Fwip.git s3:libsmb: 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 Reviewed-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 6918802396c1..4342a3b1d1b2 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -196,6 +196,10 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, flags, &c); if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + DBG_ERR("NetBIOS support disabled, unable to connect"); + } + DBG_WARNING("Connection to %s failed (Error %s)\n", server, nt_errstr(status)); diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 67dfcf72327d..0067df48cac7 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -489,6 +489,10 @@ SMBC_server_internal(TALLOC_CTX *ctx, } if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + DBG_ERR("NetBIOS support disabled, unable to connect"); + } + errno = map_errno_from_nt_status(status); return NULL; }