summaryrefslogtreecommitdiff
path: root/source4/utils/net/drs
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-06-25 04:31:41 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-06-25 04:51:58 +0300
commite40635c48d4b5853cbf463455e2ec90178375100 (patch)
tree46f3a0eed13926329da37539d726d6a043810c03 /source4/utils/net/drs
parent0dd6a759ed41960500e0869bfe96d93b2d11f50a (diff)
downloadsamba-e40635c48d4b5853cbf463455e2ec90178375100.tar.gz
samba-e40635c48d4b5853cbf463455e2ec90178375100.tar.bz2
samba-e40635c48d4b5853cbf463455e2ec90178375100.zip
s4/utils: fix few 'net drs replicate' error messages
mainly for the output to be more informative
Diffstat (limited to 'source4/utils/net/drs')
-rw-r--r--source4/utils/net/drs/net_drs_replicate.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/utils/net/drs/net_drs_replicate.c b/source4/utils/net/drs/net_drs_replicate.c
index 1b250eb424..1e28c73db5 100644
--- a/source4/utils/net/drs/net_drs_replicate.c
+++ b/source4/utils/net/drs/net_drs_replicate.c
@@ -62,12 +62,12 @@ net_drs_server_dn_from_dc_name(struct net_drs_context *drs_ctx,
"(&(objectCategory=server)(|(name=%1$s)(dNSHostName=%1$s)))",
dc_name);
if (ldb_err != LDB_SUCCESS) {
- d_printf("ldb_seach() failed with err: %d (%s);",
+ d_printf("ldb_seach() failed with err: %d (%s).\n",
ldb_err, ldb_errstring(drs_ctx->ldap.ldb));
goto failed;
}
if (ldb_res->count != 1) {
- d_printf("ldb_search() should return exactly one record!");
+ d_printf("ldb_search() should return exactly one record!\n");
goto failed;
}
@@ -116,12 +116,12 @@ static bool net_drs_ntds_guid_from_dc_name(struct net_drs_context *drs_ctx,
server_dn, LDB_SCOPE_ONELEVEL, attrs,
"%s", "(|(objectCategory=nTDSDSA)(objectCategory=nTDSDSARO))");
if (ldb_err != LDB_SUCCESS) {
- d_printf("ldb_seach() failed with err: %d (%s)",
+ d_printf("ldb_seach() failed with err: %d (%s).\n",
ldb_err, ldb_errstring(drs_ctx->ldap.ldb));
goto failed;
}
if (ldb_res->count != 1) {
- d_printf("ldb_search() should return exactly one record!");
+ d_printf("ldb_search() should return exactly one record!\n");
goto failed;
}
@@ -171,10 +171,12 @@ static bool net_drs_replicate_sync_nc(struct net_drs_context *drs_ctx,
status = dcerpc_drsuapi_DsReplicaSync_r(drs_conn->drs_handle, drs_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
- d_printf("DsReplicaSync failed - %s.\n", errstr);
+ d_printf("DsReplicaSync RPC failed - %s.\n", errstr);
return false;
} else if (!W_ERROR_IS_OK(req.out.result)) {
- d_printf("DsReplicaSync failed - %s.\n", win_errstr(req.out.result));
+ d_printf("DsReplicaSync failed - %s (nc=[%s], dsa_guid=[%s]).\n",
+ win_errstr(req.out.result),
+ nc.dn, GUID_string(drs_ctx, &ntds_guid_src));
return false;
}