From: Ralph Boehme Date: Mon, 24 May 2021 10:03:28 +0000 (+0200) Subject: smbd: correctly initialize close timestamp fields X-Git-Tag: tevent-0.11.0~772 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f96cc29711181b5237a5b92c4bfb5e75fe2a73b9;p=thirdparty%2Fsamba.git smbd: correctly initialize close timestamp fields BUG: https://bugzilla.samba.org/show_bug.cgi?id=14714 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon May 24 16:56:22 UTC 2021 on sn-devel-184 --- diff --git a/selftest/knownfail.d/samba3.smb2.timestamps b/selftest/knownfail.d/samba3.smb2.timestamps deleted file mode 100644 index 04bdab81cf3..00000000000 --- a/selftest/knownfail.d/samba3.smb2.timestamps +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.timestamps.test_close_not_attrib.* diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c index 5948ba95a5d..da2a8fa59c8 100644 --- a/source3/smbd/smb2_close.c +++ b/source3/smbd/smb2_close.c @@ -228,10 +228,10 @@ static NTSTATUS smbd_smb2_close(struct smbd_smb2_request *req, uint16_t flags = 0; bool posix_open = false; - ZERO_STRUCTP(out_creation_ts); - ZERO_STRUCTP(out_last_access_ts); - ZERO_STRUCTP(out_last_write_ts); - ZERO_STRUCTP(out_change_ts); + *out_creation_ts = (struct timespec){0, SAMBA_UTIME_OMIT}; + *out_last_access_ts = (struct timespec){0, SAMBA_UTIME_OMIT}; + *out_last_write_ts = (struct timespec){0, SAMBA_UTIME_OMIT}; + *out_change_ts = (struct timespec){0, SAMBA_UTIME_OMIT}; *out_flags = 0; *out_allocation_size = 0;