diff options
-rw-r--r-- | source3/smbd/ipc.c | 11 | ||||
-rw-r--r-- | source3/smbd/proto.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 36c29164f0..c795d289ea 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -79,6 +79,17 @@ static void copy_trans_params_and_data(char *outbuf, int align, memcpy(copy_into, &rdata[data_offset], data_len); } +NTSTATUS nt_status_np_pipe(NTSTATUS status) +{ + if (NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_DISCONNECTED)) { + status = NT_STATUS_PIPE_DISCONNECTED; + } else if (NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) { + status = NT_STATUS_PIPE_BROKEN; + } + + return status; +} + /**************************************************************************** Send a trans reply. ****************************************************************************/ diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 4a3bd2d334..3005e6ac85 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -396,6 +396,7 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp, /* The following definitions come from smbd/ipc.c */ +NTSTATUS nt_status_np_pipe(NTSTATUS status); void send_trans_reply(connection_struct *conn, struct smb_request *req, char *rparam, int rparam_len, |