Use conn->cwd_fsp as current fsp. This is horrible code and must
be removed.
No logic change for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
if (SMB_VFS_STAT(conn, smb_fname_tmp) != 0) {
status = map_nt_error_from_unix(errno);
TALLOC_FREE(smb_fname_tmp);
- SMB_VFS_UNLINK(conn, smb_fname);
+ SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ smb_fname,
+ 0);
return status;
}
if (ret != 0) {
status = map_nt_error_from_unix(errno);
if (delete_on_fail) {
- SMB_VFS_UNLINK(conn, smb_fname);
+ SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ smb_fname,
+ 0);
}
return status;
}
if (ret != 0) {
status = map_nt_error_from_unix(errno);
if (delete_on_fail) {
- SMB_VFS_UNLINK(conn, smb_fname);
+ SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ smb_fname,
+ 0);
}
return status;
}