s3:libsmb: Print debug message about Netbios
authorJustin Stephenson <jstephen@redhat.com>
Mon, 17 Dec 2018 19:40:33 +0000 (14:40 -0500)
committerNoel Power <npower@samba.org>
Wed, 9 Jan 2019 17:40:44 +0000 (18:40 +0100)
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>
source3/libsmb/clidfs.c
source3/libsmb/libsmb_server.c

index 6918802..4342a3b 100644 (file)
@@ -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));
index 67dfcf7..0067df4 100644 (file)
@@ -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;
        }