bool can_lock : 1;
bool can_read : 1;
bool can_write : 1;
+ bool modified : 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 modified;
bool is_directory;
bool aio_write_behind;
bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
* If close failed, file likely doesn't exist, do not try to scan.
*/
if (close_result == -1 && close_errno == EBADF) {
- if (fsp->modified) {
+ if (fsp->fsp_flags.modified) {
DBG_DEBUG("Removing cache entry (if existent): "
"fname: %s\n", fname);
virusfilter_cache_remove(config->cache,
}
if (is_named_stream(fsp->fsp_name)) {
- if (config->scan_on_open && fsp->modified) {
+ if (config->scan_on_open && fsp->fsp_flags.modified) {
if (config->cache) {
DBG_DEBUG("Removing cache entry (if existent)"
": fname: %s\n", fname);
}
if (!config->scan_on_close) {
- if (config->scan_on_open && fsp->modified) {
+ if (config->scan_on_open && fsp->fsp_flags.modified) {
if (config->cache) {
DBG_DEBUG("Removing cache entry (if existent)"
": fname: %s\n", fname);
return close_result;
}
- if (!fsp->modified) {
+ if (!fsp->fsp_flags.modified) {
DBG_NOTICE("Not scanned: File not modified: %s/%s\n",
cwd_fname, fname);
fsp->fsp_flags.can_read = false;
fsp->access_mask = FILE_GENERIC_WRITE;
fsp->fsp_flags.can_write = true;
- fsp->modified = false;
+ fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = false;
* TODO:
* Do we need to store the modified flag in the DB?
*/
- fsp->modified = false;
+ fsp->fsp_flags.modified = false;
/*
* no durables for directories
*/
trigger_write_time_update(fsp);
- if (fsp->modified) {
+ if (fsp->fsp_flags.modified) {
return;
}
- fsp->modified = true;
+ fsp->fsp_flags.modified = true;
if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {
return;
to->fsp_flags.can_write =
CAN_WRITE(from->conn) &&
((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0);
- to->modified = from->modified;
+ to->fsp_flags.modified = from->fsp_flags.modified;
to->is_directory = from->is_directory;
to->aio_write_behind = from->aio_write_behind;
CAN_WRITE(conn) &&
((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0);
fsp->print_file = NULL;
- fsp->modified = False;
+ fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = False;
if (conn->aio_write_behind_list &&
*/
fsp->access_mask = access_mask | FILE_READ_ATTRIBUTES;
fsp->print_file = NULL;
- fsp->modified = False;
+ fsp->fsp_flags.modified = false;
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = True;
fsp->fsp_flags.can_read = true;
fsp->fsp_flags.can_write = true;
fsp->print_file = NULL;
- fsp->modified = False;
+ fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = S_ISDIR(smb_fname->st.st_ex_mode);
}
sync_file(conn, fsp, True /* write through */);
- if (fsp->modified) {
+ if (fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(fsp);
}
END_PROFILE(SMBflush);
return;
}
- if (fsp->modified) {
+ if (fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(fsp);
}
}
goto out;
}
- if (fsp->modified) {
+ if (fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(fsp);
}
tevent_req_nterror(req, map_nt_error_from_unix(vfs_aio_state.error));
return;
}
- if (state->fsp->modified) {
+ if (state->fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(state->fsp);
}
tevent_req_done(req);
if (fsp == NULL) {
return NT_STATUS_OK;
}
- if (!fsp->modified) {
+ if (!fsp->fsp_flags.modified) {
return NT_STATUS_OK;
}
trigger_write_time_update_immediate(fsp);
return status;
}
- if (fsp != NULL && fsp->modified) {
+ if (fsp != NULL && fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(fsp);
}
return NT_STATUS_OK;
return status;
}
- if (fsp != NULL && fsp->modified) {
+ if (fsp != NULL && fsp->fsp_flags.modified) {
trigger_write_time_update_immediate(fsp);
}
return NT_STATUS_OK;
fsp->fsp_flags.can_read = true;
fsp->fsp_flags.can_write = CAN_WRITE(vfs->conn);
fsp->print_file = NULL;
- fsp->modified = False;
+ fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = False;
fsp->fsp_flags.can_read = true;
fsp->fsp_flags.can_write = true;
fsp->print_file = NULL;
- fsp->modified = False;
+ fsp->fsp_flags.modified = false;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = S_ISDIR(smb_fname->st.st_ex_mode);