Not yet used. Currently always conn->cwd_fsp.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
****************************************************************************/
bool can_delete_file_in_directory(connection_struct *conn,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname)
{
TALLOC_CTX *ctx = talloc_tos();
struct smb_filename *smb_fname_parent = NULL;
bool ret;
+ SMB_ASSERT(dirfsp == conn->cwd_fsp);
+
if (!CAN_WRITE(conn)) {
return False;
}
if ((access_mask & DELETE_ACCESS) &&
(rejected_mask & DELETE_ACCESS) &&
can_delete_file_in_directory(conn,
+ conn->cwd_fsp,
smb_fname))
{
return true;
if (!(access_granted & DELETE_ACCESS)) {
if (can_delete_file_in_directory(conn,
+ conn->cwd_fsp,
smb_fname))
{
*p_access_mask |= DELETE_ACCESS;
/* The following definitions come from smbd/file_access.c */
bool can_delete_file_in_directory(connection_struct *conn,
+ struct files_struct *dirfsp,
const struct smb_filename *smb_fname);
bool can_write_to_file(connection_struct *conn,
const struct smb_filename *smb_fname);