From e3ad7e36a3fc8f5bd000481ac34c8fd3d2d747fd Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 28 Nov 2019 15:46:27 +0000 Subject: [PATCH] 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 --- source3/lib/time.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.3