diff options
author | Jeremy Allison <jra@samba.org> | 2005-01-18 22:40:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:57 -0500 |
commit | d33c5aa71fb42a0fe87281812af7508bbc2a2f51 (patch) | |
tree | a2bd88dcc643a42bae729865073b05e2a9f12c0d /source3/smbd | |
parent | 2cca804e61dc1a5efbc40a44fc4a5823074bc78e (diff) | |
download | samba-d33c5aa71fb42a0fe87281812af7508bbc2a2f51.tar.gz samba-d33c5aa71fb42a0fe87281812af7508bbc2a2f51.tar.bz2 samba-d33c5aa71fb42a0fe87281812af7508bbc2a2f51.zip |
r4830: Fix for problem noticed by Guy Harris <gharris@apple.com>, return
correct DOS/NT error code on transact named pipe on closed pipe
handle.
Jeremy.
(This used to be commit 599c281464fa96725c3ee6dd3c5ee03ea81314ea)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/ipc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 9fcd39b500..3f21a2ac6a 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -269,7 +269,7 @@ static int api_fd_reply(connection_struct *conn,uint16 vuid,char *outbuf, /* First find out the name of this file. */ if (suwcnt != 2) { DEBUG(0,("Unexpected named pipe transaction.\n")); - return(-1); + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } /* Get the file handle and hence the file name. */ @@ -290,7 +290,7 @@ static int api_fd_reply(connection_struct *conn,uint16 vuid,char *outbuf, } DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum)); - return api_no_reply(outbuf, mdrcnt); + return ERROR_NT(NT_STATUS_INVALID_HANDLE); } DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n", subcommand, p->name, pnum)); @@ -315,6 +315,8 @@ static int api_fd_reply(connection_struct *conn,uint16 vuid,char *outbuf, /* Set Named Pipe Handle state */ reply = api_SNPHS(outbuf, p, params, tpscnt); break; + default: + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } if (!reply) |