ZERO_STRUCT(write_time_ts);
fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
get_file_infos(fileid, 0, NULL, &write_time_ts);
- if (!null_timespec(write_time_ts)) {
+ if (!is_omit_timespec(&write_time_ts)) {
update_stat_ex_mtime(&smb_fname->st, write_time_ts);
}
}
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBsetatr);
+ init_smb_file_time(&ft);
if (req->wct < 2) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
}
}
- ft = (struct smb_file_time) {
- .mtime = convert_time_t_to_timespec(mtime)
- };
+ ft.mtime = time_t_to_full_timespec(mtime);
status = smb_set_file_time(conn, NULL, smb_fname, &ft, true);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcreate);
- ZERO_STRUCT(ft);
+ init_smb_file_time(&ft);
if (req->wct < 3) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
}
/* mtime. */
- ft.mtime = convert_time_t_to_timespec(srv_make_unix_date3(req->vwv+1));
+ ft.mtime = time_t_to_full_timespec(srv_make_unix_date3(req->vwv+1));
srvstr_get_path_req(ctx, req, &fname, (const char *)req->buf + 1,
STR_TERMINATE, &status);
*/
t = srv_make_unix_date3(req->vwv+1);
- set_close_write_time(fsp, convert_time_t_to_timespec(t));
+ set_close_write_time(fsp, time_t_to_full_timespec(t));
}
if (fsp->num_aio_requests != 0) {
numtowrite = SVAL(req->vwv+1, 0);
startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0);
- mtime = convert_time_t_to_timespec(srv_make_unix_date3(req->vwv+4));
+ mtime = time_t_to_full_timespec(srv_make_unix_date3(req->vwv+4));
data = (const char *)req->buf + 1;
/*
NTSTATUS status;
START_PROFILE(SMBsetattrE);
- ZERO_STRUCT(ft);
+ init_smb_file_time(&ft);
if (req->wct < 7) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
* Convert the DOS times into unix times.
*/
- ft.atime = convert_time_t_to_timespec(
+ ft.atime = time_t_to_full_timespec(
srv_make_unix_date2(req->vwv+3));
- ft.mtime = convert_time_t_to_timespec(
+ ft.mtime = time_t_to_full_timespec(
srv_make_unix_date2(req->vwv+5));
- ft.create_time = convert_time_t_to_timespec(
+ ft.create_time = time_t_to_full_timespec(
srv_make_unix_date2(req->vwv+1));
reply_outbuf(req, 0, 0);