#include "lib/util/dlinklist.h"
#include "param/param.h"
#include "libcli/resolve/resolve.h"
+#include "libcli/smb2/smb2.h"
+#include "libcli/smb2/smb2_calls.h"
struct cvfs_file {
struct cvfs_file *prev, *next;
/* this is stored in ntvfs_private */
struct cvfs_private {
- struct smbcli_tree *tree;
+ struct smb2_tree *tree;
struct smbcli_transport *transport;
struct ntvfs_module_context *ntvfs;
struct async_info *pending;
struct cvfs_file *files;
- bool map_generic;
- bool map_trans2;
+
+ /* a handle on the root of the share */
+ /* TODO: leaving this handle open could prevent other users
+ from opening the share with exclusive access. We probably
+ need to open it on demand */
+ struct smb2_handle roothandle;
};
struct async_info *next, *prev;
struct cvfs_private *cvfs;
struct ntvfs_request *req;
- struct smbcli_request *c_req;
+ struct smb2_request *c_req;
struct cvfs_file *f;
void *parms;
};
-#define SETUP_PID private->tree->session->pid = req->smbpid
-
#define SETUP_FILE_HERE(f) do { \
f = ntvfs_handle_get_backend_data(io->generic.in.file.ntvfs, ntvfs); \
if (!f) return NT_STATUS_INVALID_HANDLE; \
SETUP_FILE_HERE(f); \
} while (0)
-#define SETUP_PID_AND_FILE do { \
- SETUP_PID; \
- SETUP_FILE; \
-} while (0)
+#define SMB2_SERVER "smb2:server"
+#define SMB2_USER "smb2:user"
+#define SMB2_PASSWORD "smb2:password"
+#define SMB2_DOMAIN "smb2:domain"
+#define SMB2_SHARE "smb2:share"
+#define SMB2_USE_MACHINE_ACCT "smb2:use-machine-account"
-#define CIFS_SERVER "cifs:server"
-#define CIFS_USER "cifs:user"
-#define CIFS_PASSWORD "cifs:password"
-#define CIFS_DOMAIN "cifs:domain"
-#define CIFS_SHARE "cifs:share"
-#define CIFS_USE_MACHINE_ACCT "cifs:use-machine-account"
-#define CIFS_MAP_GENERIC "cifs:map-generic"
-#define CIFS_MAP_TRANS2 "cifs:map-trans2"
-
-#define CIFS_USE_MACHINE_ACCT_DEFAULT false
-#define CIFS_MAP_GENERIC_DEFAULT false
-#define CIFS_MAP_TRANS2_DEFAULT true
+#define SMB2_USE_MACHINE_ACCT_DEFAULT false
/*
a handler for oplock break events from the server - these need to be passed
}
if (!h) {
- DEBUG(5,("vfs_cifs: ignoring oplock break level %d for fnum %d\n", level, fnum));
+ DEBUG(5,("vfs_smb2: ignoring oplock break level %d for fnum %d\n", level, fnum));
return true;
}
- DEBUG(5,("vfs_cifs: sending oplock break level %d for fnum %d\n", level, fnum));
+ DEBUG(5,("vfs_smb2: sending oplock break level %d for fnum %d\n", level, fnum));
status = ntvfs_send_oplock_break(private->ntvfs, h, level);
if (!NT_STATUS_IS_OK(status)) return false;
return true;
}
+/*
+ return a handle to the root of the share
+*/
+static NTSTATUS smb2_get_roothandle(struct smb2_tree *tree, struct smb2_handle *handle)
+{
+ struct smb2_create io;
+ NTSTATUS status;
+
+ ZERO_STRUCT(io);
+ io.in.oplock_level = 0;
+ io.in.desired_access = SEC_STD_SYNCHRONIZE | SEC_DIR_READ_ATTRIBUTE | SEC_DIR_LIST;
+ io.in.file_attributes = 0;
+ io.in.create_disposition = NTCREATEX_DISP_OPEN;
+ io.in.share_access =
+ NTCREATEX_SHARE_ACCESS_READ |
+ NTCREATEX_SHARE_ACCESS_WRITE|
+ NTCREATEX_SHARE_ACCESS_DELETE;
+ io.in.create_options = 0;
+ io.in.fname = NULL;
+
+ status = smb2_create(tree, tree, &io);
+ NT_STATUS_NOT_OK_RETURN(status);
+
+ *handle = io.out.file.handle;
+
+ return NT_STATUS_OK;
+}
+
/*
connect to a share - used when a tree_connect operation comes in.
*/
NTSTATUS status;
struct cvfs_private *private;
const char *host, *user, *pass, *domain, *remote_share;
- struct smb_composite_connect io;
struct composite_context *creq;
struct share_config *scfg = ntvfs->ctx->config;
+ struct smb2_tree *tree;
struct cli_credentials *credentials;
bool machine_account;
* For now we use parametric options, type cifs.
* Later we will use security=server and auth_server.c.
*/
- host = share_string_option(scfg, CIFS_SERVER, NULL);
- user = share_string_option(scfg, CIFS_USER, NULL);
- pass = share_string_option(scfg, CIFS_PASSWORD, NULL);
- domain = share_string_option(scfg, CIFS_DOMAIN, NULL);
- remote_share = share_string_option(scfg, CIFS_SHARE, NULL);
+ host = share_string_option(scfg, SMB2_SERVER, NULL);
+ user = share_string_option(scfg, SMB2_USER, NULL);
+ pass = share_string_option(scfg, SMB2_PASSWORD, NULL);
+ domain = share_string_option(scfg, SMB2_DOMAIN, NULL);
+ remote_share = share_string_option(scfg, SMB2_SHARE, NULL);
if (!remote_share) {
remote_share = sharename;
}
- machine_account = share_bool_option(scfg, CIFS_USE_MACHINE_ACCT, CIFS_USE_MACHINE_ACCT_DEFAULT);
+ machine_account = share_bool_option(scfg, SMB2_USE_MACHINE_ACCT, SMB2_USE_MACHINE_ACCT_DEFAULT);
private = talloc_zero(ntvfs, struct cvfs_private);
if (!private) {
return NT_STATUS_INVALID_PARAMETER;
}
- /* connect to the server, using the smbd event context */
- io.in.dest_host = host;
- io.in.dest_ports = lp_smb_ports(ntvfs->ctx->lp_ctx);
- io.in.called_name = host;
- io.in.credentials = credentials;
- io.in.fallback_to_anonymous = false;
- io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx);
- io.in.service = remote_share;
- io.in.service_type = "?????";
- lp_smbcli_options(ntvfs->ctx->lp_ctx, &io.in.options);
-
- if (!(ntvfs->ctx->client_caps & NTVFS_CLIENT_CAP_LEVEL_II_OPLOCKS)) {
- io.in.options.use_level2_oplocks = false;
- }
+ creq = smb2_connect_send(private, host, remote_share,
+ lp_resolve_context(ntvfs->ctx->lp_ctx),
+ credentials,
+ ntvfs->ctx->event_ctx);
- creq = smb_composite_connect_send(&io, private,
- lp_resolve_context(ntvfs->ctx->lp_ctx),
- ntvfs->ctx->event_ctx);
- status = smb_composite_connect_recv(creq, private);
+ status = smb2_connect_recv(creq, private, &tree);
NT_STATUS_NOT_OK_RETURN(status);
- private->tree = io.out.tree;
+ status = smb2_get_roothandle(tree, &private->roothandle);
+ NT_STATUS_NOT_OK_RETURN(status);
+ private->tree = tree;
private->transport = private->tree->session->transport;
- SETUP_PID;
private->ntvfs = ntvfs;
ntvfs->ctx->fs_type = talloc_strdup(ntvfs->ctx, "NTFS");
NT_STATUS_HAVE_NO_MEMORY(ntvfs->ctx->dev_type);
/* we need to receive oplock break requests from the server */
+ /* TODO: enable oplocks
smbcli_oplock_handler(private->transport, oplock_handler, private);
-
- private->map_generic = share_bool_option(scfg, CIFS_MAP_GENERIC, CIFS_MAP_GENERIC_DEFAULT);
-
- private->map_trans2 = share_bool_option(scfg, CIFS_MAP_TRANS2, CIFS_MAP_TRANS2_DEFAULT);
-
+ */
return NT_STATUS_OK;
}
/* first cleanup pending requests */
for (a=private->pending; a; a = an) {
an = a->next;
- smbcli_request_destroy(a->c_req);
+ smb2_request_destroy(a->c_req);
talloc_free(a);
}
this handler can only be used for functions that don't return any
parameters (those that just return a status code)
*/
-static void async_simple(struct smbcli_request *c_req)
+static void async_simple(struct smb2_request *c_req)
{
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
- req->async_states->status = smbcli_request_simple_recv(c_req);
+
+ smb2_request_receive(c_req);
+ req->async_states->status = smb2_request_destroy(c_req);
talloc_free(async);
req->async_states->send_fn(req);
}
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
+ return NT_STATUS_NOT_IMPLEMENTED;
/* see if the front end will allow us to perform this
function asynchronously. */
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID_AND_FILE;
+ SETUP_FILE;
/* see if the front end will allow us to perform this
function asynchronously. */
struct ntvfs_request *req, union smb_chkpath *cp)
{
struct cvfs_private *private = ntvfs->private_data;
- struct smbcli_request *c_req;
-
- SETUP_PID;
-
+ struct smb2_request *c_req;
+ struct smb2_find f;
+
+ /* SMB2 doesn't have a chkpath operation, and also doesn't
+ have a query path info call, so the best seems to be to do a
+ find call, using the roothandle we established at connect
+ time */
+ ZERO_STRUCT(f);
+ f.in.file.handle = private->roothandle;
+ f.in.level = SMB2_FIND_DIRECTORY_INFO;
+ f.in.pattern = cp->chkpath.in.path;
+ /* SMB2 find doesn't accept \ or the empty string - this is the best
+ approximation */
+ if (strcmp(f.in.pattern, "\\") == 0 ||
+ strcmp(f.in.pattern, "") == 0) {
+ f.in.pattern = "?";
+ }
+ f.in.continue_flags = SMB2_CONTINUE_FLAG_SINGLE | SMB2_CONTINUE_FLAG_RESTART;
+ f.in.max_response_size = 0x1000;
+
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
- return smb_raw_chkpath(private->tree, cp);
+ return smb2_find(private->tree, req, &f);
}
- c_req = smb_raw_chkpath_send(private->tree, cp);
+ c_req = smb2_find_send(private->tree, &f);
SIMPLE_ASYNC_TAIL;
}
{
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
+ return NT_STATUS_NOT_IMPLEMENTED;
req->async_states->status = smb_raw_pathinfo_recv(c_req, req, async->parms);
talloc_free(async);
req->async_states->send_fn(req);
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_pathinfo(private->tree, req, info);
}
{
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
+ return NT_STATUS_NOT_IMPLEMENTED;
req->async_states->status = smb_raw_fileinfo_recv(c_req, req, async->parms);
talloc_free(async);
req->async_states->send_fn(req);
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID_AND_FILE;
+ return NT_STATUS_NOT_IMPLEMENTED;
+ SETUP_FILE;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_fileinfo(private->tree, req, io);
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
+ return NT_STATUS_NOT_IMPLEMENTED;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_setpathinfo(private->tree, st);
}
struct cvfs_file *f;
NTSTATUS status;
- SETUP_PID;
-
- if (io->generic.level != RAW_OPEN_GENERIC &&
- private->map_generic) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ if (io->generic.level != RAW_OPEN_GENERIC) {
return ntvfs_map_open(ntvfs, req, io);
}
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
+ return NT_STATUS_NOT_IMPLEMENTED;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_mkdir(private->tree, md);
}
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
+ return NT_STATUS_NOT_IMPLEMENTED;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_rmdir(private->tree, rd);
}
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
+ return NT_STATUS_NOT_IMPLEMENTED;
if (ren->nttrans.level == RAW_RENAME_NTTRANS) {
struct cvfs_file *f;
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
- if (io->generic.level != RAW_READ_GENERIC &&
- private->map_generic) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ if (io->generic.level != RAW_READ_GENERIC) {
return ntvfs_map_read(ntvfs, req, io);
}
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
- if (io->generic.level != RAW_WRITE_GENERIC &&
- private->map_generic) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ if (io->generic.level != RAW_WRITE_GENERIC) {
return ntvfs_map_write(ntvfs, req, io);
}
SETUP_FILE;
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID_AND_FILE;
+ return NT_STATUS_NOT_IMPLEMENTED;
+ SETUP_FILE;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_seek(private->tree, io);
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
+ return NT_STATUS_NOT_IMPLEMENTED;
switch (io->generic.level) {
case RAW_FLUSH_FLUSH:
SETUP_FILE;
struct smbcli_request *c_req;
struct cvfs_file *f;
- SETUP_PID;
-
- if (io->generic.level != RAW_CLOSE_GENERIC &&
- private->map_generic) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ if (io->generic.level != RAW_CLOSE_GENERIC) {
return ntvfs_map_close(ntvfs, req, io);
}
SETUP_FILE_HERE(f);
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
+ return NT_STATUS_NOT_IMPLEMENTED;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_exit(private->tree->session);
}
struct cvfs_private *private = ntvfs->private_data;
struct async_info *a;
+ return NT_STATUS_NOT_IMPLEMENTED;
/* find the matching request */
for (a=private->pending;a;a=a->next) {
if (a->req == req) {
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID;
-
- if (io->generic.level != RAW_LOCK_GENERIC &&
- private->map_generic) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ if (io->generic.level != RAW_LOCK_GENERIC) {
return ntvfs_map_lock(ntvfs, req, io);
}
SETUP_FILE;
struct cvfs_private *private = ntvfs->private_data;
struct smbcli_request *c_req;
- SETUP_PID_AND_FILE;
+ return NT_STATUS_NOT_IMPLEMENTED;
+ SETUP_FILE;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
return smb_raw_setfileinfo(private->tree, io);
/*
a handler for async fsinfo replies
*/
-static void async_fsinfo(struct smbcli_request *c_req)
+static void async_fsinfo(struct smb2_request *c_req)
{
struct async_info *async = c_req->async.private;
struct ntvfs_request *req = async->req;
- req->async_states->status = smb_raw_fsinfo_recv(c_req, req, async->parms);
+ req->async_states->status = smb2_getinfo_fs_recv(c_req, req, async->parms);
talloc_free(async);
req->async_states->send_fn(req);
}
struct ntvfs_request *req, union smb_fsinfo *fs)
{
struct cvfs_private *private = ntvfs->private_data;
- struct smbcli_request *c_req;
+ struct smb2_request *c_req;
+ enum smb_fsinfo_level level = fs->generic.level;
+
+ switch (level) {
+ /* some levels go straight through */
+ case RAW_QFS_VOLUME_INFORMATION:
+ case RAW_QFS_SIZE_INFORMATION:
+ case RAW_QFS_DEVICE_INFORMATION:
+ case RAW_QFS_ATTRIBUTE_INFORMATION:
+ case RAW_QFS_QUOTA_INFORMATION:
+ case RAW_QFS_FULL_SIZE_INFORMATION:
+ case RAW_QFS_OBJECTID_INFORMATION:
+ break;
- SETUP_PID;
+ /* some get mapped */
+ case RAW_QFS_VOLUME_INFO:
+ level = RAW_QFS_VOLUME_INFORMATION;
+ break;
+ case RAW_QFS_SIZE_INFO:
+ level = RAW_QFS_SIZE_INFORMATION;
+ break;
+ case RAW_QFS_DEVICE_INFO:
+ level = RAW_QFS_DEVICE_INFORMATION;
+ break;
+ case RAW_QFS_ATTRIBUTE_INFO:
+ level = RAW_QFS_ATTRIBUTE_INFO;
+ break;
+
+ default:
+ /* the rest get refused for now */
+ DEBUG(0,("fsinfo level %u not possible on SMB2\n",
+ (unsigned)fs->generic.level));
+ break;
+ }
+
+ fs->generic.level = level;
+ fs->generic.handle = private->roothandle;
if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
- return smb_raw_fsinfo(private->tree, req, fs);
+ return smb2_getinfo_fs(private->tree, req, fs);
}
- c_req = smb_raw_fsinfo_send(private->tree, req, fs);
+ c_req = smb2_getinfo_fs_send(private->tree, fs);
ASYNC_RECV_TAIL(fs, async_fsinfo);
}
bool (*callback)(void *, const union smb_search_data *))
{
struct cvfs_private *private = ntvfs->private_data;
+ struct smb2_find f;
+ enum smb_search_data_level smb2_level;
+ uint32_t continue_flags = 0;
+ uint_t count, i;
+ union smb_search_data *data;
+ NTSTATUS status;
+
+ if (io->generic.level != RAW_SEARCH_TRANS2) {
+ DEBUG(0,("We only support trans2 search in smb2 backend\n"));
+ return NT_STATUS_NOT_SUPPORTED;
+ }
+
+ switch (io->generic.data_level) {
+ case RAW_SEARCH_DATA_DIRECTORY_INFO:
+ smb2_level = SMB2_FIND_DIRECTORY_INFO;
+ break;
+ case RAW_SEARCH_DATA_FULL_DIRECTORY_INFO:
+ smb2_level = SMB2_FIND_FULL_DIRECTORY_INFO;
+ break;
+ case RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO:
+ smb2_level = SMB2_FIND_BOTH_DIRECTORY_INFO;
+ break;
+ case RAW_SEARCH_DATA_NAME_INFO:
+ smb2_level = SMB2_FIND_NAME_INFO;
+ break;
+ case RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO:
+ smb2_level = SMB2_FIND_ID_FULL_DIRECTORY_INFO;
+ break;
+ case RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO:
+ smb2_level = SMB2_FIND_ID_BOTH_DIRECTORY_INFO;
+ break;
+ default:
+ DEBUG(0,("Unsupported search level %u for smb2 backend\n",
+ (unsigned)io->generic.data_level));
+ return NT_STATUS_INVALID_INFO_CLASS;
+ }
+
+ /* we do the search on the roothandle. This only works because
+ search is synchronous, otherwise we'd have no way to
+ distinguish multiple searches happening at once
+ */
+ ZERO_STRUCT(f);
+ f.in.file.handle = private->roothandle;
+ f.in.level = smb2_level;
+ f.in.pattern = io->t2ffirst.in.pattern;
+ while (f.in.pattern[0] == '\\') {
+ f.in.pattern++;
+ }
+ f.in.continue_flags = 0;
+ f.in.max_response_size = 0x10000;
+
+ status = smb2_find_level(private->tree, req, &f, &count, &data);
+ NT_STATUS_NOT_OK_RETURN(status);
- SETUP_PID;
+ for (i=0;i<count;i++) {
+ if (!callback(search_private, &data[i])) break;
+ }
+
+ io->t2ffirst.out.handle = 0;
+ io->t2ffirst.out.count = i;
+ /* TODO: fix end_of_file */
+ io->t2ffirst.out.end_of_search = 1;
- return smb_raw_search_first(private->tree, req, io, search_private, callback);
+ talloc_free(data);
+
+ return NT_STATUS_OK;
}
/* continue a search */
{
struct cvfs_private *private = ntvfs->private_data;
- SETUP_PID;
+ return NT_STATUS_NOT_IMPLEMENTED;
return smb_raw_search_next(private->tree, req, io, search_private, callback);
}
{
struct cvfs_private *private = ntvfs->private_data;
- SETUP_PID;
+ return NT_STATUS_NOT_IMPLEMENTED;
return smb_raw_search_close(private->tree, io);
}
-/*
- a handler for async trans2 replies
- */
-static void async_trans2(struct smbcli_request *c_req)
-{
- struct async_info *async = c_req->async.private;
- struct ntvfs_request *req = async->req;
- req->async_states->status = smb_raw_trans2_recv(c_req, req, async->parms);
- talloc_free(async);
- req->async_states->send_fn(req);
-}
-
-/* raw trans2 */
-static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs,
- struct ntvfs_request *req,
- struct smb_trans2 *trans2)
-{
- struct cvfs_private *private = ntvfs->private_data;
- struct smbcli_request *c_req;
-
- if (private->map_trans2) {
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
- SETUP_PID;
-
- if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
- return smb_raw_trans2(private->tree, req, trans2);
- }
-
- c_req = smb_raw_trans2_send(private->tree, trans2);
-
- ASYNC_RECV_TAIL(trans2, async_trans2);
-}
-
-
/* SMBtrans - not used on file shares */
static NTSTATUS cvfs_trans(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req,
int saved_timeout = private->transport->options.request_timeout;
struct cvfs_file *f;
+ return NT_STATUS_NOT_IMPLEMENTED;
if (io->nttrans.level != RAW_NOTIFY_NTTRANS) {
return NT_STATUS_NOT_IMPLEMENTED;
}
- SETUP_PID;
-
f = ntvfs_handle_get_backend_data(io->nttrans.in.file.ntvfs, ntvfs);
if (!f) return NT_STATUS_INVALID_HANDLE;
io->nttrans.in.file.fnum = f->fnum;
ops.async_setup = cvfs_async_setup;
ops.cancel = cvfs_cancel;
ops.notify = cvfs_notify;
- ops.trans2 = cvfs_trans2;
/* register ourselves with the NTVFS subsystem. We register
under the name 'smb2'. */