smbclient: Fix errors printed if we can connect with SMB1
authorAndreas Schneider <asn@samba.org>
Mon, 3 Sep 2018 10:11:39 +0000 (12:11 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 5 Sep 2018 16:22:24 +0000 (18:22 +0200)
smbclient -L //server

before:

Reconnecting with SMB1 for workgroup listing.
Connection to earth.milkyway.site failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

after:

Reconnecting with SMB1 for workgroup listing.
Unable to connect with SMB1 -- no workgroup available

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c
source3/libsmb/clidfs.c

index 25ba01d62167072aec5e882ca5d9d83ba686e744..adc3fcab476e3fac824b6b0c265294bdec7f85d3 100644 (file)
@@ -6227,7 +6227,7 @@ static int do_host_query(const char *query_host)
                                     smb_encrypt, max_proto,
                                     NBT_SMB_PORT, name_type, &cli);
                if (!NT_STATUS_IS_OK(status)) {
-                       d_printf("Failed to connect with SMB1 "
+                       d_printf("Unable to connect with SMB1 "
                                 "-- no workgroup available\n");
                        return 0;
                }
index 0dfb8b336064595490561b7be2b5630dde651055..6918802396c1d467b26d4b9000f59a4f7d1987c9 100644 (file)
@@ -196,9 +196,9 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
                flags, &c);
 
        if (!NT_STATUS_IS_OK(status)) {
-               d_printf("Connection to %s failed (Error %s)\n",
-                               server,
-                               nt_errstr(status));
+               DBG_WARNING("Connection to %s failed (Error %s)\n",
+                           server,
+                           nt_errstr(status));
                return status;
        }