bool is_directory : 1;
bool aio_write_behind : 1;
bool initial_delete_on_close : 1;
+ bool delete_on_close : 1;
} fsp_flags;
struct tevent_timer *update_write_time_event;
struct lock_struct last_lock_failure;
int current_lock_count; /* Count the number of outstanding locks and pending locks. */
- bool delete_on_close;
uint64_t posix_flags;
bool is_sparse;
bool backup_intent; /* Handle was successfully opened with backup intent
TALLOC_FREE(lck);
- fsp->delete_on_close = delete_on_close;
+ fsp->fsp_flags.delete_on_close = delete_on_close;
return True;
}
for (fsp = file_find_di_first(conn->sconn, id); fsp;
fsp = file_find_di_next(fsp)) {
if (fsp->access_mask & DELETE_ACCESS &&
- fsp->delete_on_close) {
+ fsp->fsp_flags.delete_on_close)
+ {
/* We did open this for delete,
* allow the delete as root.
*/
become_user_without_service(conn, fsp->vuid);
became_user = True;
}
- fsp->delete_on_close = true;
+ fsp->fsp_flags.delete_on_close = true;
set_delete_on_close_lck(fsp, lck,
get_current_nttok(conn),
get_current_utok(conn));
* the delete on close flag. JRA.
*/
- fsp->delete_on_close = false;
+ fsp->fsp_flags.delete_on_close = false;
reset_delete_on_close_lck(fsp, lck);
done:
set_delete_on_close_lck(fsp, lck,
get_current_nttok(fsp->conn),
get_current_utok(fsp->conn));
- fsp->delete_on_close = true;
+ fsp->fsp_flags.delete_on_close = true;
if (became_user) {
unbecome_user_without_service();
}
if (fsp->fsp_flags.initial_delete_on_close) {
return NT_STATUS_NOT_SUPPORTED;
}
- if (fsp->delete_on_close) {
+ if (fsp->fsp_flags.delete_on_close) {
return NT_STATUS_NOT_SUPPORTED;
}
if ((in_flags & SMB2_CLOSE_FLAGS_FULL_INFORMATION) &&
(fsp->fsp_flags.initial_delete_on_close ||
- fsp->delete_on_close))
+ fsp->fsp_flags.delete_on_close))
{
/*
* We might be deleting the file. Ensure we