Skip to content
Snippets Groups Projects
Isaiah Norton's avatar
Isaiah authored
SystemTools::Touch should only require +w file permissions. The previous
implementation used `stat` to get the current time, and then passed that
time to one of utimensat/utimes/utime. However, utimes/utimensat only
permit an arbitrary-time argument to be passed by the file owner.

Therefore, per the docs, we pass NULL for the `times` argument to utimes
and utimensat, to indicate using the current time. This is permitted for
any UID with +w on the file.

Remove plain `utime` fallback that is no longer necessary.
4f9fb9aa
History

KWSys

Introduction

KWSys is the Kitware System Library. It provides platform-independent APIs to many common system features that are implemented differently on every platform. This library is intended to be shared among many projects at the source level, so it has a configurable namespace. Each project should configure KWSys to use a namespace unique to itself. See comments in CMakeLists.txt for details.

License

KWSys is distributed under the OSI-approved BSD 3-clause License. See Copyright.txt for details.

Reporting Bugs

KWSys has no independent issue tracker. After encountering an issue (bug) please submit a patch using the instructions for Contributing. Otherwise please report the issue to the tracker for the project that hosts the copy of KWSys in which the problem was found.

Contributing

See CONTRIBUTING.rst for instructions to contribute.