From 3590835ee606fe06c5ea5bf5ed7beba6dd087c60 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 9 May 2006 15:50:35 +0000 Subject: r15522: allow cifs:map_trans2 per share metze (This used to be commit da82e2bc45c23cc46f3013b38078229755b4ea61) --- source4/ntvfs/cifs/vfs_cifs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 586e0ebb98..fd58d2c8bd 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -39,6 +39,7 @@ struct cvfs_private { struct ntvfs_module_context *ntvfs; struct async_info *pending; BOOL map_generic; + BOOL map_trans2; }; @@ -173,6 +174,9 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, private->map_generic = lp_parm_bool(ntvfs->ctx->config.snum, "cifs", "mapgeneric", False); + private->map_trans2 = lp_parm_bool(ntvfs->ctx->config.snum, + "cifs", "maptrans2", False); + return NT_STATUS_OK; } @@ -873,6 +877,10 @@ static NTSTATUS cvfs_trans2(struct ntvfs_module_context *ntvfs, 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)) { @@ -979,10 +987,7 @@ NTSTATUS ntvfs_cifs_init(void) ops.async_setup = cvfs_async_setup; ops.cancel = cvfs_cancel; ops.notify = cvfs_notify; - - if (lp_parm_bool(-1, "cifs", "maptrans2", False)) { - ops.trans2 = cvfs_trans2; - } + ops.trans2 = cvfs_trans2; /* register ourselves with the NTVFS subsystem. We register under the name 'cifs'. */ -- cgit