struct timespec c_timespec;
struct timespec a_timespec;
struct timespec m_timespec;
- struct timespec write_time_ts;
NTSTATUS status;
int oplock_request;
uint8_t oplock_granted = NO_OPLOCK_RETURN;
fattr = FILE_ATTRIBUTE_NORMAL;
}
- /* Deal with other possible opens having a modified
- write time. JRA. */
- ZERO_STRUCT(write_time_ts);
- get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
- if (!null_timespec(write_time_ts)) {
- update_stat_ex_mtime(&smb_fname->st, write_time_ts);
- }
-
/* Create time. */
create_timespec = get_create_timespec(conn, fsp, smb_fname);
a_timespec = smb_fname->st.st_ex_atime;
struct timespec c_timespec;
struct timespec a_timespec;
struct timespec m_timespec;
- struct timespec write_time_ts;
struct ea_list *ea_list = NULL;
NTSTATUS status;
size_t param_len;
fattr = FILE_ATTRIBUTE_NORMAL;
}
- /* Deal with other possible opens having a modified
- write time. JRA. */
- ZERO_STRUCT(write_time_ts);
- get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
- if (!null_timespec(write_time_ts)) {
- update_stat_ex_mtime(&smb_fname->st, write_time_ts);
- }
-
/* Create time. */
create_timespec = get_create_timespec(conn, fsp, smb_fname);
a_timespec = smb_fname->st.st_ex_atime;
(unsigned int)new_unx_mode));
}
+ {
+ /*
+ * Deal with other opens having a modified write time.
+ */
+ struct timespec write_time = get_share_mode_write_time(lck);
+
+ if (!null_timespec(write_time)) {
+ update_stat_ex_mtime(&fsp->fsp_name->st, write_time);
+ }
+ }
+
TALLOC_FREE(lck);
return NT_STATUS_OK;
}
}
+ {
+ /*
+ * Deal with other opens having a modified write time. Is this
+ * possible for directories?
+ */
+ struct timespec write_time = get_share_mode_write_time(lck);
+
+ if (!null_timespec(write_time)) {
+ update_stat_ex_mtime(&fsp->fsp_name->st, write_time);
+ }
+ }
+
TALLOC_FREE(lck);
if (pinfo) {
size = smb_fname->st.st_ex_size;
fattr = dos_mode(conn, smb_fname);
- /* Deal with other possible opens having a modified
- write time. JRA. */
- if (ask_sharemode) {
- struct timespec write_time_ts;
-
- ZERO_STRUCT(write_time_ts);
- get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
- if (!null_timespec(write_time_ts)) {
- update_stat_ex_mtime(&smb_fname->st, write_time_ts);
- }
- }
-
mtime = convert_timespec_to_time_t(smb_fname->st.st_ex_mtime);
if (fattr & FILE_ATTRIBUTE_DIRECTORY) {
struct smb_request *smb1req = NULL;
files_struct *result = NULL;
int info;
- struct timespec write_time_ts;
struct smb2_create_blobs out_context_blobs;
int requested_oplock_level;
struct smb2_create_blob *dhnc = NULL;
}
state->out_file_attributes = dos_mode(result->conn,
result->fsp_name);
- /* Deal with other possible opens having a modified
- write time. JRA. */
- ZERO_STRUCT(write_time_ts);
- get_file_infos(result->file_id, 0, NULL, &write_time_ts);
- if (!null_timespec(write_time_ts)) {
- update_stat_ex_mtime(&result->fsp_name->st, write_time_ts);
- }
unix_timespec_to_nt_time(&state->out_creation_time,
get_create_timespec(smb1req->conn, result,