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 6918802396c1d467b26d4b9000f59a4f7d1987c9..4342a3b1d1b20065b9684101efa7876f5f418e48 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 67dfcf72327dc4d2e8e77f83bc2ad70e3ee106cd..0067df48cac7bffd866e94d14787eafd47ef68b5 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;
        }