]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
time.c: fix ctime which was feeded with the mtime seconds
authorBjörn Jacke <bjacke@samba.org>
Sun, 7 Jan 2024 04:09:58 +0000 (05:09 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 16 Jan 2024 14:37:31 +0000 (14:37 +0000)
This bug was introduced with 53a1d034f3e47ed3c in 2020.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15550

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
lib/util/time.c

index 31bb0a7aad9fccedbed944548feb034a541901ef..47ae32017d00c91109bbb6bcc5490e57306ad250 100644 (file)
@@ -1446,7 +1446,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;
 }