summaryrefslogtreecommitdiff
path: root/source4/ntvfs/cifs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-02-03 12:37:54 +0000
committerStefan Metzmacher <metze@samba.org>2004-02-03 12:37:54 +0000
commitf848aff0c28fcbacb4290e67b7c217b1aaa0fade (patch)
treee1401767d43939b9bfd2ed6c988ed365b8f22856 /source4/ntvfs/cifs
parent009fa83b136fbb4544a9b79074ab17e357493c32 (diff)
downloadsamba-f848aff0c28fcbacb4290e67b7c217b1aaa0fade.tar.gz
samba-f848aff0c28fcbacb4290e67b7c217b1aaa0fade.tar.bz2
samba-f848aff0c28fcbacb4290e67b7c217b1aaa0fade.zip
if vfs_cifs want to modify the ntvfs_ops struct, it should
use a temporary copy of the struct! metze (This used to be commit 372522c64f2aea76b3fe136752d4da40e61d2bec)
Diffstat (limited to 'source4/ntvfs/cifs')
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 976fa96b55..878dbf2357 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -148,7 +148,12 @@ static NTSTATUS cvfs_connect(struct request_context *req, const char *sharename)
/* if we are mapping trans2, then we need to not give a trans2
pointer in the operations structure */
if (private->map_calls && in_list("trans2", private->map_calls, True)) {
- conn->ntvfs_ops->trans2 = NULL;
+ struct ntvfs_ops *ops = talloc_memdup(conn->mem_ctx,conn->ntvfs_ops,sizeof(*ops));
+ if (!ops) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ ops->trans2 = NULL;
+ conn->ntvfs_ops = ops;
}
/* we need to tell the event loop that we wish to receive read events