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>
if (!(S_ISDIR(smb_dname->st.st_ex_mode))) {
return NT_STATUS_NOT_A_DIRECTORY;
}
- ret = SMB_VFS_UNLINK(conn, smb_dname);
+ ret = SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ smb_dname,
+ 0);
} else {
ret = SMB_VFS_RMDIR(conn, smb_dname);
}
smb_dname_full) != 0) {
goto err_break;
}
- } else if(SMB_VFS_UNLINK(conn, smb_dname_full) != 0) {
- goto err_break;
+ } else {
+ int retval = SMB_VFS_UNLINKAT(conn,
+ conn->cwd_fsp,
+ smb_dname_full,
+ 0);
+ if(retval != 0) {
+ goto err_break;
+ }
}
/* Successful iteration. */