From: Ralph Boehme Date: Tue, 5 Oct 2021 13:10:33 +0000 (+0200) Subject: lib: handle NTTIME_THAW in nt_time_to_full_timespec() X-Git-Tag: ldb-2.5.0~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ed71ad7e6aa98a34cfde95d7d62c46694d58469;p=thirdparty%2Fsamba.git lib: handle NTTIME_THAW in nt_time_to_full_timespec() 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 Reviewed-by: Jeremy Allison --- diff --git a/lib/util/time.c b/lib/util/time.c index e6a0668cf90..cec91c14791 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -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 index d183ec1f583..00000000000 --- a/selftest/knownfail.d/samba3.smb2.timestamps +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.timestamps.freeze-thaw\(.*\)$