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
,
85 struct smb_request
*req
,
86 char *rparam
, int rparam_len
,
87 char *rdata
, int rdata_len
,
88 bool buffer_too_large
)
90 int this_ldata
,this_lparam
;
91 int tot_data_sent
= 0;
92 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 reply_outbuf(req
, 10, 1+align
+this_ldata
+this_lparam
);
109 * We might have SMBtranss in req which was transferred to the outbuf,
112 SCVAL(req
->outbuf
, smb_com
, SMBtrans
);
114 copy_trans_params_and_data((char *)req
->outbuf
, align
,
115 rparam
, tot_param_sent
, this_lparam
,
116 rdata
, tot_data_sent
, this_ldata
);
118 SSVAL(req
->outbuf
,smb_vwv0
,lparam
);
119 SSVAL(req
->outbuf
,smb_vwv1
,ldata
);
120 SSVAL(req
->outbuf
,smb_vwv3
,this_lparam
);
121 SSVAL(req
->outbuf
,smb_vwv4
,
122 smb_offset(smb_buf(req
->outbuf
)+1, req
->outbuf
));
123 SSVAL(req
->outbuf
,smb_vwv5
,0);
124 SSVAL(req
->outbuf
,smb_vwv6
,this_ldata
);
125 SSVAL(req
->outbuf
,smb_vwv7
,
126 smb_offset(smb_buf(req
->outbuf
)+1+this_lparam
+align
,
128 SSVAL(req
->outbuf
,smb_vwv8
,0);
129 SSVAL(req
->outbuf
,smb_vwv9
,0);
131 if (buffer_too_large
) {
132 error_packet_set((char *)req
->outbuf
, ERRDOS
, ERRmoredata
,
133 STATUS_BUFFER_OVERFLOW
, __LINE__
, __FILE__
);
136 show_msg((char *)req
->outbuf
);
137 if (!srv_send_smb(smbd_server_fd(), (char *)req
->outbuf
,
138 IS_CONN_ENCRYPTED(conn
))) {
139 exit_server_cleanly("send_trans_reply: srv_send_smb failed.");
142 TALLOC_FREE(req
->outbuf
);
144 tot_data_sent
= this_ldata
;
145 tot_param_sent
= this_lparam
;
147 while (tot_data_sent
< ldata
|| tot_param_sent
< lparam
)
149 this_lparam
= MIN(lparam
-tot_param_sent
,
150 max_send
- 500); /* hack */
151 this_ldata
= MIN(ldata
-tot_data_sent
,
152 max_send
- (500+this_lparam
));
160 align
= (this_lparam
%4);
162 reply_outbuf(req
, 10, 1+align
+this_ldata
+this_lparam
);
165 * We might have SMBtranss in req which was transferred to the
168 SCVAL(req
->outbuf
, smb_com
, SMBtrans
);
170 copy_trans_params_and_data((char *)req
->outbuf
, align
,
171 rparam
, tot_param_sent
, this_lparam
,
172 rdata
, tot_data_sent
, this_ldata
);
174 SSVAL(req
->outbuf
,smb_vwv3
,this_lparam
);
175 SSVAL(req
->outbuf
,smb_vwv4
,
176 smb_offset(smb_buf(req
->outbuf
)+1,req
->outbuf
));
177 SSVAL(req
->outbuf
,smb_vwv5
,tot_param_sent
);
178 SSVAL(req
->outbuf
,smb_vwv6
,this_ldata
);
179 SSVAL(req
->outbuf
,smb_vwv7
,
180 smb_offset(smb_buf(req
->outbuf
)+1+this_lparam
+align
,
182 SSVAL(req
->outbuf
,smb_vwv8
,tot_data_sent
);
183 SSVAL(req
->outbuf
,smb_vwv9
,0);
185 if (buffer_too_large
) {
186 error_packet_set((char *)req
->outbuf
,
188 STATUS_BUFFER_OVERFLOW
,
192 show_msg((char *)req
->outbuf
);
193 if (!srv_send_smb(smbd_server_fd(), (char *)req
->outbuf
,
194 IS_CONN_ENCRYPTED(conn
)))
195 exit_server_cleanly("send_trans_reply: srv_send_smb "
198 tot_data_sent
+= this_ldata
;
199 tot_param_sent
+= this_lparam
;
200 TALLOC_FREE(req
->outbuf
);
204 /****************************************************************************
205 Start the first part of an RPC reply which began with an SMBtrans request.
206 ****************************************************************************/
208 static void api_rpc_trans_reply(connection_struct
*conn
,
209 struct smb_request
*req
,
213 bool is_data_outstanding
;
214 uint8_t *rdata
= SMB_MALLOC_ARRAY(uint8_t, max_trans_reply
);
219 DEBUG(0,("api_rpc_trans_reply: malloc fail.\n"));
220 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
224 status
= np_read(fsp
, rdata
, max_trans_reply
, &data_len
,
225 &is_data_outstanding
);
226 if (!NT_STATUS_IS_OK(status
)) {
228 api_no_reply(conn
,req
);
232 send_trans_reply(conn
, req
, NULL
, 0, (char *)rdata
, data_len
,
233 is_data_outstanding
);
238 /****************************************************************************
239 WaitNamedPipeHandleState
240 ****************************************************************************/
242 static void api_WNPHS(connection_struct
*conn
, struct smb_request
*req
,
243 struct files_struct
*fsp
, char *param
, int param_len
)
245 if (!param
|| param_len
< 2) {
246 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
250 DEBUG(4,("WaitNamedPipeHandleState priority %x\n",
251 (int)SVAL(param
,0)));
253 send_trans_reply(conn
, req
, NULL
, 0, NULL
, 0, False
);
257 /****************************************************************************
258 SetNamedPipeHandleState
259 ****************************************************************************/
261 static void api_SNPHS(connection_struct
*conn
, struct smb_request
*req
,
262 struct files_struct
*fsp
, char *param
, int param_len
)
264 if (!param
|| param_len
< 2) {
265 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
269 DEBUG(4,("SetNamedPipeHandleState to code %x\n", (int)SVAL(param
,0)));
271 send_trans_reply(conn
, req
, NULL
, 0, NULL
, 0, False
);
275 /****************************************************************************
276 When no reply is generated, indicate unsupported.
277 ****************************************************************************/
279 static void api_no_reply(connection_struct
*conn
, struct smb_request
*req
)
284 SSVAL(rparam
,0,NERR_notsupported
);
285 SSVAL(rparam
,2,0); /* converter word */
287 DEBUG(3,("Unsupported API fd command\n"));
289 /* now send the reply */
290 send_trans_reply(conn
, req
, rparam
, 4, NULL
, 0, False
);
295 /****************************************************************************
296 Handle remote api calls delivered to a named pipe already opened.
297 ****************************************************************************/
299 static void api_fd_reply(connection_struct
*conn
, uint16 vuid
,
300 struct smb_request
*req
,
301 uint16
*setup
, uint8_t *data
, char *params
,
302 int suwcnt
, int tdscnt
, int tpscnt
,
303 int mdrcnt
, int mprcnt
)
305 struct files_struct
*fsp
;
310 DEBUG(5,("api_fd_reply\n"));
312 /* First find out the name of this file. */
314 DEBUG(0,("Unexpected named pipe transaction.\n"));
315 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
319 /* Get the file handle and hence the file name. */
321 * NB. The setup array has already been transformed
322 * via SVAL and so is in host byte order.
324 pnum
= ((int)setup
[1]) & 0xFFFF;
325 subcommand
= ((int)setup
[0]) & 0xFFFF;
327 fsp
= file_fsp(req
, pnum
);
329 if (!fsp_is_np(fsp
)) {
330 if (subcommand
== TRANSACT_WAITNAMEDPIPEHANDLESTATE
) {
331 /* Win9x does this call with a unicode pipe name, not a pnum. */
332 /* Just return success for now... */
333 DEBUG(3,("Got TRANSACT_WAITNAMEDPIPEHANDLESTATE on text pipe name\n"));
334 send_trans_reply(conn
, req
, NULL
, 0, NULL
, 0, False
);
338 DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum
));
339 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
343 if (vuid
!= fsp
->vuid
) {
344 DEBUG(1, ("Got pipe request (pnum %x) using invalid VUID %d, "
345 "expected %d\n", pnum
, vuid
, fsp
->vuid
));
346 reply_nterror(req
, NT_STATUS_INVALID_HANDLE
);
350 DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n",
351 subcommand
, fsp
->fsp_name
, pnum
));
353 DEBUG(10, ("api_fd_reply: p:%p max_trans_reply: %d\n", fsp
, mdrcnt
));
355 switch (subcommand
) {
356 case TRANSACT_DCERPCCMD
: {
357 /* dce/rpc command */
359 status
= np_write(fsp
, data
, tdscnt
, &nwritten
);
360 if (!NT_STATUS_IS_OK(status
)) {
361 api_no_reply(conn
, req
);
364 api_rpc_trans_reply(conn
, req
, fsp
, mdrcnt
);
367 case TRANSACT_WAITNAMEDPIPEHANDLESTATE
:
368 /* Wait Named Pipe Handle state */
369 api_WNPHS(conn
, req
, fsp
, params
, tpscnt
);
371 case TRANSACT_SETNAMEDPIPEHANDLESTATE
:
372 /* Set Named Pipe Handle state */
373 api_SNPHS(conn
, req
, fsp
, params
, tpscnt
);
376 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
381 /****************************************************************************
382 Handle named pipe commands.
383 ****************************************************************************/
385 static void named_pipe(connection_struct
*conn
, uint16 vuid
,
386 struct smb_request
*req
,
387 const char *name
, uint16
*setup
,
388 char *data
, char *params
,
389 int suwcnt
, int tdscnt
,int tpscnt
,
390 int msrcnt
, int mdrcnt
, int mprcnt
)
392 DEBUG(3,("named pipe command on <%s> name\n", name
));
394 if (strequal(name
,"LANMAN")) {
395 api_reply(conn
, vuid
, req
,
402 if (strequal(name
,"WKSSVC") ||
403 strequal(name
,"SRVSVC") ||
404 strequal(name
,"WINREG") ||
405 strequal(name
,"SAMR") ||
406 strequal(name
,"LSARPC")) {
408 DEBUG(4,("named pipe command from Win95 (wow!)\n"));
410 api_fd_reply(conn
, vuid
, req
,
411 setup
, (uint8_t *)data
, params
,
412 suwcnt
, tdscnt
, tpscnt
,
417 if (strlen(name
) < 1) {
418 api_fd_reply(conn
, vuid
, req
,
419 setup
, (uint8_t *)data
,
420 params
, suwcnt
, tdscnt
,
421 tpscnt
, mdrcnt
, mprcnt
);
426 DEBUG(3,("unknown named pipe: setup 0x%X setup1=%d\n",
427 (int)setup
[0],(int)setup
[1]));
429 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
433 static void handle_trans(connection_struct
*conn
, struct smb_request
*req
,
434 struct trans_state
*state
)
436 char *local_machine_name
;
439 DEBUG(3,("trans <%s> data=%u params=%u setup=%u\n",
440 state
->name
,(unsigned int)state
->total_data
,(unsigned int)state
->total_param
,
441 (unsigned int)state
->setup_count
));
444 * WinCE wierdness....
447 local_machine_name
= talloc_asprintf(state
, "\\%s\\",
448 get_local_machine_name());
450 if (local_machine_name
== NULL
) {
451 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
455 if (strnequal(state
->name
, local_machine_name
,
456 strlen(local_machine_name
))) {
457 name_offset
= strlen(local_machine_name
)-1;
460 if (!strnequal(&state
->name
[name_offset
], "\\PIPE",
462 reply_nterror(req
, NT_STATUS_NOT_SUPPORTED
);
466 name_offset
+= strlen("\\PIPE");
468 /* Win9x weirdness. When talking to a unicode server Win9x
469 only sends \PIPE instead of \PIPE\ */
471 if (state
->name
[name_offset
] == '\\')
474 DEBUG(5,("calling named_pipe\n"));
475 named_pipe(conn
, state
->vuid
, req
,
476 state
->name
+name_offset
,
477 state
->setup
,state
->data
,
479 state
->setup_count
,state
->total_data
,
481 state
->max_setup_return
,
482 state
->max_data_return
,
483 state
->max_param_return
);
485 if (state
->close_on_completion
) {
486 close_cnum(conn
,state
->vuid
);
493 /****************************************************************************
495 ****************************************************************************/
497 void reply_trans(struct smb_request
*req
)
499 connection_struct
*conn
= req
->conn
;
504 struct trans_state
*state
;
507 unsigned int av_size
;
509 START_PROFILE(SMBtrans
);
512 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
513 END_PROFILE(SMBtrans
);
517 size
= smb_len(req
->inbuf
) + 4;
518 av_size
= smb_len(req
->inbuf
);
519 dsoff
= SVAL(req
->vwv
+12, 0);
520 dscnt
= SVAL(req
->vwv
+11, 0);
521 psoff
= SVAL(req
->vwv
+10, 0);
522 pscnt
= SVAL(req
->vwv
+9, 0);
524 result
= allow_new_trans(conn
->pending_trans
, req
->mid
);
525 if (!NT_STATUS_IS_OK(result
)) {
526 DEBUG(2, ("Got invalid trans request: %s\n",
528 reply_nterror(req
, result
);
529 END_PROFILE(SMBtrans
);
533 if ((state
= TALLOC_P(conn
, struct trans_state
)) == NULL
) {
534 DEBUG(0, ("talloc failed\n"));
535 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
536 END_PROFILE(SMBtrans
);
540 state
->cmd
= SMBtrans
;
542 state
->mid
= req
->mid
;
543 state
->vuid
= req
->vuid
;
544 state
->setup_count
= CVAL(req
->vwv
+13, 0);
546 state
->total_param
= SVAL(req
->vwv
+0, 0);
548 state
->total_data
= SVAL(req
->vwv
+1, 0);
550 state
->max_param_return
= SVAL(req
->vwv
+2, 0);
551 state
->max_data_return
= SVAL(req
->vwv
+3, 0);
552 state
->max_setup_return
= CVAL(req
->vwv
+4, 0);
553 state
->close_on_completion
= BITSETW(req
->vwv
+5, 0);
554 state
->one_way
= BITSETW(req
->vwv
+5, 1);
556 srvstr_pull_req_talloc(state
, req
, &state
->name
, req
->buf
,
559 if ((dscnt
> state
->total_data
) || (pscnt
> state
->total_param
) ||
563 if (state
->total_data
) {
564 /* Can't use talloc here, the core routines do realloc on the
565 * params and data. Out of paranoia, 100 bytes too many. */
566 state
->data
= (char *)SMB_MALLOC(state
->total_data
+100);
567 if (state
->data
== NULL
) {
568 DEBUG(0,("reply_trans: data malloc fail for %u "
569 "bytes !\n", (unsigned int)state
->total_data
));
571 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
572 END_PROFILE(SMBtrans
);
575 /* null-terminate the slack space */
576 memset(&state
->data
[state
->total_data
], 0, 100);
578 if (dscnt
> state
->total_data
||
579 dsoff
+dscnt
< dsoff
) {
583 if (dsoff
> av_size
||
585 dsoff
+dscnt
> av_size
) {
589 memcpy(state
->data
,smb_base(req
->inbuf
)+dsoff
,dscnt
);
592 if (state
->total_param
) {
593 /* Can't use talloc here, the core routines do realloc on the
594 * params and data. Out of paranoia, 100 bytes too many */
595 state
->param
= (char *)SMB_MALLOC(state
->total_param
+100);
596 if (state
->param
== NULL
) {
597 DEBUG(0,("reply_trans: param malloc fail for %u "
598 "bytes !\n", (unsigned int)state
->total_param
));
599 SAFE_FREE(state
->data
);
601 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
602 END_PROFILE(SMBtrans
);
605 /* null-terminate the slack space */
606 memset(&state
->param
[state
->total_param
], 0, 100);
608 if (pscnt
> state
->total_param
||
609 psoff
+pscnt
< psoff
) {
613 if (psoff
> av_size
||
615 psoff
+pscnt
> av_size
) {
619 memcpy(state
->param
,smb_base(req
->inbuf
)+psoff
,pscnt
);
622 state
->received_data
= dscnt
;
623 state
->received_param
= pscnt
;
625 if (state
->setup_count
) {
627 if((state
->setup
= TALLOC_ARRAY(
628 state
, uint16
, state
->setup_count
)) == NULL
) {
629 DEBUG(0,("reply_trans: setup malloc fail for %u "
630 "bytes !\n", (unsigned int)
631 (state
->setup_count
* sizeof(uint16
))));
632 SAFE_FREE(state
->data
);
633 SAFE_FREE(state
->param
);
635 reply_nterror(req
, NT_STATUS_NO_MEMORY
);
636 END_PROFILE(SMBtrans
);
639 if (req
->inbuf
+smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) >
642 if ((smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) < smb_vwv14
) ||
643 (smb_vwv14
+(state
->setup_count
*SIZEOFWORD
) <
644 (state
->setup_count
*SIZEOFWORD
)))
647 for (i
=0;i
<state
->setup_count
;i
++)
648 state
->setup
[i
] = SVAL(req
->inbuf
,
649 smb_vwv14
+i
*SIZEOFWORD
);
652 state
->received_param
= pscnt
;
654 if ((state
->received_param
!= state
->total_param
) ||
655 (state
->received_data
!= state
->total_data
)) {
656 DLIST_ADD(conn
->pending_trans
, state
);
658 /* We need to send an interim response then receive the rest
659 of the parameter/data bytes */
660 reply_outbuf(req
, 0, 0);
661 show_msg((char *)req
->outbuf
);
662 END_PROFILE(SMBtrans
);
666 handle_trans(conn
, req
, state
);
668 SAFE_FREE(state
->data
);
669 SAFE_FREE(state
->param
);
672 END_PROFILE(SMBtrans
);
677 DEBUG(0,("reply_trans: invalid trans parameters\n"));
678 SAFE_FREE(state
->data
);
679 SAFE_FREE(state
->param
);
681 END_PROFILE(SMBtrans
);
682 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
686 /****************************************************************************
687 Reply to a secondary SMBtrans.
688 ****************************************************************************/
690 void reply_transs(struct smb_request
*req
)
692 connection_struct
*conn
= req
->conn
;
693 unsigned int pcnt
,poff
,dcnt
,doff
,pdisp
,ddisp
;
694 struct trans_state
*state
;
695 unsigned int av_size
;
697 START_PROFILE(SMBtranss
);
699 show_msg((char *)req
->inbuf
);
702 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
703 END_PROFILE(SMBtranss
);
707 for (state
= conn
->pending_trans
; state
!= NULL
;
708 state
= state
->next
) {
709 if (state
->mid
== req
->mid
) {
714 if ((state
== NULL
) || (state
->cmd
!= SMBtrans
)) {
715 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
716 END_PROFILE(SMBtranss
);
720 /* Revise total_params and total_data in case they have changed
723 if (SVAL(req
->vwv
+0, 0) < state
->total_param
)
724 state
->total_param
= SVAL(req
->vwv
+0, 0);
725 if (SVAL(req
->vwv
+1, 0) < state
->total_data
)
726 state
->total_data
= SVAL(req
->vwv
+1, 0);
728 av_size
= smb_len(req
->inbuf
);
730 pcnt
= SVAL(req
->vwv
+2, 0);
731 poff
= SVAL(req
->vwv
+3, 0);
732 pdisp
= SVAL(req
->vwv
+4, 0);
734 dcnt
= SVAL(req
->vwv
+5, 0);
735 doff
= SVAL(req
->vwv
+6, 0);
736 ddisp
= SVAL(req
->vwv
+7, 0);
738 state
->received_param
+= pcnt
;
739 state
->received_data
+= dcnt
;
741 if ((state
->received_data
> state
->total_data
) ||
742 (state
->received_param
> state
->total_param
))
746 if (pdisp
> state
->total_param
||
747 pcnt
> state
->total_param
||
748 pdisp
+pcnt
> state
->total_param
||
749 pdisp
+pcnt
< pdisp
) {
753 if (poff
> av_size
||
755 poff
+pcnt
> av_size
||
760 memcpy(state
->param
+pdisp
,smb_base(req
->inbuf
)+poff
,
765 if (ddisp
> state
->total_data
||
766 dcnt
> state
->total_data
||
767 ddisp
+dcnt
> state
->total_data
||
768 ddisp
+dcnt
< ddisp
) {
772 if (ddisp
> av_size
||
774 ddisp
+dcnt
> av_size
||
775 ddisp
+dcnt
< ddisp
) {
779 memcpy(state
->data
+ddisp
, smb_base(req
->inbuf
)+doff
,
783 if ((state
->received_param
< state
->total_param
) ||
784 (state
->received_data
< state
->total_data
)) {
785 END_PROFILE(SMBtranss
);
789 handle_trans(conn
, req
, state
);
791 DLIST_REMOVE(conn
->pending_trans
, state
);
792 SAFE_FREE(state
->data
);
793 SAFE_FREE(state
->param
);
796 END_PROFILE(SMBtranss
);
801 DEBUG(0,("reply_transs: invalid trans parameters\n"));
802 DLIST_REMOVE(conn
->pending_trans
, state
);
803 SAFE_FREE(state
->data
);
804 SAFE_FREE(state
->param
);
806 reply_nterror(req
, NT_STATUS_INVALID_PARAMETER
);
807 END_PROFILE(SMBtranss
);