Use conn->cwd_fsp as current fsp. Rework to modern standards.
No logic change for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
const struct security_token *del_nt_token = NULL;
bool got_tokens = false;
bool normal_close;
+ int ret;
/* Ensure any pending write time updates are done. */
if (fsp->update_write_time_event) {
}
- if (SMB_VFS_UNLINK(conn, fsp->fsp_name) != 0) {
+ ret = SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ fsp->fsp_name,
+ 0);
+ if (ret != 0) {
/*
* This call can potentially fail as another smbd may
* have had the file open with delete on close set and