NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/60801: hfs confuses ctime with birthtime
>Number: 60801
>Category: kern
>Synopsis: hfs confuses ctime with birthtime
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 26 15:10:00 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, ...
>Organization:
The NetHFS+ Foundabug, Inctime.
>Environment:
>Description:
hfs reports `date_created' as ctime, and doesn't report
birthtime:
612 hfs_time_to_timespec(f->date_created, &vap->va_ctime);
613 hfs_time_to_timespec(f->date_content_mod, &vap->va_mtime);
614 hfs_time_to_timespec(f->date_accessed, &vap->va_atime);
https://nxr.netbsd.org/xref/src/sys/fs/hfs/hfs_vnops.c?r=1.40#612
(Likewise for directories.)
But presumably `date_created' is supposed to mean birthtime,
not file attribute change time, i.e., ctime. These appear to
be recorded separately in HFS:
363 uint32_t date_created;
364 uint32_t date_content_mod;
365 uint32_t date_attrib_mod;
366 uint32_t date_accessed;
367 uint32_t date_backedup;
https://nxr.netbsd.org/xref/src/sys/fs/hfs/libhfs.h?r=1.9#363
>How-To-Repeat:
code inspection
>Fix:
Yes, please!
Home |
Main Index |
Thread Index |
Old Index