debug: Add new debug class "drs_repl" for DRS replication processing
authorAndrew Bartlett <abartlet@samba.org>
Wed, 6 Sep 2017 04:37:34 +0000 (16:37 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 7 Sep 2017 04:56:27 +0000 (06:56 +0200)
This is used in the client and in the server

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
22 files changed:
lib/util/debug.c
lib/util/debug.h
source4/dsdb/repl/drepl_extended.c
source4/dsdb/repl/drepl_fsmo.c
source4/dsdb/repl/drepl_notify.c
source4/dsdb/repl/drepl_out_helpers.c
source4/dsdb/repl/drepl_out_pull.c
source4/dsdb/repl/drepl_partitions.c
source4/dsdb/repl/drepl_periodic.c
source4/dsdb/repl/drepl_replica.c
source4/dsdb/repl/drepl_ridalloc.c
source4/dsdb/repl/drepl_secret.c
source4/dsdb/repl/drepl_service.c
source4/dsdb/repl/replicated_objects.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/libnet/libnet_vampire.c
source4/rpc_server/drsuapi/addentry.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/rpc_server/drsuapi/drsutil.c
source4/rpc_server/drsuapi/getncchanges.c
source4/rpc_server/drsuapi/updaterefs.c
source4/rpc_server/drsuapi/writespn.c

index d30b1a9fae504b2e7d28c248a6861a2204ee12b8..8b28002501f4de86152f8d84c40fd2e65c7827f8 100644 (file)
@@ -540,6 +540,7 @@ static const char *default_classname_table[] = {
        [DBGC_AUTH_AUDIT] =     "auth_audit",
        [DBGC_AUTH_AUDIT_JSON] = "auth_json_audit",
        [DBGC_KERBEROS] =       "kerberos",
+       [DBGC_DRS_REPL] =       "drs_repl",
 };
 
 /*
index 71d8ed69a42f1ca8950f7c103ba950a72f92c219..e82553aaf71b788c30295efc318962b7240f48f2 100644 (file)
@@ -92,6 +92,7 @@ bool dbghdr( int level, const char *location, const char *func);
 #define DBGC_AUTH_AUDIT                24
 #define DBGC_AUTH_AUDIT_JSON   25
 #define DBGC_KERBEROS           26
+#define DBGC_DRS_REPL           27
 
 /* So you can define DBGC_CLASS before including debug.h */
 #ifndef DBGC_CLASS
index de53028b7a4613aa172522a5d5e16f1ab49cb31b..caed06b092220ed25b72e2e2f7da2f976dbb4699 100644 (file)
@@ -31,6 +31,9 @@
 #include "dsdb/repl/drepl_service.h"
 #include "param/param.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 
 /*
   create the role owner source dsa structure
index 7a107da6a3de496fbfbf5a5b943462c677abfdaf..a83ac4f6c2f74c898a9da8c851508c360bc881a8 100644 (file)
@@ -31,6 +31,9 @@
 #include "dsdb/repl/drepl_service.h"
 #include "param/param.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 struct fsmo_role_state {
        struct irpc_message *msg;
        struct drepl_takeFSMORole *r;
index 980806b89c124dce61542a3597e2c1459da535d3..f21ad7f94e02448753e14a5097d05e1ea87746e0 100644 (file)
@@ -35,6 +35,9 @@
 #include "libcli/composite/composite.h"
 #include "../lib/util/tevent_ntstatus.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 
 struct dreplsrv_op_notify_state {
        struct tevent_context *ev;
index 66308040377a2dbd0998296117cc9ac65ca32dc9..8da49ac14290ec95e50e36947d0eef5a1d7683ba 100644 (file)
@@ -36,6 +36,9 @@
 #include "../lib/util/tevent_ntstatus.h"
 #include "libcli/security/security.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 struct dreplsrv_out_drsuapi_state {
        struct tevent_context *ev;
 
index 62a403c91c94545b780d698b79bd9b3db29d2426..b1bf81c1c57ff4e0ca4e10418661f8088a1f28c4 100644 (file)
@@ -33,6 +33,9 @@
 #include "libcli/composite/composite.h"
 #include "libcli/security/security.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   update repsFrom/repsTo error information
  */
index 65b4843a5f375037055e97210543f5b628122f5c..586da1983dc7ef87621927b5e740a1f166ad365a 100644 (file)
@@ -34,6 +34,9 @@
 #include "param/param.h"
 #include "dsdb/common/util.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   load the partitions list based on replicated NC attributes in our
   NTDSDSA object
index 64a53e085199784f18d06a128fbe4b76ce8f87b9..0fe4b0acc7b3cacb008ebf87c93f6c2598909206 100644 (file)
@@ -31,6 +31,9 @@
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 static void dreplsrv_periodic_run(struct dreplsrv_service *service);
 
 static void dreplsrv_periodic_handler_te(struct tevent_context *ev, struct tevent_timer *te,
index 2f344a4b93a36536ff719e8cb1e21653399f1eb2..adb0e971eba65eadd76bbf03516571f1ee8c86d2 100644 (file)
@@ -28,6 +28,9 @@
 #include "param/param.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   implement DsReplicaAdd (forwarded from DRS server)
  */
index bd3a62b14b1a7fb888c786fd8618eb9934bc4d3f..3615859ed9b38c372b1cb14817396f1151ae9f5b 100644 (file)
@@ -30,6 +30,9 @@
 #include "dsdb/repl/drepl_service.h"
 #include "param/param.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   called when a rid allocation request has completed
  */
index b7f36805a598ef08d52a49930430fa43bdcf8089..64075194009ba1093fad994dd976b970006cfee4 100644 (file)
@@ -28,6 +28,9 @@
 #include "dsdb/repl/drepl_service.h"
 #include "param/param.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 struct repl_secret_state {
        const char *user_dn;
 };
index 5b2836324945cd40ff2ad5918a969a37e1279c9b..0951a0f0cc0f1c52d62824c0a7753d2be859ba1f 100644 (file)
@@ -35,6 +35,9 @@
 #include "param/param.h"
 #include "libds/common/roles.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /**
  * Call-back data for _drepl_replica_sync_done_cb()
  */
index dd84570ebc00b57a103eaf67171d8c0aeee4a85b..d9365ae555351ddfb53765ea8d937c6e1ae71f96 100644 (file)
@@ -31,6 +31,9 @@
 #include "libcli/auth/libcli_auth.h"
 #include "param/param.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 static WERROR dsdb_repl_merge_working_schema(struct ldb_context *ldb,
                                             struct dsdb_schema *dest_schema,
                                             const struct dsdb_schema *ref_schema)
