1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r3792: improved the posix -> nt error mapping, so we get things like

NT_STATUS_HOST_UNREACHABLE instead of NT_STATUS_UNSUCCESSFUL
(This used to be commit f2a488e566)
This commit is contained in:
Andrew Tridgell 2004-11-17 00:31:56 +00:00 committed by Gerald (Jerry) Carter
parent 7f340a2997
commit 285db33399
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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;
}