diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-05-09 15:50:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:46 -0500 |
commit | 3590835ee606fe06c5ea5bf5ed7beba6dd087c60 (patch) | |
tree | d0a61befbe34c5ddd8cd0ccceb08bc86427c1ce1 /source4/ntvfs/cifs | |
parent | 2895f28c4c03a7527b3d5d5b196c47f28c5a4463 (diff) | |
download | samba-3590835ee606fe06c5ea5bf5ed7beba6dd087c60.tar.gz samba-3590835ee606fe06c5ea5bf5ed7beba6dd087c60.tar.bz2 samba-3590835ee606fe06c5ea5bf5ed7beba6dd087c60.zip |
r15522: allow cifs:map_trans2 per share
metze
(This used to be commit da82e2bc45c23cc46f3013b38078229755b4ea61)
Diffstat (limited to 'source4/ntvfs/cifs')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 13 |
1 files changed, 9 insertions, 4 deletions
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'. */ |