2 Unix SMB/CIFS implementation.
4 CIFS-on-CIFS NTVFS filesystem backend
6 Copyright (C) Andrew Tridgell 2003
7 Copyright (C) James J Myers 2003 <myersjj@samba.org>
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 2 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, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 this implements a CIFS->CIFS NTVFS filesystem backend.
29 #include "libcli/raw/libcliraw.h"
30 #include "libcli/smb_composite/smb_composite.h"
31 #include "smb_server/smb_server.h"
32 #include "smbd/service_stream.h"
33 #include "auth/auth.h"
34 #include "ntvfs/ntvfs.h"
36 /* this is stored in ntvfs_private */
38 struct smbcli_tree *tree;
39 struct smbcli_transport *transport;
40 struct smbsrv_tcon *tcon;
45 /* a structure used to pass information to an async handler */
47 struct smbsrv_request *req;
51 #define SETUP_PID private->tree->session->pid = SVAL(req->in.hdr, HDR_PID)
54 a handler for oplock break events from the server - these need to be passed
57 static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uint16_t fnum, uint8_t level, void *p_private)
59 struct cvfs_private *private = p_private;
61 DEBUG(5,("vfs_cifs: sending oplock break level %d for fnum %d\n", level, fnum));
62 return req_send_oplock_break(private->tcon, fnum, level);
66 connect to a share - used when a tree_connect operation comes in.
68 static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
69 struct smbsrv_request *req, const char *sharename)
71 struct smbsrv_tcon *tcon = req->tcon;
73 struct cvfs_private *private;
74 const char *host, *user, *pass, *domain, *remote_share;
75 struct smb_composite_connect io;
76 struct composite_context *creq;
78 struct cli_credentials *credentials;
81 /* Here we need to determine which server to connect to.
82 * For now we use parametric options, type cifs.
83 * Later we will use security=server and auth_server.c.
85 host = lp_parm_string(req->tcon->service, "cifs", "server");
86 user = lp_parm_string(req->tcon->service, "cifs", "user");
87 pass = lp_parm_string(req->tcon->service, "cifs", "password");
88 domain = lp_parm_string(req->tcon->service, "cifs", "domain");
89 remote_share = lp_parm_string(req->tcon->service, "cifs", "share");
91 remote_share = sharename;
94 machine_account = lp_parm_bool(req->tcon->service, "cifs", "use_machine_account", False);
96 private = talloc(ntvfs, struct cvfs_private);
98 return NT_STATUS_NO_MEMORY;
100 ZERO_STRUCTP(private);
102 ntvfs->private_data = private;
105 DEBUG(1,("CIFS backend: You must supply server\n"));
106 return NT_STATUS_INVALID_PARAMETER;
110 DEBUG(5, ("CIFS backend: Using specified password\n"));
111 credentials = cli_credentials_init(private);
113 return NT_STATUS_NO_MEMORY;
115 cli_credentials_set_conf(credentials);
116 cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
118 cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
120 cli_credentials_set_password(credentials, pass, CRED_SPECIFIED);
121 } else if (machine_account) {
122 DEBUG(5, ("CIFS backend: Using machine account\n"));
123 credentials = cli_credentials_init(private);
124 cli_credentials_set_conf(credentials);
126 cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
128 status = cli_credentials_set_machine_account(credentials);
129 if (!NT_STATUS_IS_OK(status)) {
132 } else if (req->session->session_info->credentials) {
133 DEBUG(5, ("CIFS backend: Using delegated credentials\n"));
134 credentials = req->session->session_info->credentials;
136 DEBUG(1,("CIFS backend: You must supply server, user and password and or have delegated credentials\n"));
137 return NT_STATUS_INVALID_PARAMETER;
140 /* connect to the server, using the smbd event context */
141 io.in.dest_host = host;
143 io.in.called_name = host;
144 io.in.credentials = credentials;
145 io.in.fallback_to_anonymous = False;
146 io.in.workgroup = lp_workgroup();
147 io.in.service = remote_share;
148 io.in.service_type = "?????";
150 creq = smb_composite_connect_send(&io, private, tcon->smb_conn->connection->event.ctx);
151 status = smb_composite_connect_recv(creq, private);
152 NT_STATUS_NOT_OK_RETURN(status);
154 private->tree = io.out.tree;
156 private->transport = private->tree->session->transport;
158 private->tcon = req->tcon;
160 tcon->fs_type = talloc_strdup(tcon, "NTFS");
161 tcon->dev_type = talloc_strdup(tcon, "A:");
163 /* we need to receive oplock break requests from the server */
164 smbcli_oplock_handler(private->transport, oplock_handler, private);
166 private->map_generic = lp_parm_bool(req->tcon->service,
167 "cifs", "mapgeneric", False);
173 disconnect from a share
175 static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs,
176 struct smbsrv_tcon *tcon)
178 struct cvfs_private *private = ntvfs->private_data;
180 talloc_free(private);
181 ntvfs->private_data = NULL;
187 a handler for simple async replies
188 this handler can only be used for functions that don't return any
189 parameters (those that just return a status code)
191 static void async_simple(struct smbcli_request *c_req)
193 struct async_info *async = c_req->async.private;
194 struct smbsrv_request *req = async->req;
195 req->async_states->status = smbcli_request_simple_recv(c_req);
196 req->async_states->send_fn(req);
200 /* save some typing for the simple functions */
201 #define ASYNC_RECV_TAIL(io, async_fn) do { \
202 if (!c_req) return NT_STATUS_UNSUCCESSFUL; \
204 struct async_info *async; \
205 async = talloc(req, struct async_info); \
206 if (!async) return NT_STATUS_NO_MEMORY; \
209 c_req->async.private = async; \
211 c_req->async.fn = async_fn; \
212 req->async_states->state |= NTVFS_ASYNC_STATE_ASYNC; \
213 return NT_STATUS_OK; \
216 #define SIMPLE_ASYNC_TAIL ASYNC_RECV_TAIL(NULL, async_simple)
219 delete a file - the dirtype specifies the file types to include in the search.
220 The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
222 static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs,
223 struct smbsrv_request *req, struct smb_unlink *unl)
225 struct cvfs_private *private = ntvfs->private_data;
226 struct smbcli_request *c_req;
230 /* see if the front end will allow us to perform this
231 function asynchronously. */
232 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
233 return smb_raw_unlink(private->tree, unl);
236 c_req = smb_raw_unlink_send(private->tree, unl);
242 a handler for async ioctl replies
244 static void async_ioctl(struct smbcli_request *c_req)
246 struct async_info *async = c_req->async.private;
247 struct smbsrv_request *req = async->req;
248 req->async_states->status = smb_raw_ioctl_recv(c_req, req, async->parms);
249 req->async_states->send_fn(req);
255 static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs,
256 struct smbsrv_request *req, union smb_ioctl *io)
258 struct cvfs_private *private = ntvfs->private_data;
259 struct smbcli_request *c_req;
263 /* see if the front end will allow us to perform this
264 function asynchronously. */
265 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
266 return smb_raw_ioctl(private->tree, req, io);
269 c_req = smb_raw_ioctl_send(private->tree, io);
271 ASYNC_RECV_TAIL(io, async_ioctl);
275 check if a directory exists
277 static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs,
278 struct smbsrv_request *req, struct smb_chkpath *cp)
280 struct cvfs_private *private = ntvfs->private_data;
281 struct smbcli_request *c_req;
285 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
286 return smb_raw_chkpath(private->tree, cp);
289 c_req = smb_raw_chkpath_send(private->tree, cp);
295 a handler for async qpathinfo replies
297 static void async_qpathinfo(struct smbcli_request *c_req)
299 struct async_info *async = c_req->async.private;
300 struct smbsrv_request *req = async->req;
301 req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
302 req->async_states->send_fn(req);
306 return info on a pathname
308 static NTSTATUS cvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
309 struct smbsrv_request *req, union smb_fileinfo *info)
311 struct cvfs_private *private = ntvfs->private_data;
312 struct smbcli_request *c_req;
316 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
317 return smb_raw_pathinfo(private->tree, req, info);
320 c_req = smb_raw_pathinfo_send(private->tree, info);
322 ASYNC_RECV_TAIL(info, async_qpathinfo);
326 a handler for async qfileinfo replies
328 static void async_qfileinfo(struct smbcli_request *c_req)
330 struct async_info *async = c_req->async.private;
331 struct smbsrv_request *req = async->req;
332 req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
333 req->async_states->send_fn(req);
337 query info on a open file
339 static NTSTATUS cvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
340 struct smbsrv_request *req, union smb_fileinfo *info)
342 struct cvfs_private *private = ntvfs->private_data;
343 struct smbcli_request *c_req;
347 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
348 return smb_raw_fileinfo(private->tree, req, info);
351 c_req = smb_raw_fileinfo_send(private->tree, info);
353 ASYNC_RECV_TAIL(info, async_qfileinfo);
358 set info on a pathname
360 static NTSTATUS cvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
361 struct smbsrv_request *req, union smb_setfileinfo *st)
363 struct cvfs_private *private = ntvfs->private_data;
364 struct smbcli_request *c_req;
368 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
369 return smb_raw_setpathinfo(private->tree, st);
372 c_req = smb_raw_setpathinfo_send(private->tree, st);
379 a handler for async open replies
381 static void async_open(struct smbcli_request *c_req)
383 struct async_info *async = c_req->async.private;
384 struct smbsrv_request *req = async->req;
385 req->async_states->status = smb_raw_open_recv(c_req, req, async->parms);
386 req->async_states->send_fn(req);
392 static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
393 struct smbsrv_request *req, union smb_open *io)
395 struct cvfs_private *private = ntvfs->private_data;
396 struct smbcli_request *c_req;
400 if (io->generic.level != RAW_OPEN_GENERIC &&
401 private->map_generic) {
402 return ntvfs_map_open(req, io, ntvfs);
405 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
406 return smb_raw_open(private->tree, req, io);
409 c_req = smb_raw_open_send(private->tree, io);
411 ASYNC_RECV_TAIL(io, async_open);
417 static NTSTATUS cvfs_mkdir(struct ntvfs_module_context *ntvfs,
418 struct smbsrv_request *req, union smb_mkdir *md)
420 struct cvfs_private *private = ntvfs->private_data;
421 struct smbcli_request *c_req;
425 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
426 return smb_raw_mkdir(private->tree, md);
429 c_req = smb_raw_mkdir_send(private->tree, md);
437 static NTSTATUS cvfs_rmdir(struct ntvfs_module_context *ntvfs,
438 struct smbsrv_request *req, struct smb_rmdir *rd)
440 struct cvfs_private *private = ntvfs->private_data;
441 struct smbcli_request *c_req;
445 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
446 return smb_raw_rmdir(private->tree, rd);
448 c_req = smb_raw_rmdir_send(private->tree, rd);
454 rename a set of files
456 static NTSTATUS cvfs_rename(struct ntvfs_module_context *ntvfs,
457 struct smbsrv_request *req, union smb_rename *ren)
459 struct cvfs_private *private = ntvfs->private_data;
460 struct smbcli_request *c_req;
464 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
465 return smb_raw_rename(private->tree, ren);
468 c_req = smb_raw_rename_send(private->tree, ren);
476 static NTSTATUS cvfs_copy(struct ntvfs_module_context *ntvfs,
477 struct smbsrv_request *req, struct smb_copy *cp)
479 return NT_STATUS_NOT_SUPPORTED;
483 a handler for async read replies
485 static void async_read(struct smbcli_request *c_req)
487 struct async_info *async = c_req->async.private;
488 struct smbsrv_request *req = async->req;
489 req->async_states->status = smb_raw_read_recv(c_req, async->parms);
490 req->async_states->send_fn(req);
496 static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
497 struct smbsrv_request *req, union smb_read *rd)
499 struct cvfs_private *private = ntvfs->private_data;
500 struct smbcli_request *c_req;
504 if (rd->generic.level != RAW_READ_GENERIC &&
505 private->map_generic) {
506 return ntvfs_map_read(req, rd, ntvfs);
509 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
510 return smb_raw_read(private->tree, rd);
513 c_req = smb_raw_read_send(private->tree, rd);
515 ASYNC_RECV_TAIL(rd, async_read);
519 a handler for async write replies
521 static void async_write(struct smbcli_request *c_req)
523 struct async_info *async = c_req->async.private;
524 struct smbsrv_request *req = async->req;
525 req->async_states->status = smb_raw_write_recv(c_req, async->parms);
526 req->async_states->send_fn(req);
532 static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
533 struct smbsrv_request *req, union smb_write *wr)
535 struct cvfs_private *private = ntvfs->private_data;
536 struct smbcli_request *c_req;
540 if (wr->generic.level != RAW_WRITE_GENERIC &&
541 private->map_generic) {
542 return ntvfs_map_write(req, wr, ntvfs);
545 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
546 return smb_raw_write(private->tree, wr);
549 c_req = smb_raw_write_send(private->tree, wr);
551 ASYNC_RECV_TAIL(wr, async_write);
555 a handler for async seek replies
557 static void async_seek(struct smbcli_request *c_req)
559 struct async_info *async = c_req->async.private;
560 struct smbsrv_request *req = async->req;
561 req->async_states->status = smb_raw_seek_recv(c_req, async->parms);
562 req->async_states->send_fn(req);
568 static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs,
569 struct smbsrv_request *req, struct smb_seek *io)
571 struct cvfs_private *private = ntvfs->private_data;
572 struct smbcli_request *c_req;
576 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
577 return smb_raw_seek(private->tree, io);
580 c_req = smb_raw_seek_send(private->tree, io);
582 ASYNC_RECV_TAIL(io, async_seek);
588 static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs,
589 struct smbsrv_request *req, struct smb_flush *io)
591 struct cvfs_private *private = ntvfs->private_data;
592 struct smbcli_request *c_req;
596 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
597 return smb_raw_flush(private->tree, io);
600 c_req = smb_raw_flush_send(private->tree, io);
608 static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs,
609 struct smbsrv_request *req, union smb_close *io)
611 struct cvfs_private *private = ntvfs->private_data;
612 struct smbcli_request *c_req;
616 if (io->generic.level != RAW_CLOSE_GENERIC &&
617 private->map_generic) {
618 return ntvfs_map_close(req, io, ntvfs);
621 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
622 return smb_raw_close(private->tree, io);
625 c_req = smb_raw_close_send(private->tree, io);
631 exit - closing files open by the pid
633 static NTSTATUS cvfs_exit(struct ntvfs_module_context *ntvfs,
634 struct smbsrv_request *req)
636 struct cvfs_private *private = ntvfs->private_data;
637 struct smbcli_request *c_req;
641 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
642 return smb_raw_exit(private->tree->session);
645 c_req = smb_raw_exit_send(private->tree->session);
651 logoff - closing files open by the user
653 static NTSTATUS cvfs_logoff(struct ntvfs_module_context *ntvfs,
654 struct smbsrv_request *req)
656 /* we can't do this right in the cifs backend .... */
661 setup for an async call - nothing to do yet
663 static NTSTATUS cvfs_async_setup(struct ntvfs_module_context *ntvfs,
664 struct smbsrv_request *req,
673 static NTSTATUS cvfs_cancel(struct ntvfs_module_context *ntvfs,
674 struct smbsrv_request *req)
676 return NT_STATUS_NOT_IMPLEMENTED;
682 static NTSTATUS cvfs_lock(struct ntvfs_module_context *ntvfs,
683 struct smbsrv_request *req, union smb_lock *lck)
685 struct cvfs_private *private = ntvfs->private_data;
686 struct smbcli_request *c_req;
690 if (lck->generic.level != RAW_LOCK_GENERIC &&
691 private->map_generic) {
692 return ntvfs_map_lock(req, lck, ntvfs);
695 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
696 return smb_raw_lock(private->tree, lck);
699 c_req = smb_raw_lock_send(private->tree, lck);
704 set info on a open file
706 static NTSTATUS cvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
707 struct smbsrv_request *req,
708 union smb_setfileinfo *info)
710 struct cvfs_private *private = ntvfs->private_data;
711 struct smbcli_request *c_req;
715 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
716 return smb_raw_setfileinfo(private->tree, info);
718 c_req = smb_raw_setfileinfo_send(private->tree, info);
725 a handler for async fsinfo replies
727 static void async_fsinfo(struct smbcli_request *c_req)
729 struct async_info *async = c_req->async.private;
730 struct smbsrv_request *req = async->req;
731 req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
732 req->async_states->send_fn(req);
736 return filesystem space info
738 static NTSTATUS cvfs_fsinfo(struct ntvfs_module_context *ntvfs,
739 struct smbsrv_request *req, union smb_fsinfo *fs)
741 struct cvfs_private *private = ntvfs->private_data;
742 struct smbcli_request *c_req;
746 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
747 return smb_raw_fsinfo(private->tree, req, fs);
750 c_req = smb_raw_fsinfo_send(private->tree, req, fs);
752 ASYNC_RECV_TAIL(fs, async_fsinfo);
756 return print queue info
758 static NTSTATUS cvfs_lpq(struct ntvfs_module_context *ntvfs,
759 struct smbsrv_request *req, union smb_lpq *lpq)
761 return NT_STATUS_NOT_SUPPORTED;
765 list files in a directory matching a wildcard pattern
767 static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs,
768 struct smbsrv_request *req, union smb_search_first *io,
769 void *search_private,
770 BOOL (*callback)(void *, union smb_search_data *))
772 struct cvfs_private *private = ntvfs->private_data;
776 return smb_raw_search_first(private->tree, req, io, search_private, callback);
779 /* continue a search */
780 static NTSTATUS cvfs_search_next(struct ntvfs_module_context *ntvfs,
781 struct smbsrv_request *req, union smb_search_next *io,
782 void *search_private,
783 BOOL (*callback)(void *, union smb_search_data *))
785 struct cvfs_private *private = ntvfs->private_data;
789 return smb_raw_search_next(private->tree, req, io, search_private, callback);
793 static NTSTATUS cvfs_search_close(struct ntvfs_module_context *ntvfs,
794 struct smbsrv_request *req, union smb_search_close *io)
796 struct cvfs_private *private = ntvfs->private_data;
800 return smb_raw_search_close(private->tree, io);
804 a handler for async trans2 replies
806 static void async_trans2(struct smbcli_request *c_req)
808 struct async_info *async = c_req->async.private;
809 struct smbsrv_request *req = async->req;
810 req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
811 req->async_states->send_fn(req);
815 static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
816 struct smbsrv_request *req, struct smb_trans2 *trans2)
818 struct cvfs_private *private = ntvfs->private_data;
819 struct smbcli_request *c_req;
823 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
824 return smb_raw_trans2(private->tree, req, trans2);
827 c_req = smb_raw_trans2_send(private->tree, trans2);
829 ASYNC_RECV_TAIL(trans2, async_trans2);
833 /* SMBtrans - not used on file shares */
834 static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
835 struct smbsrv_request *req, struct smb_trans2 *trans2)
837 return NT_STATUS_ACCESS_DENIED;
841 initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem
843 NTSTATUS ntvfs_cifs_init(void)
846 struct ntvfs_ops ops;
850 /* fill in the name and type */
852 ops.type = NTVFS_DISK;
854 /* fill in all the operations */
855 ops.connect = cvfs_connect;
856 ops.disconnect = cvfs_disconnect;
857 ops.unlink = cvfs_unlink;
858 ops.chkpath = cvfs_chkpath;
859 ops.qpathinfo = cvfs_qpathinfo;
860 ops.setpathinfo = cvfs_setpathinfo;
861 ops.openfile = cvfs_open;
862 ops.mkdir = cvfs_mkdir;
863 ops.rmdir = cvfs_rmdir;
864 ops.rename = cvfs_rename;
865 ops.copy = cvfs_copy;
866 ops.ioctl = cvfs_ioctl;
867 ops.read = cvfs_read;
868 ops.write = cvfs_write;
869 ops.seek = cvfs_seek;
870 ops.flush = cvfs_flush;
871 ops.close = cvfs_close;
872 ops.exit = cvfs_exit;
873 ops.lock = cvfs_lock;
874 ops.setfileinfo = cvfs_setfileinfo;
875 ops.qfileinfo = cvfs_qfileinfo;
876 ops.fsinfo = cvfs_fsinfo;
878 ops.search_first = cvfs_search_first;
879 ops.search_next = cvfs_search_next;
880 ops.search_close = cvfs_search_close;
881 ops.trans = cvfs_trans;
882 ops.logoff = cvfs_logoff;
883 ops.async_setup = cvfs_async_setup;
884 ops.cancel = cvfs_cancel;
886 if (lp_parm_bool(-1, "cifs", "maptrans2", False)) {
887 ops.trans2 = cvfs_trans2;
890 /* register ourselves with the NTVFS subsystem. We register
891 under the name 'cifs'. */
892 ret = ntvfs_register(&ops);
894 if (!NT_STATUS_IS_OK(ret)) {
895 DEBUG(0,("Failed to register CIFS backend!\n"));