Samba log and git diff for DEBUG

During replication request from Windows DC:

C:\Documents and Settings\Administrator>repadmin /replicate dc01 dc02 dc=company3,dc=dd
DsReplicaSync() failed with status 8418 (0x20e2):
    The replication operation failed because of a schema mismatch between the servers involved.

[or]

[root@dc02 samba.git]# samba-tool drs replicate dc01 dc02 dc=company3,dc=dd
Start replicating for source GUID d3d8861f-ec0b-4ee6-9401-bd8061603eeb.
ERROR(<class 'samba.drs_utils.drsException'>): DsReplicaSync failed - drsException: DsReplicaSync failed (8418, 'WERR_DS_DRA_SCHEMA_MISMATCH')
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/drs.py", line 349, in run
    drs_utils.sendDsReplicaSync(self.drsuapi, self.drsuapi_handle, source_dsa_guid, NC, req_options)
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/drs_utils.py", line 83, in sendDsReplicaSync
    raise drsException("DsReplicaSync failed %s" % estr)

	
tail -f /usr/local/samba/var/log.samba
[...]

[2016/02/12 17:02:19.040891,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1303(dcesrv_drsuapi_is_gc_pas_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1303: dcesrv_drsuapi_is_gc_pas_request()
[2016/02/12 17:02:19.040998,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1218(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1218: dcesrv_drsuapi_is_reveal_secrets_request()
[2016/02/12 17:02:19.041025,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1240(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1240: dcesrv_drsuapi_is_reveal_secrets_request() NO DRS_SPECIAL_SECRET_PROCESSING
[2016/02/12 17:02:19.067335,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1807(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1807: DsGetNCChanges getncchanges_collect_objects (none) with search_res->count = 234
[2016/02/12 17:02:19.068855,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1880(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1880: DsGetNCChanges initial ctr6.naming_context NC dc=company3,dc=dd REQ10 NC dc=company3,dc=dd, STATE dc=company3,dc=dd (last_dn (null))
[2016/02/12 17:02:19.294975,  0] ../source4/rpc_server/drsuapi/getncchanges.c:329(get_nc_changes_build_object)
  ../source4/rpc_server/drsuapi/getncchanges.c:329: Build replica object: CN=DC02,OU=Domain Controllers,DC=company3,DC=dd
[2016/02/12 17:02:19.295082,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 131073 in schema for element: instanceType
[2016/02/12 17:02:19.295115,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 590595 in schema for element: servicePrincipalName
[2016/02/12 17:02:19.295153,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 591520 in schema for element: lastLogonTimestamp
[2016/02/12 17:02:19.296352,  0] ../source4/rpc_server/drsuapi/getncchanges.c:2155(dcesrv_drsuapi_DsGetNCChanges)
  DsGetNCChanges with uSNChanged >= 1 flags 0x00201070 on dc=company3,dc=dd gave 1 objects (done 234/234) 23 links (done 23/23 (as S-1-5-21-8659820-343394492-589173015-1003))
[2016/02/12 17:02:19.296912,  0] ../source4/rpc_server/common/reply.c:204(dcesrv_reply)
  RPC do reply for call id 73
[2016/02/12 17:02:19.304282,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1303(dcesrv_drsuapi_is_gc_pas_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1303: dcesrv_drsuapi_is_gc_pas_request()
[2016/02/12 17:02:19.304370,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1218(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1218: dcesrv_drsuapi_is_reveal_secrets_request()
[2016/02/12 17:02:19.304397,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1240(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1240: dcesrv_drsuapi_is_reveal_secrets_request() NO DRS_SPECIAL_SECRET_PROCESSING
[2016/02/12 17:02:19.487821,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1807(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1807: DsGetNCChanges getncchanges_collect_objects (none) with search_res->count = 0
[2016/02/12 17:02:19.487959,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1880(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1880: DsGetNCChanges initial ctr6.naming_context NC CN=Schema,CN=Configuration,DC=company3,DC=dd REQ10 NC CN=Schema,CN=Configuration,DC=company3,DC=dd, STATE CN=Schema,CN=Configuration,DC=company3,DC=dd (last_dn (null))
[2016/02/12 17:02:19.488963,  0] ../source4/rpc_server/drsuapi/getncchanges.c:2155(dcesrv_drsuapi_DsGetNCChanges)
  DsGetNCChanges with uSNChanged >= 2351 flags 0x00000071 on <GUID=7a51a45f-0110-445f-977a-6e9dbe745abd>;CN=Schema,CN=Configuration,DC=company3,DC=dd gave 0 objects (done 0/0) 0 links (done 0/0 (as S-1-5-21-8659820-343394492-589173015-1003))
[2016/02/12 17:02:19.489103,  0] ../source4/rpc_server/common/reply.c:204(dcesrv_reply)
  RPC do reply for call id 74
[2016/02/12 17:02:19.497747,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1303(dcesrv_drsuapi_is_gc_pas_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1303: dcesrv_drsuapi_is_gc_pas_request()
[2016/02/12 17:02:19.497819,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1218(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1218: dcesrv_drsuapi_is_reveal_secrets_request()
[2016/02/12 17:02:19.497843,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1240(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1240: dcesrv_drsuapi_is_reveal_secrets_request() NO DRS_SPECIAL_SECRET_PROCESSING
[2016/02/12 17:02:19.523542,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1807(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1807: DsGetNCChanges getncchanges_collect_objects (none) with search_res->count = 234
[2016/02/12 17:02:19.524966,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1880(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1880: DsGetNCChanges initial ctr6.naming_context NC dc=company3,dc=dd REQ10 NC dc=company3,dc=dd, STATE dc=company3,dc=dd (last_dn (null))
[2016/02/12 17:02:19.752030,  0] ../source4/rpc_server/drsuapi/getncchanges.c:329(get_nc_changes_build_object)
  ../source4/rpc_server/drsuapi/getncchanges.c:329: Build replica object: CN=DC02,OU=Domain Controllers,DC=company3,DC=dd
[2016/02/12 17:02:19.752136,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 131073 in schema for element: instanceType
[2016/02/12 17:02:19.752166,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 590595 in schema for element: servicePrincipalName
[2016/02/12 17:02:19.752208,  0] ../source4/rpc_server/drsuapi/getncchanges.c:345(get_nc_changes_build_object)
   > attributeID 591520 in schema for element: lastLogonTimestamp
[2016/02/12 17:02:19.753377,  0] ../source4/rpc_server/drsuapi/getncchanges.c:2155(dcesrv_drsuapi_DsGetNCChanges)
  DsGetNCChanges with uSNChanged >= 1 flags 0x00201071 on dc=company3,dc=dd gave 1 objects (done 234/234) 23 links (done 23/23 (as S-1-5-21-8659820-343394492-589173015-1003))
[2016/02/12 17:02:19.753952,  0] ../source4/rpc_server/common/reply.c:204(dcesrv_reply)
  RPC do reply for call id 75
[2016/02/12 17:02:19.760785,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1303(dcesrv_drsuapi_is_gc_pas_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1303: dcesrv_drsuapi_is_gc_pas_request()
[2016/02/12 17:02:19.760877,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1218(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1218: dcesrv_drsuapi_is_reveal_secrets_request()
[2016/02/12 17:02:19.760904,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1240(dcesrv_drsuapi_is_reveal_secrets_request)
  ../source4/rpc_server/drsuapi/getncchanges.c:1240: dcesrv_drsuapi_is_reveal_secrets_request() NO DRS_SPECIAL_SECRET_PROCESSING
[2016/02/12 17:02:19.937271,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1807(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1807: DsGetNCChanges getncchanges_collect_objects (none) with search_res->count = 0
[2016/02/12 17:02:19.937416,  0] ../source4/rpc_server/drsuapi/getncchanges.c:1880(dcesrv_drsuapi_DsGetNCChanges)
  ../source4/rpc_server/drsuapi/getncchanges.c:1880: DsGetNCChanges initial ctr6.naming_context NC CN=Schema,CN=Configuration,DC=company3,DC=dd REQ10 NC CN=Schema,CN=Configuration,DC=company3,DC=dd, STATE CN=Schema,CN=Configuration,DC=company3,DC=dd (last_dn (null))
[2016/02/12 17:02:19.938343,  0] ../source4/rpc_server/drsuapi/getncchanges.c:2155(dcesrv_drsuapi_DsGetNCChanges)
  DsGetNCChanges with uSNChanged >= 2351 flags 0x00000071 on <GUID=7a51a45f-0110-445f-977a-6e9dbe745abd>;CN=Schema,CN=Configuration,DC=company3,DC=dd gave 0 objects (done 0/0) 0 links (done 0/0 (as S-1-5-21-8659820-343394492-589173015-1003))
[2016/02/12 17:02:19.938494,  0] ../source4/rpc_server/common/reply.c:204(dcesrv_reply)
  RPC do reply for call id 76
  

[root@dc02 samba.git]# git diff HEAD samba-4.3.4
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 84c67d1..4c70e2f 100755
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -263,11 +263,11 @@ def build(bld):
 
         # ldbtest doesn't get installed
         bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='ldb-cmdline ldb',
-                         install=True)
+                         install=False)
 
         # ldbdump doesn't get installed
         bld.SAMBA_BINARY('ldbdump', 'tools/ldbdump.c', deps='ldb-cmdline ldb',
-                         install=True)
+                         install=False)
 
         bld.SAMBA_LIBRARY('ldb-cmdline',
                           source='tools/ldbutil.c tools/cmdline.c',
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index cbf868a..e8e9ec8 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -331,7 +331,6 @@ class cmd_drs_replicate(Command):
         source_dsa_guid = msg[0]['objectGUID'][0]
         dsa_options = int(attr_default(msg, 'options', 0))
 
-        self.message("Start replicating for source GUID %s." % (str(misc.GUID(source_dsa_guid))))
 
         req_options = 0
         if not (dsa_options & dsdb.DS_NTDSDSA_OPT_DISABLE_OUTBOUND_REPL):
diff --git a/source4/rpc_server/common/reply.c b/source4/rpc_server/common/reply.c
index 4b767b8..007b680 100644
--- a/source4/rpc_server/common/reply.c
+++ b/source4/rpc_server/common/reply.c
@@ -201,8 +201,6 @@ _PUBLIC_ NTSTATUS dcesrv_reply(struct dcesrv_call_state *call)
 	}
 	chunk_size -= (chunk_size % DCERPC_AUTH_PAD_ALIGNMENT);
 
-	DEBUG(0,("RPC do reply for call id %u\n", call->pkt.call_id));
-
 	do {
 		uint32_t length;
 		struct data_blob_list_item *rep;
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 5dadb4a..d755306 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -326,8 +326,6 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
 		return WERR_NOMEM;
 	}
 
-	DEBUG(0,(__location__ ": Build replica object: %s\n", ldb_dn_get_linearized(msg->dn)));
-
 	/*
 	 * Note that the meta_data array and the attributes array must
 	 * be the same size and in the same order
@@ -342,7 +340,6 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
 			DEBUG(0,("Unable to find attributeID %u in schema\n", attids[i]));
 			return WERR_DS_DRA_INTERNAL_ERROR;
 		}
-		DEBUG(0,(" > attributeID %u in schema for element: %s\n", attids[i], sa->lDAPDisplayName));
 
 		el = ldb_msg_find_element(msg, sa->lDAPDisplayName);
 		if (el == NULL) {
@@ -1845,13 +1842,6 @@ allowed:
 		return WERR_DS_DRA_INTERNAL_ERROR;
 	}
 
-	DEBUG(0,(__location__ ": DsGetNCChanges initial ctr6.naming_context"
-		 " NC %s REQ10 NC %s, STATE %s (last_dn %s)\n",
-		 ncRoot->dn,
-		 req10->naming_context->dn,
-		 ldb_dn_get_linearized(getnc_state->ncRoot_dn),
-		 ldb_dn_get_linearized(getnc_state->last_dn)));
-
 	r->out.ctr->ctr6.naming_context = talloc(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier);
 	*r->out.ctr->ctr6.naming_context = *ncRoot;
 
@@ -2114,8 +2104,7 @@ allowed:
 		ZERO_STRUCT(r->out.ctr->ctr6.new_highwatermark);
 	}
 
-	//DEBUG(r->out.ctr->ctr6.more_data?4:2,
-	DEBUG(0,
+	DEBUG(r->out.ctr->ctr6.more_data?4:2,
 	      ("DsGetNCChanges with uSNChanged >= %llu flags 0x%08x on %s gave %u objects (done %u/%u) %u links (done %u/%u (as %s))\n",
 	       (unsigned long long)(req10->highwatermark.highest_usn+1),
 	       req10->replica_flags, drs_ObjectIdentifier_to_string(mem_ctx, ncRoot),