index a1ee66e7f430daf44ebd4e0ba41332e6d00fa974..8f123de7dbe35cc6b181211d9458ff299fab7915 100644 (file)
@@ -51,6 +51,9 @@
 #include "dsdb/samdb/ldb_modules/util.h"
 #include "lib/util/tsort.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
  * It's 29/12/9999 at 23:59:59 UTC as specified in MS-ADTS 7.1.1.4.2
  * Deleted Objects Container
index aa0ec91e5908c401ccf83f5a328aed6efd0cc25a..a449e1c86efef988a0a0baf0f572c2422ea6394f 100644 (file)
@@ -42,6 +42,9 @@
 #include "libcli/security/security.h"
 #include "dsdb/common/util.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /* 
 List of tasks vampire.py must perform:
 - Domain Join
index 7cfb3fdf99f7d7e660188d5a98b5cd2ac4c84bd5..ff23c525518de40a71b7c928a632bf50c7a0bd87 100644 (file)
@@ -30,6 +30,9 @@
 #include "rpc_server/drsuapi/dcesrv_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   add special SPNs needed for DRS replication to machine accounts when
   an AddEntry is done to create a nTDSDSA object
index 21de6477a741b26ca7746ba3f340b7a8ddac7a4c..026098dcb9f22748560c2f7d0e74ca4fb4f6341d 100644 (file)
@@ -33,6 +33,9 @@
 #include "param/param.h"
 #include "lib/messaging/irpc.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 #define DRSUAPI_UNSUPPORTED(fname) do { \
        DEBUG(1,(__location__ ": Unsupported DRS call %s\n", #fname)); \
        if (DEBUGLVL(2)) NDR_PRINT_IN_DEBUG(fname, r); \
index 2762a4e5cc2701d76f69f0b737f78e0dc0b5a873..53bcb16bd8e4993fef7f0e7a28d17c8908c460f6 100644 (file)
@@ -28,6 +28,9 @@
 #include "auth/session.h"
 #include "rpc_server/drsuapi/dcesrv_drsuapi.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
                                    TALLOC_CTX *mem_ctx,
                                    struct ldb_result **_res,
index afed782ed19aef0c07a45eb2045ab18f259d3ea8..cc41abbc2271001cc83e334f68e361d313385af3 100644 (file)
@@ -42,6 +42,9 @@
 #include "lib/dbwrap/dbwrap_rbt.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /* state of a partially completed getncchanges call */
 struct drsuapi_getncchanges_state {
        struct db_context *anc_cache;
index 9cf3556f49729ebd6cba945776d2ed5887d8ef2b..c92add744ec5fd945b71a5756d3daf1b5fa5fa3f 100644 (file)
@@ -30,6 +30,9 @@
 #include "librpc/gen_ndr/ndr_irpc_c.h"
 #include "lib/messaging/irpc.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 struct repsTo {
        uint32_t count;
        struct repsFromToBlob *r;
index b3903d315b4b4d35b45d8290ec946f946710db05..991efccae389509345e2b95c0161b4fdfbb38570 100644 (file)
@@ -32,6 +32,9 @@
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "auth/session.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS            DBGC_DRS_REPL
+
 /*
   check that the SPN update should be allowed as an override
   via sam_ctx_system