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 static void api_no_reply(connection_struct
*conn
, struct smb_request
*req
);
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
);
57 DEBUG(5,("copy_trans_params_and_data: params[%d..%d] data[%d..%d] (align %d)\n",
58 param_offset
, param_offset
+ param_len
,
59 data_offset
, data_offset
+ data_len
,
67 memcpy(copy_into
, &rparam
[param_offset
], param_len
);
69 copy_into
+= param_len
;
71 memset(copy_into
, '\0', align
);
77 memcpy(copy_into
, &rdata
[data_offset
], data_len
);
80 /****************************************************************************
82 ****************************************************************************/
84 void send_trans_reply(connection_struct
*conn
, const uint8_t *inbuf
,
85 char *rparam
, int rparam_len
,
86 char *rdata
, int rdata_len
,
87 bool buffer_too_large
)
89 int this_ldata
,this_lparam
;
90 int tot_data_sent
= 0;
91 int tot_param_sent
= 0;
95 int ldata
= rdata
? rdata_len
: 0;
96 int lparam
= rparam
? rparam_len
: 0;
99 DEBUG(5,("send_trans_reply: buffer %d too large\n", ldata
));
101 this_lparam
= MIN(lparam
,max_send
- 500); /* hack */
102 this_ldata
= MIN(ldata
,max_send
- (500+this_lparam
));
104 align
= ((this_lparam
)%4);
106 if (!create_outbuf(talloc_tos(), (char *)inbuf
, &outbuf
,
107 10, 1+align
+this_ldata
+this_lparam
)) {
108 smb_panic("could not allocate outbuf");
111 copy_trans_params_and_data(outbuf
, align
,
112 rparam
, tot_param_sent
, this_lparam
,
113 rdata
, tot_data_sent
, this_ldata
);
115 SSVAL(outbuf
,smb_vwv0
,lparam
);
116 SSVAL(outbuf
,smb_vwv1
,ldata
);
117 SSVAL(outbuf
,smb_vwv3
,this_lparam
);
118 SSVAL(outbuf
,smb_vwv4
,smb_offset(smb_buf(outbuf
)+1,outbuf
));
119 SSVAL(outbuf
,smb_vwv5
,0);
120 SSVAL(outbuf
,smb_vwv6
,this_ldata
);
121 SSVAL(outbuf
,smb_vwv7
,smb_offset(smb_buf(outbuf
)+1+this_lparam
+align
,
123 SSVAL(outbuf
,smb_vwv8
,0);
124 SSVAL(outbuf
,smb_vwv9
,0);
126 if (buffer_too_large
) {
127 error_packet_set((char *)outbuf
, ERRDOS
, ERRmoredata
,
128 STATUS_BUFFER_OVERFLOW
, __LINE__
, __FILE__
);
132 if (!srv_send_smb(smbd_server_fd(), (char *)outbuf
,
133 IS_CONN_ENCRYPTED(conn
))) {
134 exit_server_cleanly("send_trans_reply: srv_send_smb failed.");
139 tot_data_sent
= this_ldata
;
140 tot_param_sent
= this_lparam
;
142 while (tot_data_sent
< ldata
|| tot_param_sent
< lparam
)
144 this_lparam
= MIN(lparam
-tot_param_sent
,
145 max_send
- 500); /* hack */
146 this_ldata
= MIN(ldata
-tot_data_sent
,
147 max_send
- (500+this_lparam
));
155 align
= (this_lparam
%4);
157 if (!create_outbuf(talloc_tos(), (char *)inbuf
, &outbuf
,
158 10, 1+align
+this_ldata
+this_lparam
)) {
159 smb_panic("could not allocate outbuf");
162 copy_trans_params_and_data(outbuf
, align
,
163 rparam
, tot_param_sent
, this_lparam
,
164 rdata
, tot_data_sent
, this_ldata
);
166 SSVAL(outbuf
,smb_vwv3
,this_lparam
);
167 SSVAL(outbuf
,smb_vwv4
,smb_offset(smb_buf(outbuf
)+1,outbuf
));
168 SSVAL(outbuf
,smb_vwv5
,tot_param_sent
);
169 SSVAL(outbuf
,smb_vwv6
,this_ldata
);
170 SSVAL(outbuf
,smb_vwv7
,
171 smb_offset(smb_buf(outbuf
)+1+this_lparam
+align
, outbuf
));
172 SSVAL(outbuf
,smb_vwv8
,tot_data_sent
);
173 SSVAL(outbuf
,smb_vwv9
,0);
175 if (buffer_too_large
) {
176 error_packet_set(outbuf
, ERRDOS
, ERRmoredata
,
177 STATUS_BUFFER_OVERFLOW
,
182 if (!srv_send_smb(smbd_server_fd(), outbuf
,
183 IS_CONN_ENCRYPTED(conn
)))
184 exit_server_cleanly("send_trans_reply: srv_send_smb "
187 tot_data_sent
+= this_ldata
;
188 tot_param_sent
+= this_lparam
;
193 /****************************************************************************
194 Start the first part of an RPC reply which began with an SMBtrans request.
195 ****************************************************************************/
197 static void api_rpc_trans_reply(connection_struct
*conn
,
198 struct smb_request
*req
,
202 bool is_data_outstanding
;
203 uint8_t *rdata
= SMB_MALLOC_ARRAY(uint8_t, max_trans_reply
);
208 DEBUG(0,("api_rpc_trans_reply: malloc fail.\n"));
209 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
213 status
= np_read(fsp
, rdata
, max_trans_reply
, &data_len
,
214 &is_data_outstanding
);
215 if (!NT_STATUS_IS_OK(status
)) {
217 api_no_reply(conn
,req
);
221 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, (char *)rdata
, data_len
,
222 is_data_outstanding
);
227 /****************************************************************************
228 WaitNamedPipeHandleState
229 ****************************************************************************/
231 static void api_WNPHS(connection_struct
*conn
, struct smb_request
*req
,
232 struct files_struct
*fsp
, char *param
, int param_len
)
234 if (!param
|| param_len
< 2) {
235 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
239 DEBUG(4,("WaitNamedPipeHandleState priority %x\n",
240 (int)SVAL(param
,0)));
242 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0, False
);
246 /****************************************************************************
247 SetNamedPipeHandleState
248 ****************************************************************************/
250 static void api_SNPHS(connection_struct
*conn
, struct smb_request
*req
,
251 struct files_struct
*fsp
, char *param
, int param_len
)
253 if (!param
|| param_len
< 2) {
254 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
258 DEBUG(4,("SetNamedPipeHandleState to code %x\n", (int)SVAL(param
,0)));
260 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0, False
);
264 /****************************************************************************
265 When no reply is generated, indicate unsupported.
266 ****************************************************************************/
268 static void api_no_reply(connection_struct
*conn
, struct smb_request
*req
)
273 SSVAL(rparam
,0,NERR_notsupported
);
274 SSVAL(rparam
,2,0); /* converter word */
276 DEBUG(3,("Unsupported API fd command\n"));
278 /* now send the reply */
279 send_trans_reply(conn
, req
->inbuf
, rparam
, 4, NULL
, 0, False
);
284 /****************************************************************************
285 Handle remote api calls delivered to a named pipe already opened.
286 ****************************************************************************/
288 static void api_fd_reply(connection_struct
*conn
, uint16 vuid
,
289 struct smb_request
*req
,
290 uint16
*setup
, uint8_t *data
, char *params
,
291 int suwcnt
, int tdscnt
, int tpscnt
,
292 int mdrcnt
, int mprcnt
)
294 struct files_struct
*fsp
;
299 DEBUG(5,("api_fd_reply\n"));
301 /* First find out the name of this file. */
303 DEBUG(0,("Unexpected named pipe transaction.\n"));
304 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
308 /* Get the file handle and hence the file name. */
310 * NB. The setup array has already been transformed
311 * via SVAL and so is in host byte order.
313 pnum
= ((int)setup
[1]) & 0xFFFF;
314 subcommand
= ((int)setup
[0]) & 0xFFFF;
316 fsp
= file_fsp(req
, pnum
);
318 if (!fsp_is_np(fsp
)) {
319 if (subcommand
== TRANSACT_WAITNAMEDPIPEHANDLESTATE
) {
320 /* Win9x does this call with a unicode pipe name, not a pnum. */
321 /* Just return success for now... */
322 DEBUG(3,("Got TRANSACT_WAITNAMEDPIPEHANDLESTATE on text pipe name\n"));
323 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0,
328 DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum
));
329 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
333 if (vuid
!= fsp
->vuid
) {
334 DEBUG(1, ("Got pipe request (pnum %x) using invalid VUID %d, "
335 "expected %d\n", pnum
, vuid
, fsp
->vuid
));
336 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
340 DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n",
341 subcommand
, fsp
->fsp_name
, pnum
));
343 DEBUG(10, ("api_fd_reply: p:%p max_trans_reply: %d\n", fsp
, mdrcnt
));
345 switch (subcommand
) {
346 case TRANSACT_DCERPCCMD
: {
347 /* dce/rpc command */
349 status
= np_write(fsp
, data
, tdscnt
, &nwritten
);
350 if (!NT_STATUS_IS_OK(status
)) {
351 api_no_reply(conn
, req
);
354 api_rpc_trans_reply(conn
, req
, fsp
, mdrcnt
);
357 case TRANSACT_WAITNAMEDPIPEHANDLESTATE
:
358 /* Wait Named Pipe Handle state */
359 api_WNPHS(conn
, req
, fsp
, params
, tpscnt
);
361 case TRANSACT_SETNAMEDPIPEHANDLESTATE
:
362 /* Set Named Pipe Handle state */
363 api_SNPHS(conn
, req
, fsp
, params
, tpscnt
);
366 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
371 /****************************************************************************
372 Handle named pipe commands.
373 ****************************************************************************/
375 static void named_pipe(connection_struct
*conn
, uint16 vuid
,
376 struct smb_request
*req
,
377 const char *name
, uint16
*setup
,
378 char *data
, char *params
,
379 int suwcnt
, int tdscnt
,int tpscnt
,
380 int msrcnt
, int mdrcnt
, int mprcnt
)
382 DEBUG(3,("named pipe command on <%s> name\n", name
));
384 if (strequal(name
,"LANMAN")) {
385 api_reply(conn
, vuid
, req
,
392 if (strequal(name
,"WKSSVC") ||
393 strequal(name
,"SRVSVC") ||
394 strequal(name
,"WINREG") ||
395 strequal(name
,"SAMR") ||
396 strequal(name
,"LSARPC")) {
398 DEBUG(4,("named pipe command from Win95 (wow!)\n"));
400 api_fd_reply(conn
, vuid
, req
,
401 setup
, (uint8_t *)data
, params
,
402 suwcnt
, tdscnt
, tpscnt
,
407 if (strlen(name
) < 1) {
408 api_fd_reply(conn
, vuid
, req
,
409 setup
, (uint8_t *)data
,
410 params
, suwcnt
, tdscnt
,
411 tpscnt
, mdrcnt
, mprcnt
);
416 DEBUG(3,("unknown named pipe: setup 0x%X setup1=%d\n",
417 (int)setup
[0],(int)setup
[1]));
419 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
423 static void handle_trans(connection_struct
*conn
, struct smb_request
*req
,
424 struct trans_state
*state
)
426 char *local_machine_name
;
429 DEBUG(3,("trans <%s> data=%u params=%u setup=%u\n",
430 state
->name
,(unsigned int)state
->total_data
,(unsigned int)state
->total_param
,
431 (unsigned int)state
->setup_count
));
434 * WinCE wierdness....
437 local_machine_name
= talloc_asprintf(state
, "\\%s\\",
438 get_local_machine_name());
440 if (local_machine_name
== NULL
) {
441 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
445 if (strnequal(state
->name
, local_machine_name
,
446 strlen(local_machine_name
))) {
447 name_offset
= strlen(local_machine_name
)-1;
450 if (!strnequal(&state
->name
[name_offset
], "\\PIPE",
452 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
456 name_offset
+= strlen("\\PIPE");
458 /* Win9x weirdness. When talking to a unicode server Win9x
459 only sends \PIPE instead of \PIPE\ */
461 if (state
->name
[name_offset
] == '\\')
464 DEBUG(5,("calling named_pipe\n"));
465 named_pipe(conn
, state
->vuid
, req
,
466 state
->name
+name_offset
,
467 state
->setup
,state
->data
,
469 state
->setup_count
,state
->total_data
,
471 state
->max_setup_return
,
472 state
->max_data_return
,
473 state
->max_param_return
);
475 if (state
->close_on_completion
) {
476 close_cnum(conn
,state
->vuid
);
483 /****************************************************************************
485 ****************************************************************************/
487 void reply_trans(struct smb_request
*req
)
489 connection_struct
*conn
= req
->conn
;
494 struct trans_state
*state
;
497 unsigned int av_size
;
499 START_PROFILE(SMBtrans
);
502 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
503 END_PROFILE(SMBtrans
);
507 size
= smb_len(req
->inbuf
) + 4;
508 av_size
= smb_len(req
->inbuf
);
509 dsoff
= SVAL(req
->inbuf
, smb_dsoff
);
510 dscnt
= SVAL(req
->inbuf
, smb_dscnt
);
511 psoff
= SVAL(req
->inbuf
, smb_psoff
);
512 pscnt
= SVAL(req
->inbuf
, smb_pscnt
);
514 result
= allow_new_trans(conn
->pending_trans
, req
->mid
);
515 if (!NT_STATUS_IS_OK(result
)) {
516 DEBUG(2, ("Got invalid trans request: %s\n",
518 reply_nterror(req
, result
);
519 END_PROFILE(SMBtrans
);
523 if ((state
= TALLOC_P(conn
, struct trans_state
)) == NULL
) {
524 DEBUG(0, ("talloc failed\n"));
525 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
526 END_PROFILE(SMBtrans
);
530 state
->cmd
= SMBtrans
;
532 state
->mid
= req
->mid
;
533 state
->vuid
= req
->vuid
;
534 state
->setup_count
= CVAL(req
->inbuf
, smb_suwcnt
);
536 state
->total_param
= SVAL(req
->inbuf
, smb_tpscnt
);
538 state
->total_data
= SVAL(req
->inbuf
, smb_tdscnt
);
540 state
->max_param_return
= SVAL(req
->inbuf
, smb_mprcnt
);
541 state
->max_data_return
= SVAL(req
->inbuf
, smb_mdrcnt
);
542 state
->max_setup_return
= CVAL(req
->inbuf
, smb_msrcnt
);
543 state
->close_on_completion
= BITSETW(req
->inbuf
+smb_vwv5
,0);
544 state
->one_way
= BITSETW(req
->inbuf
+smb_vwv5
,1);
546 srvstr_pull_buf_talloc(state
, req
->inbuf
, req
->flags2
, &state
->name
,
547 req
->buf
, STR_TERMINATE
);
549 if ((dscnt
> state
->total_data
) || (pscnt
> state
->total_param
) ||
553 if (state
->total_data
) {
554 /* Can't use talloc here, the core routines do realloc on the
555 * params and data. Out of paranoia, 100 bytes too many. */
556 state
->data
= (char *)SMB_MALLOC(state
->total_data
+100);
557 if (state
->data
== NULL
) {
558 DEBUG(0,("reply_trans: data malloc fail for %u "
559 "bytes !\n", (unsigned int)state
->total_data
));
561 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
562 END_PROFILE(SMBtrans
);
565 /* null-terminate the slack space */
566 memset(&state
->data
[state
->total_data
], 0, 100);
568 if (dscnt
> state
->total_data
||
569 dsoff
+dscnt
< dsoff
) {
573 if (dsoff
> av_size
||
575 dsoff
+dscnt
> av_size
) {
579 memcpy(state
->data
,smb_base(req
->inbuf
)+dsoff
,dscnt
);
582 if (state
->total_param
) {
583 /* Can't use talloc here, the core routines do realloc on the
584 * params and data. Out of paranoia, 100 bytes too many */
585 state
->param
= (char *)SMB_MALLOC(state
->total_param
+100);
586 if (state
->param
== NULL
) {
587 DEBUG(0,("reply_trans: param malloc fail for %u "
588 "bytes !\n", (unsigned int)state
->total_param
));
589 SAFE_FREE(state
->data
);
591 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
592 END_PROFILE(SMBtrans
);
595 /* null-terminate the slack space */
596 memset(&state
->param
[state
->total_param
], 0, 100);
598 if (pscnt
> state
->total_param
||
599 psoff
+pscnt
< psoff
) {
603 if (psoff
> av_size
||
605 psoff
+pscnt
> av_size
) {
609 memcpy(state
->param
,smb_base(req
->inbuf
)+psoff
,pscnt
);
612 state
->received_data
= dscnt
;
613 state
->received_param
= pscnt
;
615 if (state
->setup_count
) {
617 if((state
->setup
= TALLOC_ARRAY(
618 state
, uint16
, state
->setup_count
)) == NULL
) {
619 DEBUG(0,("reply_trans: setup malloc fail for %u "
620 "bytes !\n", (unsigned int)
621 (state
->setup_count
* sizeof(uint16
))));
622 SAFE_FREE(state
->data
);
623 SAFE_FREE(state
->param
);
625 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
626 END_PROFILE(SMBtrans
);
629 if (req
->inbuf
+smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) >
632 if ((smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) < smb_vwv14
) ||
633 (smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) <
634 (state
->setup_count
*SIZEOFWORD
)))
637 for (i
=0;i
<state
->setup_count
;i
++)
638 state
->setup
[i
] = SVAL(req
->inbuf
,
639 smb_vwv14
+i
*SIZEOFWORD
);
642 state
->received_param
= pscnt
;
644 if ((state
->received_param
!= state
->total_param
) ||
645 (state
->received_data
!= state
->total_data
)) {
646 DLIST_ADD(conn
->pending_trans
, state
);
648 /* We need to send an interim response then receive the rest
649 of the parameter/data bytes */
650 reply_outbuf(req
, 0, 0);
651 show_msg((char *)req
->outbuf
);
652 END_PROFILE(SMBtrans
);
656 handle_trans(conn
, req
, state
);
658 SAFE_FREE(state
->data
);
659 SAFE_FREE(state
->param
);
662 END_PROFILE(SMBtrans
);
667 DEBUG(0,("reply_trans: invalid trans parameters\n"));
668 SAFE_FREE(state
->data
);
669 SAFE_FREE(state
->param
);
671 END_PROFILE(SMBtrans
);
672 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
676 /****************************************************************************
677 Reply to a secondary SMBtrans.
678 ****************************************************************************/
680 void reply_transs(struct smb_request
*req
)
682 connection_struct
*conn
= req
->conn
;
683 unsigned int pcnt
,poff
,dcnt
,doff
,pdisp
,ddisp
;
684 struct trans_state
*state
;
685 unsigned int av_size
;
687 START_PROFILE(SMBtranss
);
689 show_msg((char *)req
->inbuf
);
692 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
693 END_PROFILE(SMBtranss
);
697 for (state
= conn
->pending_trans
; state
!= NULL
;
698 state
= state
->next
) {
699 if (state
->mid
== req
->mid
) {
704 if ((state
== NULL
) || (state
->cmd
!= SMBtrans
)) {
705 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
706 END_PROFILE(SMBtranss
);
710 /* Revise total_params and total_data in case they have changed
713 if (SVAL(req
->inbuf
, smb_vwv0
) < state
->total_param
)
714 state
->total_param
= SVAL(req
->inbuf
,smb_vwv0
);
715 if (SVAL(req
->inbuf
, smb_vwv1
) < state
->total_data
)
716 state
->total_data
= SVAL(req
->inbuf
,smb_vwv1
);
718 av_size
= smb_len(req
->inbuf
);
720 pcnt
= SVAL(req
->inbuf
, smb_spscnt
);
721 poff
= SVAL(req
->inbuf
, smb_spsoff
);
722 pdisp
= SVAL(req
->inbuf
, smb_spsdisp
);
724 dcnt
= SVAL(req
->inbuf
, smb_sdscnt
);
725 doff
= SVAL(req
->inbuf
, smb_sdsoff
);
726 ddisp
= SVAL(req
->inbuf
, smb_sdsdisp
);
728 state
->received_param
+= pcnt
;
729 state
->received_data
+= dcnt
;
731 if ((state
->received_data
> state
->total_data
) ||
732 (state
->received_param
> state
->total_param
))
736 if (pdisp
> state
->total_param
||
737 pcnt
> state
->total_param
||
738 pdisp
+pcnt
> state
->total_param
||
739 pdisp
+pcnt
< pdisp
) {
743 if (poff
> av_size
||
745 poff
+pcnt
> av_size
||
750 memcpy(state
->param
+pdisp
,smb_base(req
->inbuf
)+poff
,
755 if (ddisp
> state
->total_data
||
756 dcnt
> state
->total_data
||
757 ddisp
+dcnt
> state
->total_data
||
758 ddisp
+dcnt
< ddisp
) {
762 if (ddisp
> av_size
||
764 ddisp
+dcnt
> av_size
||
765 ddisp
+dcnt
< ddisp
) {
769 memcpy(state
->data
+ddisp
, smb_base(req
->inbuf
)+doff
,
773 if ((state
->received_param
< state
->total_param
) ||
774 (state
->received_data
< state
->total_data
)) {
775 END_PROFILE(SMBtranss
);
780 * construct_reply_common will copy smb_com from inbuf to
781 * outbuf. SMBtranss is wrong here.
783 SCVAL(req
->inbuf
,smb_com
,SMBtrans
);
785 handle_trans(conn
, req
, state
);
787 DLIST_REMOVE(conn
->pending_trans
, state
);
788 SAFE_FREE(state
->data
);
789 SAFE_FREE(state
->param
);
792 END_PROFILE(SMBtranss
);
797 DEBUG(0,("reply_transs: invalid trans parameters\n"));
798 DLIST_REMOVE(conn
->pending_trans
, state
);
799 SAFE_FREE(state
->data
);
800 SAFE_FREE(state
->param
);
802 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
803 END_PROFILE(SMBtranss
);