From 258952aa85f2a68e2d2362522f6114c6a439f1e3 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Thu, 2 Jul 2009 09:27:44 -0700 Subject: s3: Plumb smb_filename through SMB_VFS_UNLINK --- source3/modules/vfs_shadow_copy2.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source3/modules/vfs_shadow_copy2.c') diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 25c5096da7..05a8b67f71 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -412,9 +412,19 @@ static int shadow_copy2_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_ return ret; } -static int shadow_copy2_unlink(vfs_handle_struct *handle, const char *fname) +static int shadow_copy2_unlink(vfs_handle_struct *handle, + const struct smb_filename *smb_fname_in) { - SHADOW2_NEXT(UNLINK, (handle, name), int, -1); + struct smb_filename *smb_fname = NULL; + NTSTATUS status; + + status = copy_smb_filename(talloc_tos(), smb_fname_in, &smb_fname); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); + return -1; + } + + SHADOW2_NEXT_SMB_FNAME(UNLINK, (handle, smb_fname), int, -1); } static int shadow_copy2_chmod(vfs_handle_struct *handle, -- cgit