r12872: Add some more detail to debug message.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 12 Jan 2006 21:42:26 +0000 (21:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:50:56 +0000 (13:50 -0500)
Andrew Bartlett
(This used to be commit cefba10bd5ed1f6d10a071e4239088d91f661a36)

source4/libnet/libnet_vampire.c

index 26e39392051f1b3f2e10fb272f83926f082db300..da8c3b49d11a43bf24d625dd65cb99e9ee870369 100644 (file)
@@ -219,9 +219,15 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx
        /* connect to the NETLOGON pipe of the PDC */
        nt_status = libnet_RpcConnect(machine_net_ctx, c, c);
        if (!NT_STATUS_IS_OK(nt_status)) {
-               r->out.error_string = talloc_asprintf(mem_ctx,
-                                                     "Connection to NETLOGON pipe of DC failed: %s",
-                                                     c->out.error_string);
+               if (r->in.binding_string) {
+                       r->out.error_string = talloc_asprintf(mem_ctx,
+                                                             "Connection to NETLOGON pipe of DC %s failed: %s",
+                                                             r->in.binding_string, c->out.error_string);
+               } else {
+                       r->out.error_string = talloc_asprintf(mem_ctx,
+                                                             "Connection to NETLOGON pipe of DC for %s failed: %s",
+                                                             c->in.name, c->out.error_string);
+               }
                talloc_free(samsync_ctx);
                return nt_status;
        }