diff options
Diffstat (limited to 'source3/modules/vfs_shadow_copy2.c')
-rw-r--r-- | source3/modules/vfs_shadow_copy2.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 2c7fcaacef7..31ef499527e 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1150,19 +1150,28 @@ static int shadow_copy2_rename(vfs_handle_struct *handle, } static int shadow_copy2_symlink(vfs_handle_struct *handle, - const char *oldname, const char *newname) + const char *link_contents, + const struct smb_filename *new_smb_fname) { time_t timestamp_old = 0; time_t timestamp_new = 0; char *snappath_old = NULL; char *snappath_new = NULL; - if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), handle, oldname, - ×tamp_old, NULL, &snappath_old)) { + if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), + handle, + link_contents, + ×tamp_old, + NULL, + &snappath_old)) { return -1; } - if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), handle, newname, - ×tamp_new, NULL, &snappath_new)) { + if (!shadow_copy2_strip_snapshot_internal(talloc_tos(), + handle, + new_smb_fname->base_name, + ×tamp_new, + NULL, + &snappath_new)) { return -1; } if ((timestamp_old != 0) || (timestamp_new != 0)) { @@ -1176,7 +1185,7 @@ static int shadow_copy2_symlink(vfs_handle_struct *handle, errno = EROFS; return -1; } - return SMB_VFS_NEXT_SYMLINK(handle, oldname, newname); + return SMB_VFS_NEXT_SYMLINK(handle, link_contents, new_smb_fname); } static int shadow_copy2_link(vfs_handle_struct *handle, |