]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r278817: touch: Fix some subtle bugs related to NULL times fallback:
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 10 Apr 2016 15:24:07 +0000 (15:24 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 10 Apr 2016 15:24:07 +0000 (15:24 +0000)
commit9dfde242cfc6137526041860248b7cfe8c8f94f5
tree4a2a93407dad45235e84f9e8adbf567be858cbac
parente750c877b08d33378099af535438017657af4dc1
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@297783 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/touch/touch.c