From 35573c04465820f78642a22231a4040ca855e1e1 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 18 May 2023 18:12:19 +0200 Subject: [PATCH] mdssvc: fix returning file modification date for older Mac releases Mac 10.10 uses kMDItemContentModificationDate instead of kMDItemFSContentChangeDate. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15427 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jul 26 23:42:44 UTC 2023 on atb-devel-224 (cherry picked from commit c2e83ebe726b7bc42b329198214c784936f19888) Autobuild-User(v4-18-test): Jule Anger Autobuild-Date(v4-18-test): Mon Jul 31 09:11:21 UTC 2023 on atb-devel-224 --- source3/rpc_server/mdssvc/mdssvc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c index 7a8cbcf3588..a7d5d7afc02 100644 --- a/source3/rpc_server/mdssvc/mdssvc.c +++ b/source3/rpc_server/mdssvc/mdssvc.c @@ -188,7 +188,9 @@ static bool add_filemeta(struct mds_ctx *mds_ctx, if (result != 0) { return false; } - } else if (strcmp(attribute, "kMDItemFSContentChangeDate") == 0) { + } else if (strcmp(attribute, "kMDItemFSContentChangeDate") == 0 || + strcmp(attribute, "kMDItemContentModificationDate") == 0) + { sl_time = convert_timespec_to_timeval(sp->st_ex_mtime); result = dalloc_add_copy(meta, &sl_time, sl_time_t); if (result != 0) {