]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: correctly initialize close timestamp fields
authorRalph Boehme <slow@samba.org>
Mon, 24 May 2021 10:03:28 +0000 (12:03 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 24 May 2021 16:56:22 +0000 (16:56 +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

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 5948ba95a5df1c7346e9316cb2ff2331d44e8b5a..da2a8fa59c8b83d22d85a12d2691c7d98dece6c2 100644 (file)
@@ -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;