Prior to
572d4e3a56eef00e29f93482daa21647af7310d0 it was sufficient to
initialize struct timespec to zero to return NTTIME 0 (ie not set) over
SMB.
This fixes the same problem from bug 14714 where the timestamps in an SMB2 CLOSE
response.
Windows of course does return *some* timestamps, but as it's neither documented
nor was I able to figure out where they would be coming from, as well as the
Windows client apparently doesn't care, I didn't bother with implementing some
sophisticated heuristic to return some timestamps.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14731
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 9 20:38:02 UTC 2021 on sn-devel-184
+++ /dev/null
-^samba3.smb2.create.quota-fake-file\(nt4_dc\)
-^samba3.smb2.create.quota-fake-file\(ad_dc\)
return NT_STATUS_NO_MEMORY;
}
smb_fname->st = (SMB_STRUCT_STAT) { .st_ex_nlink = 1 };
+ smb_fname->st.st_ex_btime = (struct timespec){0, SAMBA_UTIME_OMIT};
+ smb_fname->st.st_ex_atime = (struct timespec){0, SAMBA_UTIME_OMIT};
+ smb_fname->st.st_ex_mtime = (struct timespec){0, SAMBA_UTIME_OMIT};
+ smb_fname->st.st_ex_ctime = (struct timespec){0, SAMBA_UTIME_OMIT};
+
*_smb_fname = smb_fname;
return NT_STATUS_OK;
}