From: Björn Jacke Date: Sun, 7 Jan 2024 04:09:58 +0000 (+0100) Subject: time.c: fix ctime which was feeded with the mtime seconds X-Git-Tag: samba-4.18.10~10 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d75a9acaf31aecbe3d0f5409350ddcadfd8e00a;p=thirdparty%2Fsamba.git time.c: fix ctime which was feeded with the mtime seconds This bug was introduced with 53a1d034f3e47ed3c in 2020. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15550 Signed-off-by: Bjoern Jacke Reviewed-by: Volker Lendecke (cherry picked from commit 2df2e34c3c1ccf76bbcc78586cbbb6433b6d30d5) --- diff --git a/lib/util/time.c b/lib/util/time.c index 773fd611a33..bc1ea5f6473 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -1450,7 +1450,7 @@ struct timespec get_ctimespec(const struct stat *pst) { struct timespec ret; - ret.tv_sec = pst->st_mtime; + ret.tv_sec = pst->st_ctime; ret.tv_nsec = get_ctimensec(pst); return ret; }