summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-10 18:23:00 -0700
committerJeremy Allison <jra@samba.org>2009-07-10 18:23:00 -0700
commit2000421c592b672898f85758638be74d8485da1e (patch)
tree9bd5f3a3ad130d855bf2233d39cbbe6c2edf7f95 /source3/smbd/pipes.c
parent361aa19e69d4176dd8c30f485cc637cd33308d62 (diff)
downloadsamba-2000421c592b672898f85758638be74d8485da1e.tar.gz
samba-2000421c592b672898f85758638be74d8485da1e.tar.bz2
samba-2000421c592b672898f85758638be74d8485da1e.zip
Remove reply_unixerror() - no longer needed. Should make Metze's refactoring a lot easier.
Jeremy.
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index 7ae7435646..799568d0d5 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -203,8 +203,14 @@ static void pipe_write_done(struct tevent_req *subreq)
status = np_write_recv(subreq, &nwritten);
TALLOC_FREE(subreq);
- if ((nwritten == 0 && state->numtowrite != 0) || (nwritten < 0)) {
- reply_unixerror(req, ERRDOS, ERRnoaccess);
+ if (nwritten < 0) {
+ reply_nterror(req, status);
+ goto send;
+ }
+
+ /* Looks bogus to me now. Needs to be removed ? JRA. */
+ if ((nwritten == 0 && state->numtowrite != 0)) {
+ reply_doserror(req, ERRDOS, ERRnoaccess);
goto send;
}
@@ -283,7 +289,7 @@ void reply_pipe_write_and_X(struct smb_request *req)
DEBUG(0,("reply_pipe_write_and_X: start of message "
"set and not enough data sent.(%u)\n",
(unsigned int)state->numtowrite ));
- reply_unixerror(req, ERRDOS, ERRnoaccess);
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
return;
}
@@ -313,8 +319,15 @@ static void pipe_write_andx_done(struct tevent_req *subreq)
status = np_write_recv(subreq, &nwritten);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status) || (nwritten != state->numtowrite)) {
- reply_unixerror(req, ERRDOS,ERRnoaccess);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
+ goto done;
+ }
+
+ /* Looks bogus to me now. Is this error message correct ? JRA. */
+ if (nwritten != state->numtowrite) {
+ reply_doserror(req, ERRDOS,ERRnoaccess);
goto done;
}