Author: jra Date: 2005-01-18 22:40:49 +0000 (Tue, 18 Jan 2005) New Revision: 4830
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4830 Log: Fix for problem noticed by Guy Harris <[EMAIL PROTECTED]>, return correct DOS/NT error code on transact named pipe on closed pipe handle. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/ipc.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/ipc.c =================================================================== --- branches/SAMBA_3_0/source/smbd/ipc.c 2005-01-18 22:40:40 UTC (rev 4829) +++ branches/SAMBA_3_0/source/smbd/ipc.c 2005-01-18 22:40:49 UTC (rev 4830) @@ -269,7 +269,7 @@ /* 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 @@ } 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 @@ /* Set Named Pipe Handle state */ reply = api_SNPHS(outbuf, p, params, tpscnt); break; + default: + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } if (!reply)