smbd: correctly initialize close timestamp fields
authorRalph Boehme <slow@samba.org>
Mon, 24 May 2021 10:03:28 +0000 (12:03 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 26 May 2021 11:43:31 +0000 (11:43 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14714

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): Mon May 24 16:56:22 UTC 2021 on sn-devel-184

(cherry picked from commit f96cc29711181b5237a5b92c4bfb5e75fe2a73b9)

selftest/knownfail.d/samba3.smb2.timestamps [deleted file]
source3/smbd/smb2_close.c

diff --git a/selftest/knownfail.d/samba3.smb2.timestamps b/selftest/knownfail.d/samba3.smb2.timestamps
deleted file mode 100644 (file)
index 04bdab8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.timestamps.test_close_not_attrib.*
index 229b41cd91c3d002a1792cb4d4fa7a712f79d57c..03c601563707a4b92657da5bae7a5c23c5300fae 100644 (file)
@@ -225,10 +225,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;