]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: handle NTTIME_THAW in nt_time_to_full_timespec()
authorRalph Boehme <slow@samba.org>
Tue, 5 Oct 2021 13:10:33 +0000 (15:10 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 28 Oct 2021 18:11:28 +0000 (18:11 +0000)
Preliminary handling of NTTIME_THAW to avoid NTTIME_THAW is passed as some
mangled value down to the VFS set timestamps function.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
RN: Avoid storing NTTIME_THAW (-2) as value on disk

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/time.c
selftest/knownfail.d/samba3.smb2.timestamps [deleted file]

index e6a0668cf90fffae8c86e01c5d80bc174e1c2c8d..cec91c1479118bbbe0259edf1f0066871b1027ad 100644 (file)
@@ -1128,10 +1128,10 @@ struct timespec nt_time_to_full_timespec(NTTIME nt)
        if (nt == NTTIME_OMIT) {
                return make_omit_timespec();
        }
-       if (nt == NTTIME_FREEZE) {
+       if (nt == NTTIME_FREEZE || nt == NTTIME_THAW) {
                /*
-                * This should be returned as SAMBA_UTIME_FREEZE in the
-                * future.
+                * This should be returned as SAMBA_UTIME_FREEZE or
+                * SAMBA_UTIME_THAW in the future.
                 */
                return make_omit_timespec();
        }
diff --git a/selftest/knownfail.d/samba3.smb2.timestamps b/selftest/knownfail.d/samba3.smb2.timestamps
deleted file mode 100644 (file)
index d183ec1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.timestamps.freeze-thaw\(.*\)$