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 "lib/events/events.h"
30 #include "libcli/raw/libcliraw.h"
31 #include "libcli/composite/composite.h"
32 #include "libcli/smb_composite/smb_composite.h"
33 #include "smb_server/smb_server.h"
34 #include "smbd/service_stream.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 a handler for read events on a connection to a backend server
68 static void cifs_socket_handler(struct event_context *ev, struct fd_event *fde,
69 uint16_t flags, void *private)
71 struct cvfs_private *cvfs = talloc_get_type(private, struct cvfs_private);
72 struct smbsrv_tcon *tcon = cvfs->tcon;
74 if (!smbcli_transport_process(cvfs->transport)) {
75 /* the connection to our server is dead */
81 connect to a share - used when a tree_connect operation comes in.
83 static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
84 struct smbsrv_request *req, const char *sharename)
86 struct smbsrv_tcon *tcon = req->tcon;
88 struct cvfs_private *private;
89 const char *host, *user, *pass, *domain, *remote_share;
90 struct smb_composite_connect io;
91 struct composite_context *creq;
94 struct cli_credentials *credentials;
96 /* Here we need to determine which server to connect to.
97 * For now we use parametric options, type cifs.
98 * Later we will use security=server and auth_server.c.
100 host = lp_parm_string(req->tcon->service, "cifs", "server");
101 user = lp_parm_string(req->tcon->service, "cifs", "user");
102 pass = lp_parm_string(req->tcon->service, "cifs", "password");
103 domain = lp_parm_string(req->tcon->service, "cifs", "domain");
104 remote_share = lp_parm_string(req->tcon->service, "cifs", "share");
106 remote_share = sharename;
109 if (!host || !user || !pass || !domain) {
110 DEBUG(1,("CIFS backend: You must supply server, user, password and domain\n"));
111 return NT_STATUS_INVALID_PARAMETER;
114 private = talloc(req->tcon, struct cvfs_private);
116 return NT_STATUS_NO_MEMORY;
118 ZERO_STRUCTP(private);
120 ntvfs->private_data = private;
122 credentials = cli_credentials_init(private);
123 cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
124 cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
125 cli_credentials_set_password(credentials, pass, CRED_SPECIFIED);
126 cli_credentials_set_workstation(credentials, "vfs_cifs", CRED_SPECIFIED);
128 /* connect to the server, using the smbd event context */
129 io.in.dest_host = host;
131 io.in.called_name = host;
132 io.in.credentials = credentials;
133 io.in.workgroup = lp_workgroup();
134 io.in.service = remote_share;
135 io.in.service_type = "?????";
137 creq = smb_composite_connect_send(&io, tcon->smb_conn->connection->event.ctx);
138 status = smb_composite_connect_recv(creq, private);
139 NT_STATUS_NOT_OK_RETURN(status);
141 private->tree = io.out.tree;
143 private->transport = private->tree->session->transport;
145 private->tcon = req->tcon;
147 tcon->fs_type = talloc_strdup(tcon, "NTFS");
148 tcon->dev_type = talloc_strdup(tcon, "A:");
150 /* we need to receive oplock break requests from the server */
151 smbcli_oplock_handler(private->transport, oplock_handler, private);
153 /* take over event handling for this socket */
154 talloc_free(private->transport->socket->event.fde);
155 fde = event_add_fd(private->transport->socket->event.ctx,
157 socket_get_fd(private->transport->socket->sock),
158 EVENT_FD_READ | EVENT_FD_WRITE,
161 private->transport->socket->event.fde = fde;
164 private->map_generic = lp_parm_bool(req->tcon->service,
165 "cifs", "mapgeneric", False);
171 disconnect from a share
173 static NTSTATUS cvfs_disconnect(struct ntvfs_module_context *ntvfs,
174 struct smbsrv_tcon *tcon)
176 struct cvfs_private *private = ntvfs->private_data;
178 talloc_free(private);
184 a handler for simple async replies
185 this handler can only be used for functions that don't return any
186 parameters (those that just return a status code)
188 static void async_simple(struct smbcli_request *c_req)
190 struct async_info *async = c_req->async.private;
191 struct smbsrv_request *req = async->req;
192 req->async_states->status = smbcli_request_simple_recv(c_req);
193 req->async_states->send_fn(req);
197 /* save some typing for the simple functions */
198 #define ASYNC_RECV_TAIL(io, async_fn) do { \
199 if (!c_req) return NT_STATUS_UNSUCCESSFUL; \
201 struct async_info *async; \
202 async = talloc(req, struct async_info); \
203 if (!async) return NT_STATUS_NO_MEMORY; \
206 c_req->async.private = async; \
208 c_req->async.fn = async_fn; \
209 req->async_states->state |= NTVFS_ASYNC_STATE_ASYNC; \
210 return NT_STATUS_OK; \
213 #define SIMPLE_ASYNC_TAIL ASYNC_RECV_TAIL(NULL, async_simple)
216 delete a file - the dirtype specifies the file types to include in the search.
217 The name can contain CIFS wildcards, but rarely does (except with OS/2 clients)
219 static NTSTATUS cvfs_unlink(struct ntvfs_module_context *ntvfs,
220 struct smbsrv_request *req, struct smb_unlink *unl)
222 struct cvfs_private *private = ntvfs->private_data;
223 struct smbcli_request *c_req;
227 /* see if the front end will allow us to perform this
228 function asynchronously. */
229 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
230 return smb_raw_unlink(private->tree, unl);
233 c_req = smb_raw_unlink_send(private->tree, unl);
239 a handler for async ioctl replies
241 static void async_ioctl(struct smbcli_request *c_req)
243 struct async_info *async = c_req->async.private;
244 struct smbsrv_request *req = async->req;
245 req->async_states->status = smb_raw_ioctl_recv(c_req, req, async->parms);
246 req->async_states->send_fn(req);
252 static NTSTATUS cvfs_ioctl(struct ntvfs_module_context *ntvfs,
253 struct smbsrv_request *req, union smb_ioctl *io)
255 struct cvfs_private *private = ntvfs->private_data;
256 struct smbcli_request *c_req;
260 /* see if the front end will allow us to perform this
261 function asynchronously. */
262 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
263 return smb_raw_ioctl(private->tree, req, io);
266 c_req = smb_raw_ioctl_send(private->tree, io);
268 ASYNC_RECV_TAIL(io, async_ioctl);
272 check if a directory exists
274 static NTSTATUS cvfs_chkpath(struct ntvfs_module_context *ntvfs,
275 struct smbsrv_request *req, struct smb_chkpath *cp)
277 struct cvfs_private *private = ntvfs->private_data;
278 struct smbcli_request *c_req;
282 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
283 return smb_raw_chkpath(private->tree, cp);
286 c_req = smb_raw_chkpath_send(private->tree, cp);
292 a handler for async qpathinfo replies
294 static void async_qpathinfo(struct smbcli_request *c_req)
296 struct async_info *async = c_req->async.private;
297 struct smbsrv_request *req = async->req;
298 req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
299 req->async_states->send_fn(req);
303 return info on a pathname
305 static NTSTATUS cvfs_qpathinfo(struct ntvfs_module_context *ntvfs,
306 struct smbsrv_request *req, union smb_fileinfo *info)
308 struct cvfs_private *private = ntvfs->private_data;
309 struct smbcli_request *c_req;
313 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
314 return smb_raw_pathinfo(private->tree, req, info);
317 c_req = smb_raw_pathinfo_send(private->tree, info);
319 ASYNC_RECV_TAIL(info, async_qpathinfo);
323 a handler for async qfileinfo replies
325 static void async_qfileinfo(struct smbcli_request *c_req)
327 struct async_info *async = c_req->async.private;
328 struct smbsrv_request *req = async->req;
329 req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
330 req->async_states->send_fn(req);
334 query info on a open file
336 static NTSTATUS cvfs_qfileinfo(struct ntvfs_module_context *ntvfs,
337 struct smbsrv_request *req, union smb_fileinfo *info)
339 struct cvfs_private *private = ntvfs->private_data;
340 struct smbcli_request *c_req;
344 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
345 return smb_raw_fileinfo(private->tree, req, info);
348 c_req = smb_raw_fileinfo_send(private->tree, info);
350 ASYNC_RECV_TAIL(info, async_qfileinfo);
355 set info on a pathname
357 static NTSTATUS cvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
358 struct smbsrv_request *req, union smb_setfileinfo *st)
360 struct cvfs_private *private = ntvfs->private_data;
361 struct smbcli_request *c_req;
365 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
366 return smb_raw_setpathinfo(private->tree, st);
369 c_req = smb_raw_setpathinfo_send(private->tree, st);
376 a handler for async open replies
378 static void async_open(struct smbcli_request *c_req)
380 struct async_info *async = c_req->async.private;
381 struct smbsrv_request *req = async->req;
382 req->async_states->status = smb_raw_open_recv(c_req, req, async->parms);
383 req->async_states->send_fn(req);
389 static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
390 struct smbsrv_request *req, union smb_open *io)
392 struct cvfs_private *private = ntvfs->private_data;
393 struct smbcli_request *c_req;
397 if (io->generic.level != RAW_OPEN_GENERIC &&
398 private->map_generic) {
399 return ntvfs_map_open(req, io, ntvfs);
402 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
403 return smb_raw_open(private->tree, req, io);
406 c_req = smb_raw_open_send(private->tree, io);
408 ASYNC_RECV_TAIL(io, async_open);
414 static NTSTATUS cvfs_mkdir(struct ntvfs_module_context *ntvfs,
415 struct smbsrv_request *req, union smb_mkdir *md)
417 struct cvfs_private *private = ntvfs->private_data;
418 struct smbcli_request *c_req;
422 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
423 return smb_raw_mkdir(private->tree, md);
426 c_req = smb_raw_mkdir_send(private->tree, md);
434 static NTSTATUS cvfs_rmdir(struct ntvfs_module_context *ntvfs,
435 struct smbsrv_request *req, struct smb_rmdir *rd)
437 struct cvfs_private *private = ntvfs->private_data;
438 struct smbcli_request *c_req;
442 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
443 return smb_raw_rmdir(private->tree, rd);
445 c_req = smb_raw_rmdir_send(private->tree, rd);
451 rename a set of files
453 static NTSTATUS cvfs_rename(struct ntvfs_module_context *ntvfs,
454 struct smbsrv_request *req, union smb_rename *ren)
456 struct cvfs_private *private = ntvfs->private_data;
457 struct smbcli_request *c_req;
461 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
462 return smb_raw_rename(private->tree, ren);
465 c_req = smb_raw_rename_send(private->tree, ren);
473 static NTSTATUS cvfs_copy(struct ntvfs_module_context *ntvfs,
474 struct smbsrv_request *req, struct smb_copy *cp)
476 return NT_STATUS_NOT_SUPPORTED;
480 a handler for async read replies
482 static void async_read(struct smbcli_request *c_req)
484 struct async_info *async = c_req->async.private;
485 struct smbsrv_request *req = async->req;
486 req->async_states->status = smb_raw_read_recv(c_req, async->parms);
487 req->async_states->send_fn(req);
493 static NTSTATUS cvfs_read(struct ntvfs_module_context *ntvfs,
494 struct smbsrv_request *req, union smb_read *rd)
496 struct cvfs_private *private = ntvfs->private_data;
497 struct smbcli_request *c_req;
501 if (rd->generic.level != RAW_READ_GENERIC &&
502 private->map_generic) {
503 return ntvfs_map_read(req, rd, ntvfs);
506 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
507 return smb_raw_read(private->tree, rd);
510 c_req = smb_raw_read_send(private->tree, rd);
512 ASYNC_RECV_TAIL(rd, async_read);
516 a handler for async write replies
518 static void async_write(struct smbcli_request *c_req)
520 struct async_info *async = c_req->async.private;
521 struct smbsrv_request *req = async->req;
522 req->async_states->status = smb_raw_write_recv(c_req, async->parms);
523 req->async_states->send_fn(req);
529 static NTSTATUS cvfs_write(struct ntvfs_module_context *ntvfs,
530 struct smbsrv_request *req, union smb_write *wr)
532 struct cvfs_private *private = ntvfs->private_data;
533 struct smbcli_request *c_req;
537 if (wr->generic.level != RAW_WRITE_GENERIC &&
538 private->map_generic) {
539 return ntvfs_map_write(req, wr, ntvfs);
542 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
543 return smb_raw_write(private->tree, wr);
546 c_req = smb_raw_write_send(private->tree, wr);
548 ASYNC_RECV_TAIL(wr, async_write);
552 a handler for async seek replies
554 static void async_seek(struct smbcli_request *c_req)
556 struct async_info *async = c_req->async.private;
557 struct smbsrv_request *req = async->req;
558 req->async_states->status = smb_raw_seek_recv(c_req, async->parms);
559 req->async_states->send_fn(req);
565 static NTSTATUS cvfs_seek(struct ntvfs_module_context *ntvfs,
566 struct smbsrv_request *req, struct smb_seek *io)
568 struct cvfs_private *private = ntvfs->private_data;
569 struct smbcli_request *c_req;
573 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
574 return smb_raw_seek(private->tree, io);
577 c_req = smb_raw_seek_send(private->tree, io);
579 ASYNC_RECV_TAIL(io, async_seek);
585 static NTSTATUS cvfs_flush(struct ntvfs_module_context *ntvfs,
586 struct smbsrv_request *req, struct smb_flush *io)
588 struct cvfs_private *private = ntvfs->private_data;
589 struct smbcli_request *c_req;
593 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
594 return smb_raw_flush(private->tree, io);
597 c_req = smb_raw_flush_send(private->tree, io);
605 static NTSTATUS cvfs_close(struct ntvfs_module_context *ntvfs,
606 struct smbsrv_request *req, union smb_close *io)
608 struct cvfs_private *private = ntvfs->private_data;
609 struct smbcli_request *c_req;
613 if (io->generic.level != RAW_CLOSE_GENERIC &&
614 private->map_generic) {
615 return ntvfs_map_close(req, io, ntvfs);
618 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
619 return smb_raw_close(private->tree, io);
622 c_req = smb_raw_close_send(private->tree, io);
628 exit - closing files open by the pid
630 static NTSTATUS cvfs_exit(struct ntvfs_module_context *ntvfs,
631 struct smbsrv_request *req)
633 struct cvfs_private *private = ntvfs->private_data;
634 struct smbcli_request *c_req;
638 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
639 return smb_raw_exit(private->tree->session);
642 c_req = smb_raw_exit_send(private->tree->session);
648 logoff - closing files open by the user
650 static NTSTATUS cvfs_logoff(struct ntvfs_module_context *ntvfs,
651 struct smbsrv_request *req)
653 /* we can't do this right in the cifs backend .... */
658 setup for an async call - nothing to do yet
660 static NTSTATUS cvfs_async_setup(struct ntvfs_module_context *ntvfs,
661 struct smbsrv_request *req,
670 static NTSTATUS cvfs_cancel(struct ntvfs_module_context *ntvfs,
671 struct smbsrv_request *req)
673 return NT_STATUS_NOT_IMPLEMENTED;
679 static NTSTATUS cvfs_lock(struct ntvfs_module_context *ntvfs,
680 struct smbsrv_request *req, union smb_lock *lck)
682 struct cvfs_private *private = ntvfs->private_data;
683 struct smbcli_request *c_req;
687 if (lck->generic.level != RAW_LOCK_GENERIC &&
688 private->map_generic) {
689 return ntvfs_map_lock(req, lck, ntvfs);
692 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
693 return smb_raw_lock(private->tree, lck);
696 c_req = smb_raw_lock_send(private->tree, lck);
701 set info on a open file
703 static NTSTATUS cvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
704 struct smbsrv_request *req,
705 union smb_setfileinfo *info)
707 struct cvfs_private *private = ntvfs->private_data;
708 struct smbcli_request *c_req;
712 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
713 return smb_raw_setfileinfo(private->tree, info);
715 c_req = smb_raw_setfileinfo_send(private->tree, info);
722 a handler for async fsinfo replies
724 static void async_fsinfo(struct smbcli_request *c_req)
726 struct async_info *async = c_req->async.private;
727 struct smbsrv_request *req = async->req;
728 req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
729 req->async_states->send_fn(req);
733 return filesystem space info
735 static NTSTATUS cvfs_fsinfo(struct ntvfs_module_context *ntvfs,
736 struct smbsrv_request *req, union smb_fsinfo *fs)
738 struct cvfs_private *private = ntvfs->private_data;
739 struct smbcli_request *c_req;
743 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
744 return smb_raw_fsinfo(private->tree, req, fs);
747 c_req = smb_raw_fsinfo_send(private->tree, req, fs);
749 ASYNC_RECV_TAIL(fs, async_fsinfo);
753 return print queue info
755 static NTSTATUS cvfs_lpq(struct ntvfs_module_context *ntvfs,
756 struct smbsrv_request *req, union smb_lpq *lpq)
758 return NT_STATUS_NOT_SUPPORTED;
762 list files in a directory matching a wildcard pattern
764 static NTSTATUS cvfs_search_first(struct ntvfs_module_context *ntvfs,
765 struct smbsrv_request *req, union smb_search_first *io,
766 void *search_private,
767 BOOL (*callback)(void *, union smb_search_data *))
769 struct cvfs_private *private = ntvfs->private_data;
773 return smb_raw_search_first(private->tree, req, io, search_private, callback);
776 /* continue a search */
777 static NTSTATUS cvfs_search_next(struct ntvfs_module_context *ntvfs,
778 struct smbsrv_request *req, union smb_search_next *io,
779 void *search_private,
780 BOOL (*callback)(void *, union smb_search_data *))
782 struct cvfs_private *private = ntvfs->private_data;
786 return smb_raw_search_next(private->tree, req, io, search_private, callback);
790 static NTSTATUS cvfs_search_close(struct ntvfs_module_context *ntvfs,
791 struct smbsrv_request *req, union smb_search_close *io)
793 struct cvfs_private *private = ntvfs->private_data;
797 return smb_raw_search_close(private->tree, io);
801 a handler for async trans2 replies
803 static void async_trans2(struct smbcli_request *c_req)
805 struct async_info *async = c_req->async.private;
806 struct smbsrv_request *req = async->req;
807 req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
808 req->async_states->send_fn(req);
812 static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
813 struct smbsrv_request *req, struct smb_trans2 *trans2)
815 struct cvfs_private *private = ntvfs->private_data;
816 struct smbcli_request *c_req;
820 if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
821 return smb_raw_trans2(private->tree, req, trans2);
824 c_req = smb_raw_trans2_send(private->tree, trans2);
826 ASYNC_RECV_TAIL(trans2, async_trans2);
830 /* SMBtrans - not used on file shares */
831 static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
832 struct smbsrv_request *req, struct smb_trans2 *trans2)
834 return NT_STATUS_ACCESS_DENIED;
838 initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem
840 NTSTATUS ntvfs_cifs_init(void)
843 struct ntvfs_ops ops;
847 /* fill in the name and type */
849 ops.type = NTVFS_DISK;
851 /* fill in all the operations */
852 ops.connect = cvfs_connect;
853 ops.disconnect = cvfs_disconnect;
854 ops.unlink = cvfs_unlink;
855 ops.chkpath = cvfs_chkpath;
856 ops.qpathinfo = cvfs_qpathinfo;
857 ops.setpathinfo = cvfs_setpathinfo;
858 ops.openfile = cvfs_open;
859 ops.mkdir = cvfs_mkdir;
860 ops.rmdir = cvfs_rmdir;
861 ops.rename = cvfs_rename;
862 ops.copy = cvfs_copy;
863 ops.ioctl = cvfs_ioctl;
864 ops.read = cvfs_read;
865 ops.write = cvfs_write;
866 ops.seek = cvfs_seek;
867 ops.flush = cvfs_flush;
868 ops.close = cvfs_close;
869 ops.exit = cvfs_exit;
870 ops.lock = cvfs_lock;
871 ops.setfileinfo = cvfs_setfileinfo;
872 ops.qfileinfo = cvfs_qfileinfo;
873 ops.fsinfo = cvfs_fsinfo;
875 ops.search_first = cvfs_search_first;
876 ops.search_next = cvfs_search_next;
877 ops.search_close = cvfs_search_close;
878 ops.trans = cvfs_trans;
879 ops.logoff = cvfs_logoff;
880 ops.async_setup = cvfs_async_setup;
881 ops.cancel = cvfs_cancel;
883 if (lp_parm_bool(-1, "cifs", "maptrans2", False)) {
884 ops.trans2 = cvfs_trans2;
887 /* register ourselves with the NTVFS subsystem. We register
888 under the name 'cifs'. */
889 ret = ntvfs_register(&ops);
891 if (!NT_STATUS_IS_OK(ret)) {
892 DEBUG(0,("Failed to register CIFS backend!\n"));