Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
if (is_directory) {
ret = SMB_VFS_NEXT_RMDIR(handle, &local_fname);
} else {
- ret = SMB_VFS_NEXT_UNLINK(handle, &local_fname);
+ ret = SMB_VFS_NEXT_UNLINKAT(handle,
+ conn->cwd_fsp,
+ &local_fname,
+ 0);
}
unbecome_root();
int ret;
/* Try the normal unlink first. */
- ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
+ ret = SMB_VFS_NEXT_UNLINKAT(handle,
+ dirfsp,
+ smb_fname,
+ flags);
if (ret == 0) {
return 0;
}