2 Unix SMB/CIFS implementation.
3 NTVFS interface functions
5 Copyright (C) Stefan (metze) Metzmacher 2004
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.
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.
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.
23 #include "smb_server/smb_server.h"
24 #include "ntvfs/ntvfs.h"
26 /* connect/disconnect */
27 _PUBLIC_ NTSTATUS ntvfs_connect(struct ntvfs_request *req, const char *sharename)
29 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
30 if (!ntvfs->ops->connect) {
31 return NT_STATUS_NOT_IMPLEMENTED;
33 return ntvfs->ops->connect(ntvfs, req, sharename);
36 _PUBLIC_ NTSTATUS ntvfs_disconnect(struct ntvfs_context *ntvfs_ctx)
38 struct ntvfs_module_context *ntvfs;
39 if (ntvfs_ctx == NULL) {
40 return NT_STATUS_INVALID_CONNECTION;
42 ntvfs = ntvfs_ctx->modules;
43 if (!ntvfs->ops->disconnect) {
44 return NT_STATUS_NOT_IMPLEMENTED;
46 return ntvfs->ops->disconnect(ntvfs);
49 /* async setup - called by a backend that wants to setup any state for
51 _PUBLIC_ NTSTATUS ntvfs_async_setup(struct ntvfs_request *req, void *private)
53 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
54 if (!ntvfs->ops->async_setup) {
55 return NT_STATUS_NOT_IMPLEMENTED;
57 return ntvfs->ops->async_setup(ntvfs, req, private);
60 /* filesystem operations */
61 _PUBLIC_ NTSTATUS ntvfs_fsinfo(struct ntvfs_request *req, union smb_fsinfo *fs)
63 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
64 if (!ntvfs->ops->fsinfo) {
65 return NT_STATUS_NOT_IMPLEMENTED;
67 return ntvfs->ops->fsinfo(ntvfs, req, fs);
71 _PUBLIC_ NTSTATUS ntvfs_unlink(struct ntvfs_request *req, union smb_unlink *unl)
73 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
74 if (!ntvfs->ops->unlink) {
75 return NT_STATUS_NOT_IMPLEMENTED;
77 return ntvfs->ops->unlink(ntvfs, req, unl);
80 _PUBLIC_ NTSTATUS ntvfs_chkpath(struct ntvfs_request *req, union smb_chkpath *cp)
82 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
83 if (!ntvfs->ops->chkpath) {
84 return NT_STATUS_NOT_IMPLEMENTED;
86 return ntvfs->ops->chkpath(ntvfs, req, cp);
89 _PUBLIC_ NTSTATUS ntvfs_qpathinfo(struct ntvfs_request *req, union smb_fileinfo *st)
91 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
92 if (!ntvfs->ops->qpathinfo) {
93 return NT_STATUS_NOT_IMPLEMENTED;
95 return ntvfs->ops->qpathinfo(ntvfs, req, st);
98 _PUBLIC_ NTSTATUS ntvfs_setpathinfo(struct ntvfs_request *req, union smb_setfileinfo *st)
100 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
101 if (!ntvfs->ops->setpathinfo) {
102 return NT_STATUS_NOT_IMPLEMENTED;
104 return ntvfs->ops->setpathinfo(ntvfs, req, st);
107 _PUBLIC_ NTSTATUS ntvfs_open(struct ntvfs_request *req, union smb_open *oi)
109 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
110 if (!ntvfs->ops->open) {
111 return NT_STATUS_NOT_IMPLEMENTED;
113 return ntvfs->ops->open(ntvfs, req, oi);
116 _PUBLIC_ NTSTATUS ntvfs_mkdir(struct ntvfs_request *req, union smb_mkdir *md)
118 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
119 if (!ntvfs->ops->mkdir) {
120 return NT_STATUS_NOT_IMPLEMENTED;
122 return ntvfs->ops->mkdir(ntvfs, req, md);
125 _PUBLIC_ NTSTATUS ntvfs_rmdir(struct ntvfs_request *req, struct smb_rmdir *rd)
127 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
128 if (!ntvfs->ops->rmdir) {
129 return NT_STATUS_NOT_IMPLEMENTED;
131 return ntvfs->ops->rmdir(ntvfs, req, rd);
134 _PUBLIC_ NTSTATUS ntvfs_rename(struct ntvfs_request *req, union smb_rename *ren)
136 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
137 if (!ntvfs->ops->rename) {
138 return NT_STATUS_NOT_IMPLEMENTED;
140 return ntvfs->ops->rename(ntvfs, req, ren);
143 _PUBLIC_ NTSTATUS ntvfs_copy(struct ntvfs_request *req, struct smb_copy *cp)
145 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
146 if (!ntvfs->ops->copy) {
147 return NT_STATUS_NOT_IMPLEMENTED;
149 return ntvfs->ops->copy(ntvfs, req, cp);
152 /* directory search */
153 _PUBLIC_ NTSTATUS ntvfs_search_first(struct ntvfs_request *req, union smb_search_first *io, void *private,
154 BOOL ntvfs_callback(void *private, union smb_search_data *file))
156 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
157 if (!ntvfs->ops->search_first) {
158 return NT_STATUS_NOT_IMPLEMENTED;
160 return ntvfs->ops->search_first(ntvfs, req, io, private, ntvfs_callback);
163 _PUBLIC_ NTSTATUS ntvfs_search_next(struct ntvfs_request *req, union smb_search_next *io, void *private,
164 BOOL ntvfs_callback(void *private, union smb_search_data *file))
166 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
167 if (!ntvfs->ops->search_next) {
168 return NT_STATUS_NOT_IMPLEMENTED;
170 return ntvfs->ops->search_next(ntvfs, req, io, private, ntvfs_callback);
173 _PUBLIC_ NTSTATUS ntvfs_search_close(struct ntvfs_request *req, union smb_search_close *io)
175 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
176 if (!ntvfs->ops->search_close) {
177 return NT_STATUS_NOT_IMPLEMENTED;
179 return ntvfs->ops->search_close(ntvfs, req, io);
182 /* operations on open files */
183 _PUBLIC_ NTSTATUS ntvfs_ioctl(struct ntvfs_request *req, union smb_ioctl *io)
185 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
186 if (!ntvfs->ops->ioctl) {
187 return NT_STATUS_NOT_IMPLEMENTED;
189 return ntvfs->ops->ioctl(ntvfs, req, io);
192 _PUBLIC_ NTSTATUS ntvfs_read(struct ntvfs_request *req, union smb_read *io)
194 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
195 if (!ntvfs->ops->read) {
196 return NT_STATUS_NOT_IMPLEMENTED;
198 return ntvfs->ops->read(ntvfs, req, io);
201 _PUBLIC_ NTSTATUS ntvfs_write(struct ntvfs_request *req, union smb_write *io)
203 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
204 if (!ntvfs->ops->write) {
205 return NT_STATUS_NOT_IMPLEMENTED;
207 return ntvfs->ops->write(ntvfs, req, io);
210 _PUBLIC_ NTSTATUS ntvfs_seek(struct ntvfs_request *req, union smb_seek *io)
212 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
213 if (!ntvfs->ops->seek) {
214 return NT_STATUS_NOT_IMPLEMENTED;
216 return ntvfs->ops->seek(ntvfs, req, io);
219 _PUBLIC_ NTSTATUS ntvfs_flush(struct ntvfs_request *req,
220 union smb_flush *flush)
222 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
223 if (!ntvfs->ops->flush) {
224 return NT_STATUS_NOT_IMPLEMENTED;
226 return ntvfs->ops->flush(ntvfs, req, flush);
229 _PUBLIC_ NTSTATUS ntvfs_lock(struct ntvfs_request *req, union smb_lock *lck)
231 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
232 if (!ntvfs->ops->lock) {
233 return NT_STATUS_NOT_IMPLEMENTED;
235 return ntvfs->ops->lock(ntvfs, req, lck);
238 _PUBLIC_ NTSTATUS ntvfs_qfileinfo(struct ntvfs_request *req, union smb_fileinfo *info)
240 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
241 if (!ntvfs->ops->qfileinfo) {
242 return NT_STATUS_NOT_IMPLEMENTED;
244 return ntvfs->ops->qfileinfo(ntvfs, req, info);
247 _PUBLIC_ NTSTATUS ntvfs_setfileinfo(struct ntvfs_request *req, union smb_setfileinfo *info)
249 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
250 if (!ntvfs->ops->setfileinfo) {
251 return NT_STATUS_NOT_IMPLEMENTED;
253 return ntvfs->ops->setfileinfo(ntvfs, req, info);
256 _PUBLIC_ NTSTATUS ntvfs_close(struct ntvfs_request *req, union smb_close *io)
258 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
259 if (!ntvfs->ops->close) {
260 return NT_STATUS_NOT_IMPLEMENTED;
262 return ntvfs->ops->close(ntvfs, req, io);
265 /* trans interface - used by IPC backend for pipes and RAP calls */
266 _PUBLIC_ NTSTATUS ntvfs_trans(struct ntvfs_request *req, struct smb_trans2 *trans)
268 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
269 if (!ntvfs->ops->trans) {
270 return NT_STATUS_NOT_IMPLEMENTED;
272 return ntvfs->ops->trans(ntvfs, req, trans);
275 /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
276 _PUBLIC_ NTSTATUS ntvfs_trans2(struct ntvfs_request *req, struct smb_trans2 *trans2)
278 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
279 if (!ntvfs->ops->trans2) {
280 return NT_STATUS_NOT_IMPLEMENTED;
282 return ntvfs->ops->trans2(ntvfs, req, trans2);
285 /* printing specific operations */
286 _PUBLIC_ NTSTATUS ntvfs_lpq(struct ntvfs_request *req, union smb_lpq *lpq)
288 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
289 if (!ntvfs->ops->lpq) {
290 return NT_STATUS_NOT_IMPLEMENTED;
292 return ntvfs->ops->lpq(ntvfs, req, lpq);
295 /* logoff - called when a vuid is closed */
296 _PUBLIC_ NTSTATUS ntvfs_logoff(struct ntvfs_request *req)
298 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
299 if (!ntvfs->ops->logoff) {
300 return NT_STATUS_NOT_IMPLEMENTED;
302 return ntvfs->ops->logoff(ntvfs, req);
305 _PUBLIC_ NTSTATUS ntvfs_exit(struct ntvfs_request *req)
307 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
308 if (!ntvfs->ops->exit) {
309 return NT_STATUS_NOT_IMPLEMENTED;
311 return ntvfs->ops->exit(ntvfs, req);
315 change notify request
317 _PUBLIC_ NTSTATUS ntvfs_notify(struct ntvfs_request *req, union smb_notify *info)
319 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
320 if (!ntvfs->ops->notify) {
321 return NT_STATUS_NOT_IMPLEMENTED;
323 return ntvfs->ops->notify(ntvfs, req, info);
327 cancel an outstanding async request
329 _PUBLIC_ NTSTATUS ntvfs_cancel(struct ntvfs_request *req)
331 struct ntvfs_module_context *ntvfs = req->tcon->ntvfs_ctx->modules;
332 if (!ntvfs->ops->cancel) {
333 return NT_STATUS_NOT_IMPLEMENTED;
335 return ntvfs->ops->cancel(ntvfs, req);
339 _PUBLIC_ NTSTATUS ntvfs_next_connect(struct ntvfs_module_context *ntvfs,
340 struct ntvfs_request *req, const char *sharename)
342 if (!ntvfs->next || !ntvfs->next->ops->connect) {
343 return NT_STATUS_NOT_IMPLEMENTED;
345 return ntvfs->next->ops->connect(ntvfs->next, req, sharename);
348 _PUBLIC_ NTSTATUS ntvfs_next_disconnect(struct ntvfs_module_context *ntvfs)
350 if (!ntvfs->next || !ntvfs->next->ops->disconnect) {
351 return NT_STATUS_NOT_IMPLEMENTED;
353 return ntvfs->next->ops->disconnect(ntvfs->next);
356 /* async_setup - called when setting up for a async request */
357 _PUBLIC_ NTSTATUS ntvfs_next_async_setup(struct ntvfs_module_context *ntvfs,
358 struct ntvfs_request *req,
361 if (!ntvfs->next || !ntvfs->next->ops->async_setup) {
362 return NT_STATUS_NOT_IMPLEMENTED;
364 return ntvfs->next->ops->async_setup(ntvfs->next, req, private);
367 /* filesystem operations */
368 _PUBLIC_ NTSTATUS ntvfs_next_fsinfo(struct ntvfs_module_context *ntvfs,
369 struct ntvfs_request *req,
370 union smb_fsinfo *fs)
372 if (!ntvfs->next || !ntvfs->next->ops->fsinfo) {
373 return NT_STATUS_NOT_IMPLEMENTED;
375 return ntvfs->next->ops->fsinfo(ntvfs->next, req, fs);
378 /* path operations */
379 _PUBLIC_ NTSTATUS ntvfs_next_unlink(struct ntvfs_module_context *ntvfs,
380 struct ntvfs_request *req,
381 union smb_unlink *unl)
383 if (!ntvfs->next || !ntvfs->next->ops->unlink) {
384 return NT_STATUS_NOT_IMPLEMENTED;
386 return ntvfs->next->ops->unlink(ntvfs->next, req, unl);
389 _PUBLIC_ NTSTATUS ntvfs_next_chkpath(struct ntvfs_module_context *ntvfs,
390 struct ntvfs_request *req,
391 union smb_chkpath *cp)
393 if (!ntvfs->next || !ntvfs->next->ops->chkpath) {
394 return NT_STATUS_NOT_IMPLEMENTED;
396 return ntvfs->next->ops->chkpath(ntvfs->next, req, cp);
399 _PUBLIC_ NTSTATUS ntvfs_next_qpathinfo(struct ntvfs_module_context *ntvfs,
400 struct ntvfs_request *req,
401 union smb_fileinfo *st)
403 if (!ntvfs->next || !ntvfs->next->ops->qpathinfo) {
404 return NT_STATUS_NOT_IMPLEMENTED;
406 return ntvfs->next->ops->qpathinfo(ntvfs->next, req, st);
409 _PUBLIC_ NTSTATUS ntvfs_next_setpathinfo(struct ntvfs_module_context *ntvfs,
410 struct ntvfs_request *req,
411 union smb_setfileinfo *st)
413 if (!ntvfs->next || !ntvfs->next->ops->setpathinfo) {
414 return NT_STATUS_NOT_IMPLEMENTED;
416 return ntvfs->next->ops->setpathinfo(ntvfs->next, req, st);
419 _PUBLIC_ NTSTATUS ntvfs_next_mkdir(struct ntvfs_module_context *ntvfs,
420 struct ntvfs_request *req,
423 if (!ntvfs->next || !ntvfs->next->ops->mkdir) {
424 return NT_STATUS_NOT_IMPLEMENTED;
426 return ntvfs->next->ops->mkdir(ntvfs->next, req, md);
429 _PUBLIC_ NTSTATUS ntvfs_next_rmdir(struct ntvfs_module_context *ntvfs,
430 struct ntvfs_request *req,
431 struct smb_rmdir *rd)
433 if (!ntvfs->next || !ntvfs->next->ops->rmdir) {
434 return NT_STATUS_NOT_IMPLEMENTED;
436 return ntvfs->next->ops->rmdir(ntvfs->next, req, rd);
439 _PUBLIC_ NTSTATUS ntvfs_next_rename(struct ntvfs_module_context *ntvfs,
440 struct ntvfs_request *req,
441 union smb_rename *ren)
443 if (!ntvfs->next || !ntvfs->next->ops->rename) {
444 return NT_STATUS_NOT_IMPLEMENTED;
446 return ntvfs->next->ops->rename(ntvfs->next, req, ren);
449 _PUBLIC_ NTSTATUS ntvfs_next_copy(struct ntvfs_module_context *ntvfs,
450 struct ntvfs_request *req,
453 if (!ntvfs->next || !ntvfs->next->ops->copy) {
454 return NT_STATUS_NOT_IMPLEMENTED;
456 return ntvfs->next->ops->copy(ntvfs->next, req, cp);
459 _PUBLIC_ NTSTATUS ntvfs_next_open(struct ntvfs_module_context *ntvfs,
460 struct ntvfs_request *req,
463 if (!ntvfs->next || !ntvfs->next->ops->open) {
464 return NT_STATUS_NOT_IMPLEMENTED;
466 return ntvfs->next->ops->open(ntvfs->next, req, oi);
470 /* directory search */
471 _PUBLIC_ NTSTATUS ntvfs_next_search_first(struct ntvfs_module_context *ntvfs,
472 struct ntvfs_request *req,
473 union smb_search_first *io, void *private,
474 BOOL (*callback)(void *private, union smb_search_data *file))
476 if (!ntvfs->next || !ntvfs->next->ops->search_first) {
477 return NT_STATUS_NOT_IMPLEMENTED;
479 return ntvfs->next->ops->search_first(ntvfs->next, req, io, private, callback);
482 _PUBLIC_ NTSTATUS ntvfs_next_search_next(struct ntvfs_module_context *ntvfs,
483 struct ntvfs_request *req,
484 union smb_search_next *io, void *private,
485 BOOL (*callback)(void *private, union smb_search_data *file))
487 if (!ntvfs->next || !ntvfs->next->ops->search_next) {
488 return NT_STATUS_NOT_IMPLEMENTED;
490 return ntvfs->next->ops->search_next(ntvfs->next, req, io, private, callback);
493 _PUBLIC_ NTSTATUS ntvfs_next_search_close(struct ntvfs_module_context *ntvfs,
494 struct ntvfs_request *req,
495 union smb_search_close *io)
497 if (!ntvfs->next || !ntvfs->next->ops->search_close) {
498 return NT_STATUS_NOT_IMPLEMENTED;
500 return ntvfs->next->ops->search_close(ntvfs->next, req, io);
503 /* operations on open files */
504 _PUBLIC_ NTSTATUS ntvfs_next_ioctl(struct ntvfs_module_context *ntvfs,
505 struct ntvfs_request *req,
508 if (!ntvfs->next || !ntvfs->next->ops->ioctl) {
509 return NT_STATUS_NOT_IMPLEMENTED;
511 return ntvfs->next->ops->ioctl(ntvfs->next, req, io);
514 _PUBLIC_ NTSTATUS ntvfs_next_read(struct ntvfs_module_context *ntvfs,
515 struct ntvfs_request *req,
518 if (!ntvfs->next || !ntvfs->next->ops->read) {
519 return NT_STATUS_NOT_IMPLEMENTED;
521 return ntvfs->next->ops->read(ntvfs->next, req, io);
524 _PUBLIC_ NTSTATUS ntvfs_next_write(struct ntvfs_module_context *ntvfs,
525 struct ntvfs_request *req,
528 if (!ntvfs->next || !ntvfs->next->ops->write) {
529 return NT_STATUS_NOT_IMPLEMENTED;
531 return ntvfs->next->ops->write(ntvfs->next, req, io);
534 _PUBLIC_ NTSTATUS ntvfs_next_seek(struct ntvfs_module_context *ntvfs,
535 struct ntvfs_request *req,
538 if (!ntvfs->next || !ntvfs->next->ops->seek) {
539 return NT_STATUS_NOT_IMPLEMENTED;
541 return ntvfs->next->ops->seek(ntvfs->next, req, io);
544 _PUBLIC_ NTSTATUS ntvfs_next_flush(struct ntvfs_module_context *ntvfs,
545 struct ntvfs_request *req,
546 union smb_flush *flush)
548 if (!ntvfs->next || !ntvfs->next->ops->flush) {
549 return NT_STATUS_NOT_IMPLEMENTED;
551 return ntvfs->next->ops->flush(ntvfs->next, req, flush);
554 _PUBLIC_ NTSTATUS ntvfs_next_lock(struct ntvfs_module_context *ntvfs,
555 struct ntvfs_request *req,
558 if (!ntvfs->next || !ntvfs->next->ops->lock) {
559 return NT_STATUS_NOT_IMPLEMENTED;
561 return ntvfs->next->ops->lock(ntvfs->next, req, lck);
564 _PUBLIC_ NTSTATUS ntvfs_next_qfileinfo(struct ntvfs_module_context *ntvfs,
565 struct ntvfs_request *req,
566 union smb_fileinfo *info)
568 if (!ntvfs->next || !ntvfs->next->ops->qfileinfo) {
569 return NT_STATUS_NOT_IMPLEMENTED;
571 return ntvfs->next->ops->qfileinfo(ntvfs->next, req, info);
574 _PUBLIC_ NTSTATUS ntvfs_next_setfileinfo(struct ntvfs_module_context *ntvfs,
575 struct ntvfs_request *req,
576 union smb_setfileinfo *info)
578 if (!ntvfs->next || !ntvfs->next->ops->setfileinfo) {
579 return NT_STATUS_NOT_IMPLEMENTED;
581 return ntvfs->next->ops->setfileinfo(ntvfs->next, req, info);
584 _PUBLIC_ NTSTATUS ntvfs_next_close(struct ntvfs_module_context *ntvfs,
585 struct ntvfs_request *req,
588 if (!ntvfs->next || !ntvfs->next->ops->close) {
589 return NT_STATUS_NOT_IMPLEMENTED;
591 return ntvfs->next->ops->close(ntvfs->next, req, io);
594 /* trans interface - used by IPC backend for pipes and RAP calls */
595 _PUBLIC_ NTSTATUS ntvfs_next_trans(struct ntvfs_module_context *ntvfs,
596 struct ntvfs_request *req,
597 struct smb_trans2 *trans)
599 if (!ntvfs->next || !ntvfs->next->ops->trans) {
600 return NT_STATUS_NOT_IMPLEMENTED;
602 return ntvfs->next->ops->trans(ntvfs->next, req, trans);
605 /* trans2 interface - only used by CIFS backend to prover complete passthru for testing */
606 _PUBLIC_ NTSTATUS ntvfs_next_trans2(struct ntvfs_module_context *ntvfs,
607 struct ntvfs_request *req,
608 struct smb_trans2 *trans2)
610 if (!ntvfs->next || !ntvfs->next->ops->trans2) {
611 return NT_STATUS_NOT_IMPLEMENTED;
613 return ntvfs->next->ops->trans2(ntvfs->next, req, trans2);
617 change notify request
619 _PUBLIC_ NTSTATUS ntvfs_next_notify(struct ntvfs_module_context *ntvfs,
620 struct ntvfs_request *req,
621 union smb_notify *info)
623 if (!ntvfs->next || !ntvfs->next->ops->notify) {
624 return NT_STATUS_NOT_IMPLEMENTED;
626 return ntvfs->next->ops->notify(ntvfs, req, info);
629 /* cancel - called to cancel an outstanding async request */
630 _PUBLIC_ NTSTATUS ntvfs_next_cancel(struct ntvfs_module_context *ntvfs,
631 struct ntvfs_request *req)
633 if (!ntvfs->next || !ntvfs->next->ops->cancel) {
634 return NT_STATUS_NOT_IMPLEMENTED;
636 return ntvfs->next->ops->cancel(ntvfs->next, req);
639 /* printing specific operations */
640 _PUBLIC_ NTSTATUS ntvfs_next_lpq(struct ntvfs_module_context *ntvfs,
641 struct ntvfs_request *req,
644 if (!ntvfs->next || !ntvfs->next->ops->lpq) {
645 return NT_STATUS_NOT_IMPLEMENTED;
647 return ntvfs->next->ops->lpq(ntvfs->next, req, lpq);
651 /* logoff - called when a vuid is closed */
652 _PUBLIC_ NTSTATUS ntvfs_next_logoff(struct ntvfs_module_context *ntvfs,
653 struct ntvfs_request *req)
655 if (!ntvfs->next || !ntvfs->next->ops->logoff) {
656 return NT_STATUS_NOT_IMPLEMENTED;
658 return ntvfs->next->ops->logoff(ntvfs->next, req);
661 _PUBLIC_ NTSTATUS ntvfs_next_exit(struct ntvfs_module_context *ntvfs,
662 struct ntvfs_request *req)
664 if (!ntvfs->next || !ntvfs->next->ops->exit) {
665 return NT_STATUS_NOT_IMPLEMENTED;
667 return ntvfs->next->ops->exit(ntvfs->next, req);