mdssvc: prepare for returning timestamps with sub-seconds granularity
authorRalph Boehme <slow@samba.org>
Wed, 17 May 2023 14:37:36 +0000 (16:37 +0200)
committerJule Anger <janger@samba.org>
Mon, 31 Jul 2023 08:05:14 +0000 (08:05 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15427

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9dc66fecf7c1743d264c5c4f8978b77bab75ed86)

source3/rpc_server/mdssvc/mdssvc.c

index c394a180b1aca460575caf1419de2f1dd7a3452f..7a8cbcf3588e36cf3376591726b0ecbc97b8a492 100644 (file)
@@ -189,7 +189,7 @@ static bool add_filemeta(struct mds_ctx *mds_ctx,
                                return false;
                        }
                } else if (strcmp(attribute, "kMDItemFSContentChangeDate") == 0) {
-                       sl_time.tv_sec = sp->st_ex_mtime.tv_sec;
+                       sl_time = convert_timespec_to_timeval(sp->st_ex_mtime);
                        result = dalloc_add_copy(meta, &sl_time, sl_time_t);
                        if (result != 0) {
                                return false;