libcli: Add debug message if fail to negoatiate SMB protocol
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 26 Sep 2018 21:53:24 +0000 (09:53 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Sep 2018 09:25:29 +0000 (11:25 +0200)
Currently if the client and server can't negotiate an SMB protocol, you
just get the followiing error on the client-side, which doesn't tell you
much.
ERROR(runtime): uncaught exception - (3221225667, 'The network responded
incorrectly.')

This patch adds a debug message to help highlight what's actually going
wrong.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13621

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Sep 28 11:25:29 CEST 2018 on sn-devel-144

libcli/smb/smbXcli_base.c

index ad1b67b8476e62ff758ae4d481872876243193e3..d94b4d87f27386698f8c5616573c2e9b202b8030 100644 (file)
@@ -4369,6 +4369,7 @@ static void smbXcli_negprot_smb1_done(struct tevent_req *subreq)
        }
 
        if (conn->protocol == PROTOCOL_NONE) {
+               DBG_ERR("No compatible protocol selected by server.\n");
                tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
                return;
        }