From: Ralph Boehme Date: Thu, 28 Nov 2019 15:46:27 +0000 (+0000) Subject: s3:lib: let round_timespec() handle SAMBA_UTIME_OMIT X-Git-Tag: ldb-2.1.0~421 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3ad7e36a3fc8f5bd000481ac34c8fd3d2d747fd;p=thirdparty%2Fsamba.git s3:lib: let round_timespec() handle SAMBA_UTIME_OMIT This ensures callers are not required to do the check themselves and we don't clobber omit-timespecs in this function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/time.c b/source3/lib/time.c index 94bf951f197..e81ecfe3f46 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -141,6 +141,10 @@ void srv_put_dos_date3(char *buf,int offset,time_t unixdate) void round_timespec(enum timestamp_set_resolution res, struct timespec *ts) { + if (is_omit_timespec(ts)) { + return; + } + switch (res) { case TIMESTAMP_SET_SECONDS: round_timespec_to_sec(ts);