summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/errormap.c12
-rw-r--r--source4/librpc/rpc/dcerpc_util.c3
2 files changed, 14 insertions, 1 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 417f4571a7..6849d7d0cd 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1518,6 +1518,18 @@ const struct unix_error_map unix_nt_errmap[] = {
{ ECONNREFUSED, NT_STATUS_CONNECTION_REFUSED },
{ EBUSY, NT_STATUS_SHARING_VIOLATION },
{ ENOTSUP, NT_STATUS_NOT_SUPPORTED},
+#ifdef EHOSTUNREACH
+ { EHOSTUNREACH, NT_STATUS_HOST_UNREACHABLE },
+#endif
+#ifdef ENETUNREACH
+ { ENETUNREACH, NT_STATUS_NETWORK_UNREACHABLE },
+#endif
+#ifdef ETIMEDOUT
+ { ETIMEDOUT, NT_STATUS_IO_TIMEOUT },
+#endif
+#ifdef EADDRINUSE
+ { EADDRINUSE, NT_STATUS_ADDRESS_ALREADY_ASSOCIATED },
+#endif
#ifdef ENOATTR
{ ENOATTR, NT_STATUS_NOT_FOUND },
#endif
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 5c824cec99..c53e879802 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -1003,7 +1003,8 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp(struct dcerpc_pipe **p,
status = dcerpc_pipe_open_tcp(p, binding->host, port);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("Failed to connect to %s:%d\n", binding->host, port));
+ DEBUG(0,("Failed to connect to %s:%d - %s\n",
+ binding->host, port, nt_errstr(status)));
return status;
}