diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb.c | 12 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb2.c | 12 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_sock.c | 2 |
3 files changed, 23 insertions, 3 deletions
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 55fc37d84f..5100eb60f2 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -39,7 +39,17 @@ struct smb_private { */ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) { - c->transport.recv_data(c, NULL, status); + if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) { + status = NT_STATUS_UNEXPECTED_NETWORK_ERROR; + } + + if (NT_STATUS_EQUAL(NT_STATUS_OK, status)) { + status = NT_STATUS_END_OF_FILE; + } + + if (c->transport.recv_data) { + c->transport.recv_data(c, NULL, status); + } } diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c index d2ab47898e..385cb00919 100644 --- a/source4/librpc/rpc/dcerpc_smb2.c +++ b/source4/librpc/rpc/dcerpc_smb2.c @@ -41,7 +41,17 @@ struct smb2_private { */ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status) { - c->transport.recv_data(c, NULL, status); + if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) { + status = NT_STATUS_UNEXPECTED_NETWORK_ERROR; + } + + if (NT_STATUS_EQUAL(NT_STATUS_OK, status)) { + status = NT_STATUS_END_OF_FILE; + } + + if (c->transport.recv_data) { + c->transport.recv_data(c, NULL, status); + } } diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index fd54a20afc..e1ba2d769d 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -76,7 +76,7 @@ static void sock_dead(struct dcerpc_connection *p, NTSTATUS status) status = NT_STATUS_END_OF_FILE; } - if (!NT_STATUS_IS_OK(status)) { + if (p->transport.recv_data) { p->transport.recv_data(p, NULL, status); } } |