r15656: for NT IOCTL's we need to control the max_data field for some calls
[kai/samba.git] / source / smb_server / smb / nttrans.c
1 /* 
2    Unix SMB/CIFS implementation.
3    NT transaction handling
4    Copyright (C) Andrew Tridgell 2003
5    Copyright (C) James J Myers 2003 <myersjj@samba.org>
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21 /*
22    This file handles the parsing of transact2 requests
23 */
24
25 #include "includes.h"
26 #include "smb_server/smb_server.h"
27 #include "ntvfs/ntvfs.h"
28 #include "libcli/raw/libcliraw.h"
29 #include "librpc/gen_ndr/ndr_security.h"
30
31 /*
32   hold the state of a nttrans op while in progress. Needed to allow for async backend
33   functions.
34 */
35 struct nttrans_op {
36         struct smb_nttrans *trans;
37         NTSTATUS (*send_fn)(struct nttrans_op *);
38         void *op_info;
39 };
40
41
42 /* setup a nttrans reply, given the data and params sizes */
43 static NTSTATUS nttrans_setup_reply(struct nttrans_op *op, 
44                                     struct smb_nttrans *trans,
45                                     uint16_t param_size, uint16_t data_size,
46                                     uint16_t setup_count)
47 {
48         trans->out.setup_count = setup_count;
49         if (setup_count != 0) {
50                 trans->out.setup = talloc_zero_array(op, uint16_t, setup_count);
51                 NT_STATUS_HAVE_NO_MEMORY(trans->out.setup);
52         }
53         trans->out.params = data_blob_talloc(op, NULL, param_size);
54         if (param_size != 0) {
55                 NT_STATUS_HAVE_NO_MEMORY(trans->out.params.data);
56         }
57         trans->out.data = data_blob_talloc(op, NULL, data_size);
58         if (data_size != 0) {
59                 NT_STATUS_HAVE_NO_MEMORY(trans->out.data.data);
60         }
61         return NT_STATUS_OK;
62 }
63
64 /*
65   send a nttrans create reply
66 */
67 static NTSTATUS nttrans_create_send(struct nttrans_op *op)
68 {
69         union smb_open *io = talloc_get_type(op->op_info, union smb_open);
70         uint8_t *params;
71
72         op->trans->out.setup_count = 0;
73         op->trans->out.setup       = NULL;
74         op->trans->out.params      = data_blob_talloc(op, NULL, 69);
75         op->trans->out.data        = data_blob(NULL, 0);
76
77         params = op->trans->out.params.data;
78         NT_STATUS_HAVE_NO_MEMORY(params);
79
80         SSVAL(params,        0, io->ntcreatex.out.oplock_level);
81         SSVAL(params,        2, io->ntcreatex.out.file.fnum);
82         SIVAL(params,        4, io->ntcreatex.out.create_action);
83         SIVAL(params,        8, 0); /* ea error offset */
84         push_nttime(params, 12, io->ntcreatex.out.create_time);
85         push_nttime(params, 20, io->ntcreatex.out.access_time);
86         push_nttime(params, 28, io->ntcreatex.out.write_time);
87         push_nttime(params, 36, io->ntcreatex.out.change_time);
88         SIVAL(params,       44, io->ntcreatex.out.attrib);
89         SBVAL(params,       48, io->ntcreatex.out.alloc_size);
90         SBVAL(params,       56, io->ntcreatex.out.size);
91         SSVAL(params,       64, io->ntcreatex.out.file_type);
92         SSVAL(params,       66, io->ntcreatex.out.ipc_state);
93         SCVAL(params,       68, io->ntcreatex.out.is_directory);
94
95         return NT_STATUS_OK;
96 }
97
98 /* 
99    parse NTTRANS_CREATE request
100  */
101 static NTSTATUS nttrans_create(struct smbsrv_request *req, 
102                                struct nttrans_op *op)
103 {
104         struct smb_nttrans *trans = op->trans;
105         union smb_open *io;
106         uint16_t fname_len;
107         uint32_t sd_length, ea_length;
108         NTSTATUS status;
109         uint8_t *params;
110
111         if (trans->in.params.length < 54) {
112                 return NT_STATUS_INVALID_PARAMETER;
113         }
114
115         /* parse the request */
116         io = talloc(op, union smb_open);
117         NT_STATUS_HAVE_NO_MEMORY(io);
118
119         io->ntcreatex.level = RAW_OPEN_NTTRANS_CREATE;
120
121         params = trans->in.params.data;
122
123         io->ntcreatex.in.flags            = IVAL(params,  0);
124         io->ntcreatex.in.root_fid         = IVAL(params,  4);
125         io->ntcreatex.in.access_mask      = IVAL(params,  8);
126         io->ntcreatex.in.alloc_size       = BVAL(params, 12);
127         io->ntcreatex.in.file_attr        = IVAL(params, 20);
128         io->ntcreatex.in.share_access     = IVAL(params, 24);
129         io->ntcreatex.in.open_disposition = IVAL(params, 28);
130         io->ntcreatex.in.create_options   = IVAL(params, 32);
131         sd_length                         = IVAL(params, 36);
132         ea_length                         = IVAL(params, 40);
133         fname_len                         = IVAL(params, 44);
134         io->ntcreatex.in.impersonation    = IVAL(params, 48);
135         io->ntcreatex.in.security_flags   = CVAL(params, 52);
136         io->ntcreatex.in.sec_desc         = NULL;
137         io->ntcreatex.in.ea_list          = NULL;
138
139         req_pull_string(req, &io->ntcreatex.in.fname, 
140                         params + 53, 
141                         MIN(fname_len+1, trans->in.params.length - 53),
142                         STR_NO_RANGE_CHECK | STR_TERMINATE);
143         if (!io->ntcreatex.in.fname) {
144                 return NT_STATUS_INVALID_PARAMETER;
145         }
146
147         if (sd_length > trans->in.data.length ||
148             ea_length > trans->in.data.length ||
149             (sd_length+ea_length) > trans->in.data.length) {
150                 return NT_STATUS_INVALID_PARAMETER;
151         }
152
153         /* this call has an optional security descriptor */
154         if (sd_length != 0) {
155                 DATA_BLOB blob;
156                 blob.data = trans->in.data.data;
157                 blob.length = sd_length;
158                 io->ntcreatex.in.sec_desc = talloc(io, struct security_descriptor);
159                 if (io->ntcreatex.in.sec_desc == NULL) {
160                         return NT_STATUS_NO_MEMORY;
161                 }
162                 status = ndr_pull_struct_blob(&blob, io, 
163                                               io->ntcreatex.in.sec_desc, 
164                                               (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
165                 if (!NT_STATUS_IS_OK(status)) {
166                         return status;
167                 }
168         }
169
170         /* and an optional ea_list */
171         if (ea_length > 4) {
172                 DATA_BLOB blob;
173                 blob.data = trans->in.data.data + sd_length;
174                 blob.length = ea_length;
175                 io->ntcreatex.in.ea_list = talloc(io, struct smb_ea_list);
176                 if (io->ntcreatex.in.ea_list == NULL) {
177                         return NT_STATUS_NO_MEMORY;
178                 }
179
180                 status = ea_pull_list_chained(&blob, io, 
181                                               &io->ntcreatex.in.ea_list->num_eas,
182                                               &io->ntcreatex.in.ea_list->eas);
183                 if (!NT_STATUS_IS_OK(status)) {
184                         return status;
185                 }
186         }
187
188         op->send_fn = nttrans_create_send;
189         op->op_info = io;
190
191         return ntvfs_open(req->ntvfs, io);
192 }
193
194
195 /* 
196    send NTTRANS_QUERY_SEC_DESC reply
197  */
198 static NTSTATUS nttrans_query_sec_desc_send(struct nttrans_op *op)
199 {
200         struct smb_nttrans *trans = op->trans;
201         union smb_fileinfo *io = talloc_get_type(op->op_info, union smb_fileinfo);
202         NTSTATUS status;
203
204         trans->out.setup_count = 0;
205         trans->out.setup       = NULL;
206         trans->out.params      = data_blob_talloc(op, NULL, 4);
207         trans->out.data        = data_blob(NULL, 0);
208         NT_STATUS_HAVE_NO_MEMORY(trans->out.params.data);
209
210         status = ndr_push_struct_blob(&trans->out.data, op, 
211                                       io->query_secdesc.out.sd, 
212                                       (ndr_push_flags_fn_t)ndr_push_security_descriptor);
213         NT_STATUS_NOT_OK_RETURN(status);
214
215         SIVAL(trans->out.params.data, 0, trans->out.data.length);
216
217         return NT_STATUS_OK;
218 }
219
220 /* 
221    parse NTTRANS_QUERY_SEC_DESC request
222  */
223 static NTSTATUS nttrans_query_sec_desc(struct smbsrv_request *req, 
224                                        struct nttrans_op *op)
225 {
226         struct smb_nttrans *trans = op->trans;
227         union smb_fileinfo *io;
228
229         if (trans->in.params.length < 8) {
230                 return NT_STATUS_INVALID_PARAMETER;
231         }
232
233         /* parse the request */
234         io = talloc(op, union smb_fileinfo);
235         NT_STATUS_HAVE_NO_MEMORY(io);
236
237         io->query_secdesc.level            = RAW_FILEINFO_SEC_DESC;
238         io->query_secdesc.in.file.fnum     = SVAL(trans->in.params.data, 0);
239         io->query_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
240
241         op->op_info = io;
242         op->send_fn = nttrans_query_sec_desc_send;
243
244         return ntvfs_qfileinfo(req->ntvfs, io);
245 }
246
247
248 /* 
249    parse NTTRANS_SET_SEC_DESC request
250  */
251 static NTSTATUS nttrans_set_sec_desc(struct smbsrv_request *req, 
252                                      struct nttrans_op *op)
253 {
254         struct smb_nttrans *trans = op->trans;
255         union smb_setfileinfo *io;
256         NTSTATUS status;
257
258         if (trans->in.params.length < 8) {
259                 return NT_STATUS_INVALID_PARAMETER;
260         }
261
262         /* parse the request */
263         io = talloc(req, union smb_setfileinfo);
264         NT_STATUS_HAVE_NO_MEMORY(io);
265
266         io->set_secdesc.level            = RAW_SFILEINFO_SEC_DESC;
267         io->set_secdesc.in.file.fnum     = SVAL(trans->in.params.data, 0);
268         io->set_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
269
270         io->set_secdesc.in.sd = talloc(io, struct security_descriptor);
271         NT_STATUS_HAVE_NO_MEMORY(io->set_secdesc.in.sd);
272
273         status = ndr_pull_struct_blob(&trans->in.data, req, 
274                                       io->set_secdesc.in.sd, 
275                                       (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
276         NT_STATUS_NOT_OK_RETURN(status);
277
278         trans->out.setup_count = 0;
279         trans->out.setup       = NULL;
280         trans->out.params      = data_blob(NULL, 0);
281         trans->out.data        = data_blob(NULL, 0);
282
283         return ntvfs_setfileinfo(req->ntvfs, io);
284 }
285
286
287 /* parse NTTRANS_RENAME request
288  */
289 static NTSTATUS nttrans_rename(struct smbsrv_request *req, 
290                                struct nttrans_op *op)
291 {
292         return NT_STATUS_NOT_IMPLEMENTED;
293 }
294
295 /* 
296    parse NTTRANS_IOCTL request
297  */
298 static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, 
299                               struct nttrans_op *op)
300 {
301         struct smb_nttrans *trans = op->trans;
302         union smb_ioctl *nt;
303         uint32_t function;
304         uint16_t fnum;
305         uint8_t filter;
306         BOOL fsctl;
307         NTSTATUS status;
308
309         /* should have at least 4 setup words */
310         if (trans->in.setup_count != 4) {
311                 return NT_STATUS_INVALID_PARAMETER;
312         }
313
314         nt = talloc(op, union smb_ioctl);
315         NT_STATUS_HAVE_NO_MEMORY(nt);
316         
317         function  = IVAL(trans->in.setup, 0);
318         fnum  = SVAL(trans->in.setup, 4);
319         fsctl = CVAL(trans->in.setup, 6);
320         filter = CVAL(trans->in.setup, 7);
321
322         nt->ntioctl.level = RAW_IOCTL_NTIOCTL;
323         nt->ntioctl.in.file.fnum = fnum;
324         nt->ntioctl.in.function = function;
325         nt->ntioctl.in.fsctl = fsctl;
326         nt->ntioctl.in.filter = filter;
327         nt->ntioctl.in.max_data = trans->in.max_data;
328         nt->ntioctl.in.blob = trans->in.data;
329
330         status = nttrans_setup_reply(op, trans, 0, 0, 1);
331         NT_STATUS_NOT_OK_RETURN(status);
332
333         trans->out.setup[0] = 0;
334         
335         return ntvfs_ioctl(req->ntvfs, nt);
336 }
337
338
339 /* 
340    send NTTRANS_NOTIFY_CHANGE reply
341  */
342 static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
343 {
344         struct smb_notify *info = talloc_get_type(op->op_info, struct smb_notify);
345         size_t size = 0;
346         int i;
347         NTSTATUS status;
348         uint8_t *p;
349 #define MAX_BYTES_PER_CHAR 3
350         
351         /* work out how big the reply buffer could be */
352         for (i=0;i<info->out.num_changes;i++) {
353                 size += 12 + 3 + (1+strlen(info->out.changes[i].name.s)) * MAX_BYTES_PER_CHAR;
354         }
355
356         status = nttrans_setup_reply(op, op->trans, size, 0, 0);
357         NT_STATUS_NOT_OK_RETURN(status);
358
359         p = op->trans->out.params.data;
360
361         /* construct the changes buffer */
362         for (i=0;i<info->out.num_changes;i++) {
363                 uint32_t ofs;
364                 ssize_t len;
365
366                 SIVAL(p, 4, info->out.changes[i].action);
367                 len = push_string(p + 12, info->out.changes[i].name.s, 
368                                   op->trans->out.params.length - 
369                                   (p+12 - op->trans->out.params.data), STR_UNICODE);
370                 SIVAL(p, 8, len);
371                 
372                 ofs = len + 12;
373
374                 if (ofs & 3) {
375                         int pad = 4 - (ofs & 3);
376                         memset(p+ofs, 0, pad);
377                         ofs += pad;
378                 }
379
380                 if (i == info->out.num_changes-1) {
381                         SIVAL(p, 0, 0);
382                 } else {
383                         SIVAL(p, 0, ofs);
384                 }
385
386                 p += ofs;
387         }
388
389         op->trans->out.params.length = p - op->trans->out.params.data;
390
391         return NT_STATUS_OK;
392 }
393
394 /* 
395    parse NTTRANS_NOTIFY_CHANGE request
396  */
397 static NTSTATUS nttrans_notify_change(struct smbsrv_request *req, 
398                                       struct nttrans_op *op)
399 {
400         struct smb_nttrans *trans = op->trans;
401         struct smb_notify *info;
402
403         /* should have at least 4 setup words */
404         if (trans->in.setup_count != 4) {
405                 return NT_STATUS_INVALID_PARAMETER;
406         }
407
408         info = talloc(op, struct smb_notify);
409         NT_STATUS_HAVE_NO_MEMORY(info);
410
411         info->in.completion_filter = IVAL(trans->in.setup, 0);
412         info->in.file.fnum         = SVAL(trans->in.setup, 4);
413         info->in.recursive         = SVAL(trans->in.setup, 6);
414         info->in.buffer_size       = trans->in.max_param;
415
416         op->op_info = info;
417         op->send_fn = nttrans_notify_change_send;
418         
419         return ntvfs_notify(req->ntvfs, info);
420 }
421
422 /*
423   backend for nttrans requests
424 */
425 static NTSTATUS nttrans_backend(struct smbsrv_request *req, 
426                                 struct nttrans_op *op)
427 {
428         /* the nttrans command is in function */
429         switch (op->trans->in.function) {
430         case NT_TRANSACT_CREATE:
431                 return nttrans_create(req, op);
432         case NT_TRANSACT_IOCTL:
433                 return nttrans_ioctl(req, op);
434         case NT_TRANSACT_RENAME:
435                 return nttrans_rename(req, op);
436         case NT_TRANSACT_QUERY_SECURITY_DESC:
437                 return nttrans_query_sec_desc(req, op);
438         case NT_TRANSACT_SET_SECURITY_DESC:
439                 return nttrans_set_sec_desc(req, op);
440         case NT_TRANSACT_NOTIFY_CHANGE:
441                 return nttrans_notify_change(req, op);
442         }
443
444         /* an unknown nttrans command */
445         return NT_STATUS_DOS(ERRSRV, ERRerror);
446 }
447
448
449 static void reply_nttrans_send(struct ntvfs_request *ntvfs)
450 {
451         struct smbsrv_request *req;
452         uint16_t params_left, data_left;
453         uint8_t *params, *data;
454         struct smb_nttrans *trans;
455         struct nttrans_op *op;
456
457         SMBSRV_CHECK_ASYNC_STATUS(op, struct nttrans_op);
458
459         trans = op->trans;
460
461         /* if this function needs work to form the nttrans reply buffer, then
462            call that now */
463         if (op->send_fn != NULL) {
464                 NTSTATUS status;
465                 status = op->send_fn(op);
466                 if (!NT_STATUS_IS_OK(status)) {
467                         smbsrv_send_error(req, status);
468                         return;
469                 }
470         }
471
472         smbsrv_setup_reply(req, 18 + trans->out.setup_count, 0);
473
474         /* note that we don't check the max_setup count (matching w2k3
475            behaviour) */
476
477         if (trans->out.params.length > trans->in.max_param) {
478                 smbsrv_setup_error(req, NT_STATUS_BUFFER_TOO_SMALL);
479                 trans->out.params.length = trans->in.max_param;
480         }
481         if (trans->out.data.length > trans->in.max_data) {
482                 smbsrv_setup_error(req, NT_STATUS_BUFFER_TOO_SMALL);
483                 trans->out.data.length = trans->in.max_data;
484         }
485
486         params_left = trans->out.params.length;
487         data_left   = trans->out.data.length;
488         params      = trans->out.params.data;
489         data        = trans->out.data.data;
490
491         /* we need to divide up the reply into chunks that fit into
492            the negotiated buffer size */
493         do {
494                 uint16_t this_data, this_param, max_bytes;
495                 uint_t align1 = 1, align2 = (params_left ? 2 : 0);
496                 struct smbsrv_request *this_req;
497                 int i;
498
499                 max_bytes = req_max_data(req) - (align1 + align2);
500
501                 this_param = params_left;
502                 if (this_param > max_bytes) {
503                         this_param = max_bytes;
504                 }
505                 max_bytes -= this_param;
506
507                 this_data = data_left;
508                 if (this_data > max_bytes) {
509                         this_data = max_bytes;
510                 }
511
512                 /* don't destroy unless this is the last chunk */
513                 if (params_left - this_param != 0 || 
514                     data_left - this_data != 0) {
515                         this_req = smbsrv_setup_secondary_request(req);
516                 } else {
517                         this_req = req;
518                 }
519
520                 req_grow_data(req, this_param + this_data + (align1 + align2));
521
522                 SSVAL(this_req->out.vwv, 0, 0); /* reserved */
523                 SCVAL(this_req->out.vwv, 2, 0); /* reserved */
524                 SIVAL(this_req->out.vwv, 3, trans->out.params.length);
525                 SIVAL(this_req->out.vwv, 7, trans->out.data.length);
526
527                 SIVAL(this_req->out.vwv, 11, this_param);
528                 SIVAL(this_req->out.vwv, 15, align1 + PTR_DIFF(this_req->out.data, this_req->out.hdr));
529                 SIVAL(this_req->out.vwv, 19, PTR_DIFF(params, trans->out.params.data));
530
531                 SIVAL(this_req->out.vwv, 23, this_data);
532                 SIVAL(this_req->out.vwv, 27, align1 + align2 + 
533                       PTR_DIFF(this_req->out.data + this_param, this_req->out.hdr));
534                 SIVAL(this_req->out.vwv, 31, PTR_DIFF(data, trans->out.data.data));
535
536                 SCVAL(this_req->out.vwv, 35, trans->out.setup_count);
537                 for (i=0;i<trans->out.setup_count;i++) {
538                         SSVAL(this_req->out.vwv, VWV(18+i), trans->out.setup[i]);
539                 }
540
541                 memset(this_req->out.data, 0, align1);
542                 if (this_param != 0) {
543                         memcpy(this_req->out.data + align1, params, this_param);
544                 }
545                 memset(this_req->out.data+this_param+align1, 0, align2);
546                 if (this_data != 0) {
547                         memcpy(this_req->out.data+this_param+align1+align2, 
548                                data, this_data);
549                 }
550
551                 params_left -= this_param;
552                 data_left -= this_data;
553                 params += this_param;
554                 data += this_data;
555
556                 smbsrv_send_reply(this_req);
557         } while (params_left != 0 || data_left != 0);
558 }
559
560
561 /****************************************************************************
562  Reply to an SMBnttrans request
563 ****************************************************************************/
564 void smbsrv_reply_nttrans(struct smbsrv_request *req)
565 {
566         struct nttrans_op *op;
567         struct smb_nttrans *trans;
568         int i;
569         uint16_t param_ofs, data_ofs;
570         uint16_t param_count, data_count;
571         uint16_t param_total, data_total;
572
573         /* parse request */
574         if (req->in.wct < 19) {
575                 smbsrv_send_error(req, NT_STATUS_FOOBAR);
576                 return;
577         }
578
579         SMBSRV_TALLOC_IO_PTR(op, struct nttrans_op);
580         SMBSRV_SETUP_NTVFS_REQUEST(reply_nttrans_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
581
582         trans = talloc(op, struct smb_nttrans);
583         if (trans == NULL) {
584                 smbsrv_send_error(req, NT_STATUS_NO_MEMORY);
585                 return;
586         }
587
588         op->trans = trans;
589         op->op_info = NULL;
590         op->send_fn = NULL;
591
592         trans->in.max_setup   = CVAL(req->in.vwv, 0);
593         param_total          = IVAL(req->in.vwv, 3);
594         data_total           = IVAL(req->in.vwv, 7);
595         trans->in.max_param   = IVAL(req->in.vwv, 11);
596         trans->in.max_data    = IVAL(req->in.vwv, 15);
597         param_count          = IVAL(req->in.vwv, 19);
598         param_ofs            = IVAL(req->in.vwv, 23);
599         data_count           = IVAL(req->in.vwv, 27);
600         data_ofs             = IVAL(req->in.vwv, 31);
601         trans->in.setup_count = CVAL(req->in.vwv, 35);
602         trans->in.function       = SVAL(req->in.vwv, 36);
603
604         if (req->in.wct != 19 + trans->in.setup_count) {
605                 smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));
606                 return;
607         }
608
609         /* parse out the setup words */
610         trans->in.setup = talloc_array(req, uint16_t, trans->in.setup_count);
611         if (!trans->in.setup) {
612                 smbsrv_send_error(req, NT_STATUS_NO_MEMORY);
613                 return;
614         }
615         for (i=0;i<trans->in.setup_count;i++) {
616                 trans->in.setup[i] = SVAL(req->in.vwv, VWV(19+i));
617         }
618
619         if (!req_pull_blob(req, req->in.hdr + param_ofs, param_count, &trans->in.params) ||
620             !req_pull_blob(req, req->in.hdr + data_ofs, data_count, &trans->in.data)) {
621                 smbsrv_send_error(req, NT_STATUS_FOOBAR);
622                 return;
623         }
624
625         /* is it a partial request? if so, then send a 'send more' message */
626         if (param_total > param_count ||
627             data_total > data_count) {
628                 DEBUG(0,("REWRITE: not handling partial nttrans requests!\n"));
629                 return;
630         }
631
632         SMBSRV_CALL_NTVFS_BACKEND(nttrans_backend(req, op));
633 }
634
635
636 /****************************************************************************
637  Reply to an SMBnttranss request
638 ****************************************************************************/
639 void smbsrv_reply_nttranss(struct smbsrv_request *req)
640 {
641         smbsrv_send_error(req, NT_STATUS_FOOBAR);
642 }