2 Unix SMB/CIFS implementation.
3 Inter-process communication and named pipe handling
4 Copyright (C) Andrew Tridgell 1992-1998
7 Copyright (C) John H Terpstra 1995-1998
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 This file handles the named pipe and mailslot calls
24 in the SMBtrans protocol
31 #define NERR_notsupported 50
33 extern int smb_read_error
;
35 /*******************************************************************
36 copies parameters and data, as needed, into the smb buffer
38 *both* the data and params sections should be aligned. this
39 is fudged in the rpc pipes by
40 at present, only the data section is. this may be a possible
41 cause of some of the ipc problems being experienced. lkcl26dec97
43 ******************************************************************/
45 static void copy_trans_params_and_data(char *outbuf
, int align
,
46 char *rparam
, int param_offset
, int param_len
,
47 char *rdata
, int data_offset
, int data_len
)
49 char *copy_into
= smb_buf(outbuf
)+1;
57 DEBUG(5,("copy_trans_params_and_data: params[%d..%d] data[%d..%d]\n",
58 param_offset
, param_offset
+ param_len
,
59 data_offset
, data_offset
+ data_len
));
62 memcpy(copy_into
, &rparam
[param_offset
], param_len
);
64 copy_into
+= param_len
+ align
;
67 memcpy(copy_into
, &rdata
[data_offset
], data_len
);
70 /****************************************************************************
72 ****************************************************************************/
74 void send_trans_reply(const char *inbuf
,
80 BOOL buffer_too_large
)
82 int this_ldata
,this_lparam
;
83 int tot_data_sent
= 0;
84 int tot_param_sent
= 0;
87 int ldata
= rdata
? rdata_len
: 0;
88 int lparam
= rparam
? rparam_len
: 0;
91 DEBUG(5,("send_trans_reply: buffer %d too large\n", ldata
));
93 this_lparam
= MIN(lparam
,max_send
- 500); /* hack */
94 this_ldata
= MIN(ldata
,max_send
- (500+this_lparam
));
96 align
= ((this_lparam
)%4);
98 if (buffer_too_large
) {
99 ERROR_BOTH(STATUS_BUFFER_OVERFLOW
,ERRDOS
,ERRmoredata
);
102 set_message(inbuf
,outbuf
,10,1+align
+this_ldata
+this_lparam
,True
);
104 copy_trans_params_and_data(outbuf
, align
,
105 rparam
, tot_param_sent
, this_lparam
,
106 rdata
, tot_data_sent
, this_ldata
);
108 SSVAL(outbuf
,smb_vwv0
,lparam
);
109 SSVAL(outbuf
,smb_vwv1
,ldata
);
110 SSVAL(outbuf
,smb_vwv3
,this_lparam
);
111 SSVAL(outbuf
,smb_vwv4
,smb_offset(smb_buf(outbuf
)+1,outbuf
));
112 SSVAL(outbuf
,smb_vwv5
,0);
113 SSVAL(outbuf
,smb_vwv6
,this_ldata
);
114 SSVAL(outbuf
,smb_vwv7
,smb_offset(smb_buf(outbuf
)+1+this_lparam
+align
,outbuf
));
115 SSVAL(outbuf
,smb_vwv8
,0);
116 SSVAL(outbuf
,smb_vwv9
,0);
119 if (!send_smb(smbd_server_fd(),outbuf
))
120 exit_server_cleanly("send_trans_reply: send_smb failed.");
122 tot_data_sent
= this_ldata
;
123 tot_param_sent
= this_lparam
;
125 while (tot_data_sent
< ldata
|| tot_param_sent
< lparam
)
127 this_lparam
= MIN(lparam
-tot_param_sent
, max_send
- 500); /* hack */
128 this_ldata
= MIN(ldata
-tot_data_sent
, max_send
- (500+this_lparam
));
136 align
= (this_lparam
%4);
138 set_message(inbuf
,outbuf
,10,1+this_ldata
+this_lparam
+align
,False
);
140 copy_trans_params_and_data(outbuf
, align
,
141 rparam
, tot_param_sent
, this_lparam
,
142 rdata
, tot_data_sent
, this_ldata
);
144 SSVAL(outbuf
,smb_vwv3
,this_lparam
);
145 SSVAL(outbuf
,smb_vwv4
,smb_offset(smb_buf(outbuf
)+1,outbuf
));
146 SSVAL(outbuf
,smb_vwv5
,tot_param_sent
);
147 SSVAL(outbuf
,smb_vwv6
,this_ldata
);
148 SSVAL(outbuf
,smb_vwv7
,smb_offset(smb_buf(outbuf
)+1+this_lparam
+align
,outbuf
));
149 SSVAL(outbuf
,smb_vwv8
,tot_data_sent
);
150 SSVAL(outbuf
,smb_vwv9
,0);
153 if (!send_smb(smbd_server_fd(),outbuf
))
154 exit_server_cleanly("send_trans_reply: send_smb failed.");
156 tot_data_sent
+= this_ldata
;
157 tot_param_sent
+= this_lparam
;
161 /****************************************************************************
162 Start the first part of an RPC reply which began with an SMBtrans request.
163 ****************************************************************************/
165 static BOOL
api_rpc_trans_reply(const char *inbuf
,
169 BOOL is_data_outstanding
;
170 char *rdata
= (char *)SMB_MALLOC(p
->max_trans_reply
);
174 DEBUG(0,("api_rpc_trans_reply: malloc fail.\n"));
178 if((data_len
= read_from_pipe( p
, rdata
, p
->max_trans_reply
,
179 &is_data_outstanding
)) < 0) {
184 send_trans_reply(inbuf
, outbuf
, NULL
, 0, rdata
, data_len
, is_data_outstanding
);
190 /****************************************************************************
191 WaitNamedPipeHandleState
192 ****************************************************************************/
194 static BOOL
api_WNPHS(const char *inbuf
,
202 if (!param
|| param_len
< 2)
205 priority
= SVAL(param
,0);
206 DEBUG(4,("WaitNamedPipeHandleState priority %x\n", priority
));
208 if (wait_rpc_pipe_hnd_state(p
, priority
)) {
209 /* now send the reply */
210 send_trans_reply(inbuf
, outbuf
, NULL
, 0, NULL
, 0, False
);
217 /****************************************************************************
218 SetNamedPipeHandleState
219 ****************************************************************************/
221 static BOOL
api_SNPHS(const char *inbuf
,
229 if (!param
|| param_len
< 2)
233 DEBUG(4,("SetNamedPipeHandleState to code %x\n", id
));
235 if (set_rpc_pipe_hnd_state(p
, id
)) {
236 /* now send the reply */
237 send_trans_reply(inbuf
, outbuf
, NULL
, 0, NULL
, 0, False
);
244 /****************************************************************************
245 When no reply is generated, indicate unsupported.
246 ****************************************************************************/
248 static BOOL
api_no_reply(const char *inbuf
, char *outbuf
, int max_rdata_len
)
253 SSVAL(rparam
,0,NERR_notsupported
);
254 SSVAL(rparam
,2,0); /* converter word */
256 DEBUG(3,("Unsupported API fd command\n"));
258 /* now send the reply */
259 send_trans_reply(inbuf
, outbuf
, rparam
, 4, NULL
, 0, False
);
264 /****************************************************************************
265 Handle remote api calls delivered to a named pipe already opened.
266 ****************************************************************************/
268 static int api_fd_reply(connection_struct
*conn
,
282 smb_np_struct
*p
= NULL
;
286 DEBUG(5,("api_fd_reply\n"));
288 /* First find out the name of this file. */
290 DEBUG(0,("Unexpected named pipe transaction.\n"));
291 return ERROR_NT(NT_STATUS_INVALID_PARAMETER
);
294 /* Get the file handle and hence the file name. */
296 * NB. The setup array has already been transformed
297 * via SVAL and so is in gost byte order.
299 pnum
= ((int)setup
[1]) & 0xFFFF;
300 subcommand
= ((int)setup
[0]) & 0xFFFF;
302 if(!(p
= get_rpc_pipe(pnum
))) {
303 if (subcommand
== TRANSACT_WAITNAMEDPIPEHANDLESTATE
) {
304 /* Win9x does this call with a unicode pipe name, not a pnum. */
305 /* Just return success for now... */
306 DEBUG(3,("Got TRANSACT_WAITNAMEDPIPEHANDLESTATE on text pipe name\n"));
307 send_trans_reply(inbuf
, outbuf
, NULL
, 0, NULL
, 0, False
);
311 DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum
));
312 return ERROR_NT(NT_STATUS_INVALID_HANDLE
);
315 if (vuid
!= p
->vuid
) {
316 DEBUG(1, ("Got pipe request (pnum %x) using invalid VUID %d, "
317 "expected %d\n", pnum
, vuid
, p
->vuid
));
318 return ERROR_NT(NT_STATUS_INVALID_HANDLE
);
321 DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n", subcommand
, p
->name
, pnum
));
323 /* record maximum data length that can be transmitted in an SMBtrans */
324 p
->max_trans_reply
= mdrcnt
;
326 DEBUG(10,("api_fd_reply: p:%p max_trans_reply: %d\n", p
, p
->max_trans_reply
));
328 switch (subcommand
) {
329 case TRANSACT_DCERPCCMD
:
330 /* dce/rpc command */
331 reply
= write_to_pipe(p
, data
, tdscnt
);
333 reply
= api_rpc_trans_reply(inbuf
, outbuf
, p
);
335 case TRANSACT_WAITNAMEDPIPEHANDLESTATE
:
336 /* Wait Named Pipe Handle state */
337 reply
= api_WNPHS(inbuf
, outbuf
, p
, params
, tpscnt
);
339 case TRANSACT_SETNAMEDPIPEHANDLESTATE
:
340 /* Set Named Pipe Handle state */
341 reply
= api_SNPHS(inbuf
, outbuf
, p
, params
, tpscnt
);
344 return ERROR_NT(NT_STATUS_INVALID_PARAMETER
);
348 return api_no_reply(inbuf
, outbuf
, mdrcnt
);
353 /****************************************************************************
354 Handle named pipe commands.
355 ****************************************************************************/
357 static int named_pipe(connection_struct
*conn
, uint16 vuid
,
358 const char *inbuf
, char *outbuf
,
359 char *name
, uint16
*setup
,
360 char *data
, char *params
,
361 int suwcnt
, int tdscnt
,int tpscnt
,
362 int msrcnt
, int mdrcnt
, int mprcnt
)
364 DEBUG(3,("named pipe command on <%s> name\n", name
));
366 if (strequal(name
,"LANMAN")) {
367 return api_reply(conn
, vuid
, inbuf
, outbuf
,
373 if (strequal(name
,"WKSSVC") ||
374 strequal(name
,"SRVSVC") ||
375 strequal(name
,"WINREG") ||
376 strequal(name
,"SAMR") ||
377 strequal(name
,"LSARPC")) {
378 DEBUG(4,("named pipe command from Win95 (wow!)\n"));
379 return api_fd_reply(conn
, vuid
, inbuf
, outbuf
,
381 suwcnt
, tdscnt
, tpscnt
,
385 if (strlen(name
) < 1) {
386 return api_fd_reply(conn
, vuid
, inbuf
, outbuf
,
388 params
, suwcnt
, tdscnt
,
389 tpscnt
, mdrcnt
, mprcnt
);
393 DEBUG(3,("unknown named pipe: setup 0x%X setup1=%d\n",
394 (int)setup
[0],(int)setup
[1]));
399 static NTSTATUS
handle_trans(connection_struct
*conn
,
400 struct smb_request
*req
,
401 struct trans_state
*state
,
404 char *local_machine_name
;
406 char *inbuf
, *outbuf
;
409 DEBUG(3,("trans <%s> data=%u params=%u setup=%u\n",
410 state
->name
,(unsigned int)state
->total_data
,(unsigned int)state
->total_param
,
411 (unsigned int)state
->setup_count
));
413 if (!reply_prep_legacy(req
, &inbuf
, &outbuf
, &size
, &bufsize
)) {
414 return NT_STATUS_NO_MEMORY
;
418 * WinCE wierdness....
421 local_machine_name
= talloc_asprintf(state
, "\\%s\\",
422 get_local_machine_name());
424 if (local_machine_name
== NULL
) {
425 return NT_STATUS_NO_MEMORY
;
428 if (strnequal(state
->name
, local_machine_name
,
429 strlen(local_machine_name
))) {
430 name_offset
= strlen(local_machine_name
)-1;
433 if (!strnequal(&state
->name
[name_offset
], "\\PIPE",
435 return NT_STATUS_NOT_SUPPORTED
;
438 name_offset
+= strlen("\\PIPE");
440 /* Win9x weirdness. When talking to a unicode server Win9x
441 only sends \PIPE instead of \PIPE\ */
443 if (state
->name
[name_offset
] == '\\')
446 DEBUG(5,("calling named_pipe\n"));
447 *outsize
= named_pipe(conn
,
451 state
->name
+name_offset
,
452 state
->setup
,state
->data
,
454 state
->setup_count
,state
->total_data
,
456 state
->max_setup_return
,
457 state
->max_data_return
,
458 state
->max_param_return
);
461 return NT_STATUS_NOT_SUPPORTED
;
464 if (state
->close_on_completion
)
465 close_cnum(conn
,state
->vuid
);
467 reply_post_legacy(req
, *outsize
);
472 /****************************************************************************
474 ****************************************************************************/
476 void reply_trans(connection_struct
*conn
, struct smb_request
*req
)
483 struct trans_state
*state
;
487 START_PROFILE(SMBtrans
);
489 if (SVAL(req
->inbuf
, smb_wct
) < 10) {
490 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
491 END_PROFILE(SMBtrans
);
495 size
= smb_len(req
->inbuf
) + 4;
496 dsoff
= SVAL(req
->inbuf
, smb_dsoff
);
497 dscnt
= SVAL(req
->inbuf
, smb_dscnt
);
498 psoff
= SVAL(req
->inbuf
, smb_psoff
);
499 pscnt
= SVAL(req
->inbuf
, smb_pscnt
);
501 result
= allow_new_trans(conn
->pending_trans
, req
->mid
);
502 if (!NT_STATUS_IS_OK(result
)) {
503 DEBUG(2, ("Got invalid trans request: %s\n",
505 reply_nterror(req
, result
);
506 END_PROFILE(SMBtrans
);
510 if ((state
= TALLOC_P(conn
->mem_ctx
, struct trans_state
)) == NULL
) {
511 DEBUG(0, ("talloc failed\n"));
512 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
513 END_PROFILE(SMBtrans
);
517 state
->cmd
= SMBtrans
;
519 state
->mid
= req
->mid
;
520 state
->vuid
= req
->vuid
;
521 state
->setup_count
= CVAL(req
->inbuf
, smb_suwcnt
);
523 state
->total_param
= SVAL(req
->inbuf
, smb_tpscnt
);
525 state
->total_data
= SVAL(req
->inbuf
, smb_tdscnt
);
527 state
->max_param_return
= SVAL(req
->inbuf
, smb_mprcnt
);
528 state
->max_data_return
= SVAL(req
->inbuf
, smb_mdrcnt
);
529 state
->max_setup_return
= CVAL(req
->inbuf
, smb_msrcnt
);
530 state
->close_on_completion
= BITSETW(req
->inbuf
+smb_vwv5
,0);
531 state
->one_way
= BITSETW(req
->inbuf
+smb_vwv5
,1);
533 memset(state
->name
, '\0',sizeof(state
->name
));
534 srvstr_pull_buf(req
->inbuf
, req
->flags2
, state
->name
,
535 smb_buf(req
->inbuf
), sizeof(state
->name
),
538 if ((dscnt
> state
->total_data
) || (pscnt
> state
->total_param
))
541 if (state
->total_data
) {
542 /* Can't use talloc here, the core routines do realloc on the
543 * params and data. Out of paranoia, 100 bytes too many. */
544 state
->data
= (char *)SMB_MALLOC(state
->total_data
+100);
545 if (state
->data
== NULL
) {
546 DEBUG(0,("reply_trans: data malloc fail for %u "
547 "bytes !\n", (unsigned int)state
->total_data
));
549 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
550 END_PROFILE(SMBtrans
);
553 /* null-terminate the slack space */
554 memset(&state
->data
[state
->total_data
], 0, 100);
555 if ((dsoff
+dscnt
< dsoff
) || (dsoff
+dscnt
< dscnt
))
557 if ((smb_base(req
->inbuf
)+dsoff
+dscnt
558 > (char *)req
->inbuf
+ size
) ||
559 (smb_base(req
->inbuf
)+dsoff
+dscnt
< smb_base(req
->inbuf
)))
562 memcpy(state
->data
,smb_base(req
->inbuf
)+dsoff
,dscnt
);
565 if (state
->total_param
) {
566 /* Can't use talloc here, the core routines do realloc on the
567 * params and data. Out of paranoia, 100 bytes too many */
568 state
->param
= (char *)SMB_MALLOC(state
->total_param
+100);
569 if (state
->param
== NULL
) {
570 DEBUG(0,("reply_trans: param malloc fail for %u "
571 "bytes !\n", (unsigned int)state
->total_param
));
572 SAFE_FREE(state
->data
);
574 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
575 END_PROFILE(SMBtrans
);
578 /* null-terminate the slack space */
579 memset(&state
->param
[state
->total_param
], 0, 100);
580 if ((psoff
+pscnt
< psoff
) || (psoff
+pscnt
< pscnt
))
582 if ((smb_base(req
->inbuf
)+psoff
+pscnt
583 > (char *)req
->inbuf
+ size
) ||
584 (smb_base(req
->inbuf
)+psoff
+pscnt
< smb_base(req
->inbuf
)))
587 memcpy(state
->param
,smb_base(req
->inbuf
)+psoff
,pscnt
);
590 state
->received_data
= dscnt
;
591 state
->received_param
= pscnt
;
593 if (state
->setup_count
) {
595 if((state
->setup
= TALLOC_ARRAY(
596 state
, uint16
, state
->setup_count
)) == NULL
) {
597 DEBUG(0,("reply_trans: setup malloc fail for %u "
598 "bytes !\n", (unsigned int)
599 (state
->setup_count
* sizeof(uint16
))));
600 SAFE_FREE(state
->data
);
601 SAFE_FREE(state
->param
);
603 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
604 END_PROFILE(SMBtrans
);
607 if (req
->inbuf
+smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) >
610 if ((smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) < smb_vwv14
) ||
611 (smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) <
612 (state
->setup_count
*SIZEOFWORD
)))
615 for (i
=0;i
<state
->setup_count
;i
++)
616 state
->setup
[i
] = SVAL(req
->inbuf
,
617 smb_vwv14
+i
*SIZEOFWORD
);
620 state
->received_param
= pscnt
;
622 if ((state
->received_param
!= state
->total_param
) ||
623 (state
->received_data
!= state
->total_data
)) {
624 DLIST_ADD(conn
->pending_trans
, state
);
626 /* We need to send an interim response then receive the rest
627 of the parameter/data bytes */
628 reply_outbuf(req
, 0, 0);
629 show_msg((char *)req
->outbuf
);
630 END_PROFILE(SMBtrans
);
634 result
= handle_trans(conn
, req
, state
, &outsize
);
636 SAFE_FREE(state
->data
);
637 SAFE_FREE(state
->param
);
640 if (!NT_STATUS_IS_OK(result
)) {
641 reply_nterror(req
, result
);
642 END_PROFILE(SMBtrans
);
647 reply_nterror(req
, NT_STATUS_INTERNAL_ERROR
);
648 END_PROFILE(SMBtrans
);
652 END_PROFILE(SMBtrans
);
657 DEBUG(0,("reply_trans: invalid trans parameters\n"));
658 SAFE_FREE(state
->data
);
659 SAFE_FREE(state
->param
);
661 END_PROFILE(SMBtrans
);
662 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
666 /****************************************************************************
667 Reply to a secondary SMBtrans.
668 ****************************************************************************/
670 void reply_transs(connection_struct
*conn
, struct smb_request
*req
)
673 unsigned int pcnt
,poff
,dcnt
,doff
,pdisp
,ddisp
;
674 struct trans_state
*state
;
678 START_PROFILE(SMBtranss
);
680 show_msg((char *)req
->inbuf
);
683 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
684 END_PROFILE(SMBtranss
);
688 for (state
= conn
->pending_trans
; state
!= NULL
;
689 state
= state
->next
) {
690 if (state
->mid
== req
->mid
) {
695 if ((state
== NULL
) || (state
->cmd
!= SMBtrans
)) {
696 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
697 END_PROFILE(SMBtranss
);
701 /* Revise total_params and total_data in case they have changed
704 if (SVAL(req
->inbuf
, smb_vwv0
) < state
->total_param
)
705 state
->total_param
= SVAL(req
->inbuf
,smb_vwv0
);
706 if (SVAL(req
->inbuf
, smb_vwv1
) < state
->total_data
)
707 state
->total_data
= SVAL(req
->inbuf
,smb_vwv1
);
709 size
= smb_len(req
->inbuf
) + 4;
711 pcnt
= SVAL(req
->inbuf
, smb_spscnt
);
712 poff
= SVAL(req
->inbuf
, smb_spsoff
);
713 pdisp
= SVAL(req
->inbuf
, smb_spsdisp
);
715 dcnt
= SVAL(req
->inbuf
, smb_sdscnt
);
716 doff
= SVAL(req
->inbuf
, smb_sdsoff
);
717 ddisp
= SVAL(req
->inbuf
, smb_sdsdisp
);
719 state
->received_param
+= pcnt
;
720 state
->received_data
+= dcnt
;
722 if ((state
->received_data
> state
->total_data
) ||
723 (state
->received_param
> state
->total_param
))
727 if (pdisp
+pcnt
> state
->total_param
)
729 if ((pdisp
+pcnt
< pdisp
) || (pdisp
+pcnt
< pcnt
))
731 if (pdisp
> state
->total_param
)
733 if ((smb_base(req
->inbuf
) + poff
+ pcnt
734 > (char *)req
->inbuf
+ size
) ||
735 (smb_base(req
->inbuf
) + poff
+ pcnt
736 < smb_base(req
->inbuf
)))
738 if (state
->param
+ pdisp
< state
->param
)
741 memcpy(state
->param
+pdisp
,smb_base(req
->inbuf
)+poff
,
746 if (ddisp
+dcnt
> state
->total_data
)
748 if ((ddisp
+dcnt
< ddisp
) || (ddisp
+dcnt
< dcnt
))
750 if (ddisp
> state
->total_data
)
752 if ((smb_base(req
->inbuf
) + doff
+ dcnt
753 > (char *)req
->inbuf
+ size
) ||
754 (smb_base(req
->inbuf
) + doff
+ dcnt
755 < smb_base(req
->inbuf
)))
757 if (state
->data
+ ddisp
< state
->data
)
760 memcpy(state
->data
+ddisp
, smb_base(req
->inbuf
)+doff
,
764 if ((state
->received_param
< state
->total_param
) ||
765 (state
->received_data
< state
->total_data
)) {
766 END_PROFILE(SMBtranss
);
770 /* construct_reply_common has done us the favor to pre-fill the
771 * command field with SMBtranss which is wrong :-)
773 SCVAL(req
->outbuf
,smb_com
,SMBtrans
);
775 result
= handle_trans(conn
, req
, state
, &outsize
);
777 DLIST_REMOVE(conn
->pending_trans
, state
);
778 SAFE_FREE(state
->data
);
779 SAFE_FREE(state
->param
);
782 if ((outsize
== 0) || !NT_STATUS_IS_OK(result
)) {
783 reply_doserror(req
, ERRSRV
, ERRnosupport
);
784 END_PROFILE(SMBtranss
);
788 END_PROFILE(SMBtranss
);
793 DEBUG(0,("reply_transs: invalid trans parameters\n"));
794 DLIST_REMOVE(conn
->pending_trans
, state
);
795 SAFE_FREE(state
->data
);
796 SAFE_FREE(state
->param
);
798 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
799 END_PROFILE(SMBtranss
);