Revert "DEBUG netr_SendToSamBase problem"
authorStefan Metzmacher <metze@samba.org>
Mon, 7 Nov 2022 16:47:50 +0000 (17:47 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 23 Apr 2024 16:16:46 +0000 (18:16 +0200)
This reverts commit e5b07f2278b9101dfdf5c4a8158463fe381958d8.

source3/winbindd/winbindd_dual_srv.c
source3/winbindd/winbindd_irpc.c
source4/auth/ntlm/auth_sam.c
source4/auth/sam.c
source4/kdc/hdb-samba4.c
source4/lib/messaging/messaging.c
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 92929e87c6a0d3d8d386a2b91d6be26b1a344043..bbdaf6e58078ad959fb29a35c5936868c619d4f2 100644 (file)
@@ -2022,7 +2022,7 @@ NTSTATUS _winbind_SendToSam(struct pipes_struct *p, struct winbind_SendToSam *r)
        struct dcerpc_binding_handle *b = NULL;
        bool retry = false;
 
-       DEBUG(0, ("_winbind_SendToSam received\n"));
+       DEBUG(5, ("_winbind_SendToSam received\n"));
        domain = wb_child_domain();
        if (domain == NULL) {
                return NT_STATUS_REQUEST_NOT_ACCEPTED;
index 0c521d6f39729a99a4010e65352b359e7b8e4793..f66d797da5ef3ef4da382299b96571334453f852 100644 (file)
@@ -370,7 +370,7 @@ static NTSTATUS wb_irpc_SendToSam(struct irpc_message *msg,
                return NT_STATUS_NO_SUCH_DOMAIN;
        }
 
-       DEBUG(0, ("wb_irpc_SendToSam called\n"));
+       DEBUG(5, ("wb_irpc_SendToSam called\n"));
 
        return wb_irpc_forward_rpc_call(msg, msg,
                                        global_event_context(),
index de9c6a003380ec484119858a0b4ddda43f7058f7..d12045d8e1c1aa6953a6857db84d0c225bb3b565 100644 (file)
@@ -32,7 +32,6 @@
 #include "dsdb/samdb/ldb_modules/util.h"
 #include "dsdb/common/util.h"
 #include "param/param.h"
-#include "librpc/gen_ndr/ndr_netlogon.h"
 #include "librpc/gen_ndr/ndr_irpc_c.h"
 #include "librpc/gen_ndr/ndr_winbind_c.h"
 #include "lib/messaging/irpc.h"
@@ -182,7 +181,6 @@ static void auth_sam_trigger_zero_password(TALLOC_CTX *mem_ctx,
 
        r.in.message = *send_to_sam;
 
-       NDR_PRINT_DEBUG(netr_SendToSamBase, send_to_sam);
        /*
         * This seem to rely on the current IRPC implementation,
         * which delivers the message in the _send function.
@@ -190,18 +188,15 @@ static void auth_sam_trigger_zero_password(TALLOC_CTX *mem_ctx,
         * TODO: we need a ONE_WAY IRPC handle and register
         * a callback and wait for it to be triggered!
         */
-       DBG_ERR("calling dcerpc_winbind_SendToSam_r_send\n");
        req = dcerpc_winbind_SendToSam_r_send(tmp_ctx,
                                              event_ctx,
                                              irpc_handle,
                                              &r);
 
        /* we aren't interested in a reply */
-       DBG_ERR("before talloc_free(req)\n");
        talloc_free(req);
-       DBG_ERR("after talloc_free(req)\n");
        TALLOC_FREE(tmp_ctx);
-       NDR_PRINT_DEBUG(netr_SendToSamBase, send_to_sam);
+
 }
 
 /*
index 0984041588df40d3cdc4066069cbb9abc605272d..0df4d114452f29a47e4669c6ca9b0b0d9b97ea25 100644 (file)
@@ -30,7 +30,6 @@
 #include "dsdb/common/util.h"
 #include "libcli/ldap/ldap_ndr.h"
 #include "param/param.h"
-#include "librpc/gen_ndr/ndr_netlogon.h"
 #include "librpc/gen_ndr/ndr_winbind_c.h"
 #include "lib/dbwrap/dbwrap.h"
 #include "cluster/cluster.h"
@@ -1560,14 +1559,6 @@ NTSTATUS authsam_search_account(TALLOC_CTX *mem_ctx, struct ldb_context *sam_ctx
 
 int ldb_transaction_active(struct ldb_context *ldb);
 
-static int netr_SendToSamBase_destructor(struct netr_SendToSamBase *send_to_sam)
-{
-       DBG_ERR("netr_SendToSamBase_destructor(%p)\n", send_to_sam);
-       //smb_panic(__location__);
-       //log_stack_trace();
-       return 0;
-}
-
 /* Reset the badPwdCount to zero and update the lastLogon time. */
 NTSTATUS authsam_logon_success_accounting(struct ldb_context *sam_ctx,
                                          const struct ldb_message *msg,
@@ -1803,9 +1794,6 @@ get_transaction:
                        base_msg->message_size = 16;
                        base_msg->message.reset_bad_password.guid = guid;
                        *send_to_sam = base_msg;
-                       DBG_ERR("base_msg=%p\n", base_msg);
-                       talloc_set_destructor(base_msg, netr_SendToSamBase_destructor);
-                       NDR_PRINT_DEBUG(netr_SendToSamBase, base_msg);
                }
        }
 
index 18fadf6a614190fe84298b8ad1f27a92e0569041..40161b52895261e99d776798fa86f2a11309e771 100644 (file)
@@ -45,7 +45,6 @@
 #include "dsdb/samdb/samdb.h"
 #include "param/param.h"
 #include "../lib/tsocket/tsocket.h"
-#include "librpc/gen_ndr/ndr_netlogon.h"
 #include "librpc/gen_ndr/ndr_winbind_c.h"
 #include "lib/messaging/irpc.h"
 #include "hdb.h"
@@ -488,7 +487,6 @@ static void reset_bad_password_netlogon(TALLOC_CTX *mem_ctx,
        struct winbind_SendToSam req;
        struct tevent_req *subreq = NULL;
 
-       NDR_PRINT_DEBUG(netr_SendToSamBase, send_to_sam);
        irpc_handle = irpc_binding_handle_by_name(mem_ctx, kdc_db_ctx->msg_ctx,
                                                  "winbind_server",
                                                  &ndr_table_winbind);
@@ -507,15 +505,11 @@ static void reset_bad_password_netlogon(TALLOC_CTX *mem_ctx,
         * TODO: we need a ONE_WAY IRPC handle and register
         * a callback and wait for it to be triggered!
         */
-       DBG_ERR("calling dcerpc_winbind_SendToSam_r_send\n");
        subreq = dcerpc_winbind_SendToSam_r_send(mem_ctx, kdc_db_ctx->ev_ctx,
                                                 irpc_handle, &req);
 
        /* we aren't interested in a reply */
-       DBG_ERR("before talloc_free(subreq)\n");
        TALLOC_FREE(subreq);
-       DBG_ERR("after talloc_free(subreq)\n");
-       NDR_PRINT_DEBUG(netr_SendToSamBase, send_to_sam);
 }
 
 #define SAMBA_HDB_AUTHN_AUDIT_INFO_OBJ "samba:authn_audit_info_obj"
index 89229e6780070d1432c77d53fa8880732736ecb8..8d76f17367a03375d41dad041ec064a1e9937032 100644 (file)
@@ -1416,7 +1416,7 @@ static void irpc_bh_do_ndr_print(struct dcerpc_binding_handle *h,
        bool print_in = false;
        bool print_out = false;
 
-       if (DEBUGLEVEL >= 0) {
+       if (DEBUGLEVEL >= 11) {
                print_in = true;
                print_out = true;
        }
index 355a550edf3ddde788697ad986daa38bf6a33b6d..729812acfd9f71ef7fa2d0d85fe36dcf2197bdb1 100644 (file)
@@ -3106,7 +3106,6 @@ static NTSTATUS dcesrv_netr_NetrLogonSendToSam(struct dcesrv_call_state *dce_cal
                /* We only partially implement SendToSam */
                return NT_STATUS_NOT_IMPLEMENTED;
        }
-       NDR_PRINT_DEBUG(netr_SendToSamBase, &base_msg);
 
        /* Now 'send' to SAM */
        switch (base_msg.message_type) {
@@ -3141,9 +3140,6 @@ static NTSTATUS dcesrv_netr_NetrLogonSendToSam(struct dcesrv_call_state *dce_cal
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
-               DBG_ERR("Reset bad password on user: %s\n",
-                                 ldb_dn_get_linearized(dn));
-
                msg->dn = dn;
 
                ret = samdb_msg_add_int(sam_ctx, mem_ctx, msg, "badPwdCount", 0);
@@ -3164,8 +3160,6 @@ static NTSTATUS dcesrv_netr_NetrLogonSendToSam(struct dcesrv_call_state *dce_cal
                        return NT_STATUS_INTERNAL_ERROR;
                }
 
-               DBG_ERR("Committed bad password reset on user: %s\n",
-                                 ldb_dn_get_linearized(dn));
                break;
        }
        default: