debug REVISION_MISMATCH master3-libsmb-ok
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Jun 2017 06:08:50 +0000 (08:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 11:42:37 +0000 (12:42 +0100)
lib/util/debug.c
lib/util/fault.c
libcli/smb/smbXcli_base.c

index e6a1ba4f96f8ff8efeb743c9699a4cdb778b86c4..9cb3c5ebd9a4b86c801d814ba542f9b566550550 100644 (file)
@@ -1008,6 +1008,7 @@ void setup_logging(const char *prog_name, enum debug_logtype new_logtype)
                strlcpy(state.prog_name, prog_name, sizeof(state.prog_name));
        }
        reopen_logs_internal();
+       //fault_setup();
 }
 
 /***************************************************************************
index bde20e33460342cae1fb2563bb514d3f3a275554..0274262298054ad5d080045ba8649d559a562768 100644 (file)
@@ -100,6 +100,13 @@ setup our fault handlers
 ********************************************************************/
 void fault_setup(void)
 {
+       static bool mxinit;
+
+       if (mxinit) {
+               return;
+       }
+       mxinit = true;
+
        if (fault_state.disabled) {
                return;
        }
index 2455b6deacd71718d53bd0c52166e82aa87046c2..dbbc1a96efdd7e9259cefab05f1a516a467c930f 100644 (file)
@@ -332,6 +332,8 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
        socklen_t sa_length;
        int ret;
 
+       fault_setup();
+
        conn = talloc_zero(mem_ctx, struct smbXcli_conn);
        if (!conn) {
                return NULL;
@@ -1684,6 +1686,7 @@ static NTSTATUS smb1cli_req_writev_submit(struct tevent_req *req,
                DBG_ERR("called for dialect[%s] server[%s]\n",
                        smb_protocol_types_string(state->conn->protocol),
                        smbXcli_conn_remote_name(state->conn));
+               smb_panic(__location__);
                return NT_STATUS_REVISION_MISMATCH;
        }
 
@@ -3120,6 +3123,7 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
 
                if ((state->conn->protocol != PROTOCOL_NONE) &&
                    (state->conn->protocol < PROTOCOL_SMB2_02)) {
+               smb_panic(__location__);
                        return NT_STATUS_REVISION_MISMATCH;
                }
 
@@ -3203,6 +3207,7 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
 
                if ((state->conn->protocol != PROTOCOL_NONE) &&
                    (state->conn->protocol < PROTOCOL_SMB2_02)) {
+               smb_panic(__location__);
                        return NT_STATUS_REVISION_MISMATCH;
                }