s4-kerberos Mention the remote address we fail to contact the KDC on
authorAndrew Bartlett <abartlet@samba.org>
Fri, 5 Nov 2010 06:08:52 +0000 (17:08 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 5 Nov 2010 12:42:08 +0000 (23:42 +1100)
source4/auth/kerberos/krb5_init_context.c

index 2f1416d3fe7a420e25a37ff393e1c4bb3f2df0fc..6727de0f997df8c4e2f8cd5e110d0d8b2fa072d1 100644 (file)
@@ -29,6 +29,7 @@
 #include "system/network.h"
 #include "param/param.h"
 #include "libcli/resolve/resolve.h"
+#include "../lib/tsocket/tsocket.h"
 
 /*
   context structure for operations on cldap packets
@@ -367,7 +368,15 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context,
                }
 
                if (!NT_STATUS_IS_OK(smb_krb5->status)) {
-                       DEBUG(2,("Error reading smb_krb5 reply packet: %s\n", nt_errstr(smb_krb5->status)));
+                       struct tsocket_address *addr = socket_address_to_tsocket_address(smb_krb5, remote_addr);
+                       const char *addr_string = NULL;
+                       if (addr) {
+                               addr_string = tsocket_address_inet_addr_string(addr, smb_krb5);
+                       } else {
+                               addr_string = NULL;
+                       }
+                       DEBUG(2,("Error reading smb_krb5 reply packet: %s from %s\n", nt_errstr(smb_krb5->status),
+                                addr_string));
                        talloc_free(smb_krb5);
                        continue;
                }