debug auth_system_session
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Dec 2019 06:37:18 +0000 (07:37 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 6 Aug 2020 12:03:26 +0000 (14:03 +0200)
auth/credentials/credentials_krb5.c
auth/credentials/credentials_secrets.c
auth/gensec/spnego.c
lib/util/fault.c
source4/auth/gensec/gensec_gssapi.c
source4/auth/system_session.c

index 8be7002bd1933104c2ce5d89c9197daba56b22d9..d6b123bcf455ebf419e53808336d78c65ba82e74 100644 (file)
@@ -1474,6 +1474,7 @@ _PUBLIC_ struct tevent_req *cli_credentials_krb5_refresh_ccache_send(
 
        tevent_req_set_cleanup_fn(req, cli_credentials_krb5_refresh_ccache_cleanup);
 
+       log_stack_trace();
        status = cli_credentials_krb5_get_ccache_name(cred,
                                                      state,
                                                      &existing_ccache);
index 54f3ce2d0780389f019e1168e3f943eef5bbe218..ec5346014262760dafd6a9cf1833d3a935e1cbc4 100644 (file)
@@ -303,6 +303,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credenti
        /* Bleh, nasty recursion issues: We are setting a machine
         * account here, so we don't want the 'pending' flag around
         * any more */
+       SMB_ASSERT(cred->machine_account_pending == false);
        cred->machine_account_pending = false;
 
        /* We have to do this, as the fallback in
index 87545d860e813fa4507897f9fcaf7ccace1681b1..1747e460b7b1fc485c2275e347f3aab3a6cad2f3 100644 (file)
@@ -1240,9 +1240,9 @@ static NTSTATUS gensec_spnego_server_negTokenInit_step(
                }
 
                DBG_PREFIX(dbg_level, (
-                          "%s: parsing NEG_TOKEN_INIT content failed "
+                          "%s: PID=%u parsing NEG_TOKEN_INIT content failed "
                           "(next[%s]): %s\n", cur_sec->op->name,
-                          next, nt_errstr(status)));
+                          (unsigned int)getpid(), next, nt_errstr(status)));
 
                if (next == NULL) {
                        /*
index b1da1bb4121263a0829710609ba7971f1a7c1ce3..20300dea760a6469aa0cdcbb11f784d6f0a08227 100644 (file)
@@ -271,8 +271,8 @@ libunwind_failed:
        backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE);
        backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size);
 
-       DEBUG(0, ("BACKTRACE: %lu stack frames:\n",
-                 (unsigned long)backtrace_size));
+       DEBUG(0, ("BACKTRACE(PID=%u): %lu stack frames:\n",
+                 (unsigned int)getpid(), (unsigned long)backtrace_size));
 
        if (backtrace_strings) {
                size_t i;
index 536826437f84decf58382ce6d48cebaa1586222f..a9912cf301eb4baa0ebc1c324f13d7d317221814 100644 (file)
@@ -682,9 +682,10 @@ init_sec_context_done:
                                /* garbage input, possibly from the auto-mech detection */
                                return NT_STATUS_INVALID_PARAMETER;
                        default:
-                               DEBUG(1, ("GSS %s Update(krb5)(%d) Update failed: %s\n",
+                               DEBUG(1, ("GSS %s Update(krb5)(%d) PID=%u Update failed: %s\n",
                                          gensec_security->gensec_role == GENSEC_CLIENT ? "client" : "server",
                                          gensec_gssapi_state->gss_exchange_count,
+                                         (unsigned int)getpid(),
                                          gssapi_error_string(out_mem_ctx, maj_stat, min_stat, gensec_gssapi_state->gss_oid)));
                                return NT_STATUS_LOGON_FAILURE;
                        }
index f8f567673db6a8acb011152960da3da6ab56ce9b..c52bcdd9864facdf03857fb85aec8e336de8a27d 100644 (file)
@@ -105,6 +105,8 @@ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
 
                cli_credentials_set_conf(session_info->credentials, lp_ctx);
 
+               log_stack_trace();
+               //cli_credentials_set_machine_account_pending(session_info->credentials, lp_ctx);
                cli_credentials_set_machine_account(session_info->credentials, lp_ctx);
        } else {
                session_info->credentials = cli_credentials_init_anon(session_info);