From 56efcb7b723b581b9c258d137331a171512d4d09 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 28 May 2009 19:20:14 +0200 Subject: Add SMB_VFS_CONNECTPATH operation This is required for the shadow_copy2 module and "wide links = no". The file system snapshots by nature are typically outside of share directory. So the REALPATH result fails the wide links = no test. --- source3/modules/vfs_default.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/modules/vfs_default.c') diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index fe63d5001a..4368dcd7da 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1128,6 +1128,12 @@ static int vfswrap_get_real_filename(struct vfs_handle_struct *handle, return -1; } +static const char *vfswrap_connectpath(struct vfs_handle_struct *handle, + const char *fname) +{ + return handle->conn->connectpath; +} + static NTSTATUS vfswrap_brl_lock_windows(struct vfs_handle_struct *handle, struct byte_range_lock *br_lck, struct lock_struct *plock, @@ -1630,6 +1636,8 @@ static vfs_op_tuple vfs_default_ops[] = { SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(vfswrap_connectpath), SMB_VFS_OP_CONNECTPATH, + SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_brl_unlock_windows),SMB_VFS_OP_BRL_UNLOCK_WINDOWS, -- cgit