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
, struct smb_request
*req
, smb_np_struct
*p
)
199 bool is_data_outstanding
;
200 char *rdata
= (char *)SMB_MALLOC(p
->max_trans_reply
);
204 DEBUG(0,("api_rpc_trans_reply: malloc fail.\n"));
205 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
209 if((data_len
= read_from_pipe( p
, rdata
, p
->max_trans_reply
,
210 &is_data_outstanding
)) < 0) {
212 api_no_reply(conn
,req
);
216 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, rdata
, data_len
,
217 is_data_outstanding
);
222 /****************************************************************************
223 WaitNamedPipeHandleState
224 ****************************************************************************/
226 static void api_WNPHS(connection_struct
*conn
, struct smb_request
*req
, smb_np_struct
*p
,
227 char *param
, int param_len
)
231 if (!param
|| param_len
< 2) {
232 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
236 priority
= SVAL(param
,0);
237 DEBUG(4,("WaitNamedPipeHandleState priority %x\n", priority
));
239 if (wait_rpc_pipe_hnd_state(p
, priority
)) {
240 /* now send the reply */
241 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0, False
);
244 api_no_reply(conn
,req
);
248 /****************************************************************************
249 SetNamedPipeHandleState
250 ****************************************************************************/
252 static void api_SNPHS(connection_struct
*conn
, struct smb_request
*req
, smb_np_struct
*p
,
253 char *param
, int param_len
)
257 if (!param
|| param_len
< 2) {
258 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
263 DEBUG(4,("SetNamedPipeHandleState to code %x\n", id
));
265 if (set_rpc_pipe_hnd_state(p
, id
)) {
266 /* now send the reply */
267 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0, False
);
270 api_no_reply(conn
,req
);
274 /****************************************************************************
275 When no reply is generated, indicate unsupported.
276 ****************************************************************************/
278 static void api_no_reply(connection_struct
*conn
, struct smb_request
*req
)
283 SSVAL(rparam
,0,NERR_notsupported
);
284 SSVAL(rparam
,2,0); /* converter word */
286 DEBUG(3,("Unsupported API fd command\n"));
288 /* now send the reply */
289 send_trans_reply(conn
, req
->inbuf
, rparam
, 4, NULL
, 0, False
);
294 /****************************************************************************
295 Handle remote api calls delivered to a named pipe already opened.
296 ****************************************************************************/
298 static void api_fd_reply(connection_struct
*conn
, uint16 vuid
,
299 struct smb_request
*req
,
300 uint16
*setup
, char *data
, char *params
,
301 int suwcnt
, int tdscnt
, int tpscnt
,
302 int mdrcnt
, int mprcnt
)
305 smb_np_struct
*p
= NULL
;
309 DEBUG(5,("api_fd_reply\n"));
311 /* First find out the name of this file. */
313 DEBUG(0,("Unexpected named pipe transaction.\n"));
314 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
318 /* Get the file handle and hence the file name. */
320 * NB. The setup array has already been transformed
321 * via SVAL and so is in gost byte order.
323 pnum
= ((int)setup
[1]) & 0xFFFF;
324 subcommand
= ((int)setup
[0]) & 0xFFFF;
326 if(!(p
= get_rpc_pipe(pnum
))) {
327 if (subcommand
== TRANSACT_WAITNAMEDPIPEHANDLESTATE
) {
328 /* Win9x does this call with a unicode pipe name, not a pnum. */
329 /* Just return success for now... */
330 DEBUG(3,("Got TRANSACT_WAITNAMEDPIPEHANDLESTATE on text pipe name\n"));
331 send_trans_reply(conn
, req
->inbuf
, NULL
, 0, NULL
, 0,
336 DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum
));
337 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
341 if (vuid
!= p
->vuid
) {
342 DEBUG(1, ("Got pipe request (pnum %x) using invalid VUID %d, "
343 "expected %d\n", pnum
, vuid
, p
->vuid
));
344 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
348 DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n", subcommand
, p
->name
, pnum
));
350 /* record maximum data length that can be transmitted in an SMBtrans */
351 p
->max_trans_reply
= mdrcnt
;
353 DEBUG(10,("api_fd_reply: p:%p max_trans_reply: %d\n", p
, p
->max_trans_reply
));
355 switch (subcommand
) {
356 case TRANSACT_DCERPCCMD
:
357 /* dce/rpc command */
358 reply
= write_to_pipe(p
, data
, tdscnt
);
360 api_no_reply(conn
, req
);
363 api_rpc_trans_reply(conn
, req
, p
);
365 case TRANSACT_WAITNAMEDPIPEHANDLESTATE
:
366 /* Wait Named Pipe Handle state */
367 api_WNPHS(conn
, req
, p
, params
, tpscnt
);
369 case TRANSACT_SETNAMEDPIPEHANDLESTATE
:
370 /* Set Named Pipe Handle state */
371 api_SNPHS(conn
, req
, p
, params
, tpscnt
);
374 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
379 /****************************************************************************
380 Handle named pipe commands.
381 ****************************************************************************/
383 static void named_pipe(connection_struct
*conn
, uint16 vuid
,
384 struct smb_request
*req
,
385 const char *name
, uint16
*setup
,
386 char *data
, char *params
,
387 int suwcnt
, int tdscnt
,int tpscnt
,
388 int msrcnt
, int mdrcnt
, int mprcnt
)
390 DEBUG(3,("named pipe command on <%s> name\n", name
));
392 if (strequal(name
,"LANMAN")) {
393 api_reply(conn
, vuid
, req
,
400 if (strequal(name
,"WKSSVC") ||
401 strequal(name
,"SRVSVC") ||
402 strequal(name
,"WINREG") ||
403 strequal(name
,"SAMR") ||
404 strequal(name
,"LSARPC")) {
406 DEBUG(4,("named pipe command from Win95 (wow!)\n"));
408 api_fd_reply(conn
, vuid
, req
,
410 suwcnt
, tdscnt
, tpscnt
,
415 if (strlen(name
) < 1) {
416 api_fd_reply(conn
, vuid
, req
,
418 params
, suwcnt
, tdscnt
,
419 tpscnt
, mdrcnt
, mprcnt
);
424 DEBUG(3,("unknown named pipe: setup 0x%X setup1=%d\n",
425 (int)setup
[0],(int)setup
[1]));
427 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
431 static void handle_trans(connection_struct
*conn
, struct smb_request
*req
,
432 struct trans_state
*state
)
434 char *local_machine_name
;
437 DEBUG(3,("trans <%s> data=%u params=%u setup=%u\n",
438 state
->name
,(unsigned int)state
->total_data
,(unsigned int)state
->total_param
,
439 (unsigned int)state
->setup_count
));
442 * WinCE wierdness....
445 local_machine_name
= talloc_asprintf(state
, "\\%s\\",
446 get_local_machine_name());
448 if (local_machine_name
== NULL
) {
449 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
453 if (strnequal(state
->name
, local_machine_name
,
454 strlen(local_machine_name
))) {
455 name_offset
= strlen(local_machine_name
)-1;
458 if (!strnequal(&state
->name
[name_offset
], "\\PIPE",
460 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
464 name_offset
+= strlen("\\PIPE");
466 /* Win9x weirdness. When talking to a unicode server Win9x
467 only sends \PIPE instead of \PIPE\ */
469 if (state
->name
[name_offset
] == '\\')
472 DEBUG(5,("calling named_pipe\n"));
473 named_pipe(conn
, state
->vuid
, req
,
474 state
->name
+name_offset
,
475 state
->setup
,state
->data
,
477 state
->setup_count
,state
->total_data
,
479 state
->max_setup_return
,
480 state
->max_data_return
,
481 state
->max_param_return
);
483 if (state
->close_on_completion
) {
484 close_cnum(conn
,state
->vuid
);
491 /****************************************************************************
493 ****************************************************************************/
495 void reply_trans(struct smb_request
*req
)
497 connection_struct
*conn
= req
->conn
;
502 struct trans_state
*state
;
505 unsigned int av_size
;
507 START_PROFILE(SMBtrans
);
510 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
511 END_PROFILE(SMBtrans
);
515 size
= smb_len(req
->inbuf
) + 4;
516 av_size
= smb_len(req
->inbuf
);
517 dsoff
= SVAL(req
->inbuf
, smb_dsoff
);
518 dscnt
= SVAL(req
->inbuf
, smb_dscnt
);
519 psoff
= SVAL(req
->inbuf
, smb_psoff
);
520 pscnt
= SVAL(req
->inbuf
, smb_pscnt
);
522 result
= allow_new_trans(conn
->pending_trans
, req
->mid
);
523 if (!NT_STATUS_IS_OK(result
)) {
524 DEBUG(2, ("Got invalid trans request: %s\n",
526 reply_nterror(req
, result
);
527 END_PROFILE(SMBtrans
);
531 if ((state
= TALLOC_P(conn
, struct trans_state
)) == NULL
) {
532 DEBUG(0, ("talloc failed\n"));
533 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
534 END_PROFILE(SMBtrans
);
538 state
->cmd
= SMBtrans
;
540 state
->mid
= req
->mid
;
541 state
->vuid
= req
->vuid
;
542 state
->setup_count
= CVAL(req
->inbuf
, smb_suwcnt
);
544 state
->total_param
= SVAL(req
->inbuf
, smb_tpscnt
);
546 state
->total_data
= SVAL(req
->inbuf
, smb_tdscnt
);
548 state
->max_param_return
= SVAL(req
->inbuf
, smb_mprcnt
);
549 state
->max_data_return
= SVAL(req
->inbuf
, smb_mdrcnt
);
550 state
->max_setup_return
= CVAL(req
->inbuf
, smb_msrcnt
);
551 state
->close_on_completion
= BITSETW(req
->inbuf
+smb_vwv5
,0);
552 state
->one_way
= BITSETW(req
->inbuf
+smb_vwv5
,1);
554 srvstr_pull_buf_talloc(state
, req
->inbuf
, req
->flags2
, &state
->name
,
555 smb_buf(req
->inbuf
), STR_TERMINATE
);
557 if ((dscnt
> state
->total_data
) || (pscnt
> state
->total_param
) ||
561 if (state
->total_data
) {
562 /* Can't use talloc here, the core routines do realloc on the
563 * params and data. Out of paranoia, 100 bytes too many. */
564 state
->data
= (char *)SMB_MALLOC(state
->total_data
+100);
565 if (state
->data
== NULL
) {
566 DEBUG(0,("reply_trans: data malloc fail for %u "
567 "bytes !\n", (unsigned int)state
->total_data
));
569 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
570 END_PROFILE(SMBtrans
);
573 /* null-terminate the slack space */
574 memset(&state
->data
[state
->total_data
], 0, 100);
576 if (dscnt
> state
->total_data
||
577 dsoff
+dscnt
< dsoff
) {
581 if (dsoff
> av_size
||
583 dsoff
+dscnt
> av_size
) {
587 memcpy(state
->data
,smb_base(req
->inbuf
)+dsoff
,dscnt
);
590 if (state
->total_param
) {
591 /* Can't use talloc here, the core routines do realloc on the
592 * params and data. Out of paranoia, 100 bytes too many */
593 state
->param
= (char *)SMB_MALLOC(state
->total_param
+100);
594 if (state
->param
== NULL
) {
595 DEBUG(0,("reply_trans: param malloc fail for %u "
596 "bytes !\n", (unsigned int)state
->total_param
));
597 SAFE_FREE(state
->data
);
599 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
600 END_PROFILE(SMBtrans
);
603 /* null-terminate the slack space */
604 memset(&state
->param
[state
->total_param
], 0, 100);
606 if (pscnt
> state
->total_param
||
607 psoff
+pscnt
< psoff
) {
611 if (psoff
> av_size
||
613 psoff
+pscnt
> av_size
) {
617 memcpy(state
->param
,smb_base(req
->inbuf
)+psoff
,pscnt
);
620 state
->received_data
= dscnt
;
621 state
->received_param
= pscnt
;
623 if (state
->setup_count
) {
625 if((state
->setup
= TALLOC_ARRAY(
626 state
, uint16
, state
->setup_count
)) == NULL
) {
627 DEBUG(0,("reply_trans: setup malloc fail for %u "
628 "bytes !\n", (unsigned int)
629 (state
->setup_count
* sizeof(uint16
))));
630 SAFE_FREE(state
->data
);
631 SAFE_FREE(state
->param
);
633 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
634 END_PROFILE(SMBtrans
);
637 if (req
->inbuf
+smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) >
640 if ((smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) < smb_vwv14
) ||
641 (smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) <
642 (state
->setup_count
*SIZEOFWORD
)))
645 for (i
=0;i
<state
->setup_count
;i
++)
646 state
->setup
[i
] = SVAL(req
->inbuf
,
647 smb_vwv14
+i
*SIZEOFWORD
);
650 state
->received_param
= pscnt
;
652 if ((state
->received_param
!= state
->total_param
) ||
653 (state
->received_data
!= state
->total_data
)) {
654 DLIST_ADD(conn
->pending_trans
, state
);
656 /* We need to send an interim response then receive the rest
657 of the parameter/data bytes */
658 reply_outbuf(req
, 0, 0);
659 show_msg((char *)req
->outbuf
);
660 END_PROFILE(SMBtrans
);
664 handle_trans(conn
, req
, state
);
666 SAFE_FREE(state
->data
);
667 SAFE_FREE(state
->param
);
670 END_PROFILE(SMBtrans
);
675 DEBUG(0,("reply_trans: invalid trans parameters\n"));
676 SAFE_FREE(state
->data
);
677 SAFE_FREE(state
->param
);
679 END_PROFILE(SMBtrans
);
680 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
684 /****************************************************************************
685 Reply to a secondary SMBtrans.
686 ****************************************************************************/
688 void reply_transs(struct smb_request
*req
)
690 connection_struct
*conn
= req
->conn
;
691 unsigned int pcnt
,poff
,dcnt
,doff
,pdisp
,ddisp
;
692 struct trans_state
*state
;
693 unsigned int av_size
;
695 START_PROFILE(SMBtranss
);
697 show_msg((char *)req
->inbuf
);
700 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
701 END_PROFILE(SMBtranss
);
705 for (state
= conn
->pending_trans
; state
!= NULL
;
706 state
= state
->next
) {
707 if (state
->mid
== req
->mid
) {
712 if ((state
== NULL
) || (state
->cmd
!= SMBtrans
)) {
713 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
714 END_PROFILE(SMBtranss
);
718 /* Revise total_params and total_data in case they have changed
721 if (SVAL(req
->inbuf
, smb_vwv0
) < state
->total_param
)
722 state
->total_param
= SVAL(req
->inbuf
,smb_vwv0
);
723 if (SVAL(req
->inbuf
, smb_vwv1
) < state
->total_data
)
724 state
->total_data
= SVAL(req
->inbuf
,smb_vwv1
);
726 av_size
= smb_len(req
->inbuf
);
728 pcnt
= SVAL(req
->inbuf
, smb_spscnt
);
729 poff
= SVAL(req
->inbuf
, smb_spsoff
);
730 pdisp
= SVAL(req
->inbuf
, smb_spsdisp
);
732 dcnt
= SVAL(req
->inbuf
, smb_sdscnt
);
733 doff
= SVAL(req
->inbuf
, smb_sdsoff
);
734 ddisp
= SVAL(req
->inbuf
, smb_sdsdisp
);
736 state
->received_param
+= pcnt
;
737 state
->received_data
+= dcnt
;
739 if ((state
->received_data
> state
->total_data
) ||
740 (state
->received_param
> state
->total_param
))
744 if (pdisp
> state
->total_param
||
745 pcnt
> state
->total_param
||
746 pdisp
+pcnt
> state
->total_param
||
747 pdisp
+pcnt
< pdisp
) {
751 if (poff
> av_size
||
753 poff
+pcnt
> av_size
||
758 memcpy(state
->param
+pdisp
,smb_base(req
->inbuf
)+poff
,
763 if (ddisp
> state
->total_data
||
764 dcnt
> state
->total_data
||
765 ddisp
+dcnt
> state
->total_data
||
766 ddisp
+dcnt
< ddisp
) {
770 if (ddisp
> av_size
||
772 ddisp
+dcnt
> av_size
||
773 ddisp
+dcnt
< ddisp
) {
777 memcpy(state
->data
+ddisp
, smb_base(req
->inbuf
)+doff
,
781 if ((state
->received_param
< state
->total_param
) ||
782 (state
->received_data
< state
->total_data
)) {
783 END_PROFILE(SMBtranss
);
788 * construct_reply_common will copy smb_com from inbuf to
789 * outbuf. SMBtranss is wrong here.
791 SCVAL(req
->inbuf
,smb_com
,SMBtrans
);
793 handle_trans(conn
, req
, state
);
795 DLIST_REMOVE(conn
->pending_trans
, state
);
796 SAFE_FREE(state
->data
);
797 SAFE_FREE(state
->param
);
800 END_PROFILE(SMBtranss
);
805 DEBUG(0,("reply_transs: invalid trans parameters\n"));
806 DLIST_REMOVE(conn
->pending_trans
, state
);
807 SAFE_FREE(state
->data
);
808 SAFE_FREE(state
->param
);
810 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
811 END_PROFILE(SMBtranss
);