HomeFreeBSD

MFC r278817: touch: Fix some subtle bugs related to NULL times fallback:

Description

MFC r278817: touch: Fix some subtle bugs related to NULL times fallback:

  • Do not subvert vfs.timestamp_precision by reading the time and passing that to utimensat(). Instead, pass UTIME_NOW. A fallback to a NULL times pointer is no longer used.
  • Do not ignore -a/-m if the user has write access but does not own the file. Leave timestamps unchanged using UTIME_OMIT and do not fall back to a NULL times pointer (which would set both timestamps) if that fails.

Details

Provenance
jillesAuthored on
Parents
rS297782: MFC r277645: cp,mv,touch: Set timestamps with nanosecond precision.
Branches
Unknown
Tags
Unknown