summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_shadow_copy2.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-06-30 17:04:38 -0700
committerTim Prouty <tprouty@samba.org>2009-07-06 15:38:29 -0700
commit5a09ba460cb757823e1deb8b2f2ae762765846c0 (patch)
tree3c09af9ee0067e30c62826d48e9ca8eef39a16fe /source3/modules/vfs_shadow_copy2.c
parentc41e5e1342a06456b4a5b101f46a394d6a4252bb (diff)
downloadsamba-5a09ba460cb757823e1deb8b2f2ae762765846c0.tar.gz
samba-5a09ba460cb757823e1deb8b2f2ae762765846c0.tar.bz2
samba-5a09ba460cb757823e1deb8b2f2ae762765846c0.zip
s3: Plumb smb_filename through SMB_VFS_RENAME
Diffstat (limited to 'source3/modules/vfs_shadow_copy2.c')
-rw-r--r--source3/modules/vfs_shadow_copy2.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 03a8fd24ea..25c5096da7 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -176,6 +176,16 @@ static inline bool shadow_copy2_match_name(const char *name)
} \
} while (0)
+#define SHADOW2_NEXT2_SMB_FNAME(op, args) do { \
+ if (shadow_copy2_match_name(smb_fname_src->base_name) || \
+ shadow_copy2_match_name(smb_fname_dst->base_name)) { \
+ errno = EROFS; \
+ return -1; \
+ } else { \
+ return SMB_VFS_NEXT_ ## op args; \
+ } \
+} while (0)
+
/*
find the mount point of a filesystem
@@ -343,9 +353,11 @@ static void convert_sbuf(vfs_handle_struct *handle, const char *fname, SMB_STRUC
}
static int shadow_copy2_rename(vfs_handle_struct *handle,
- const char *oldname, const char *newname)
+ const struct smb_filename *smb_fname_src,
+ const struct smb_filename *smb_fname_dst)
{
- SHADOW2_NEXT2(RENAME, (handle, oldname, newname));
+ SHADOW2_NEXT2_SMB_FNAME(RENAME,
+ (handle, smb_fname_src, smb_fname_dst));
}
static int shadow_copy2_symlink(vfs_handle_struct *handle,