coreutils
coreutils copied to clipboard
touch: enable touching a writable file of another user
This PR implements a feature that is explicitly tested by the GNU tests (touch/now-owned-by-other).
Sadly, it also reveals how difficult it is to pull off a specific platform-dependent syscall-trick in a way that kinda mostly remains platform-independent.
This PR uses a yet-to-be-merged feature of crate filetime, because there is no other way to make this particular syscall. Hence, this PR will remain in draft mode until the filetime PR lands and is released.
Changes since last push:
- Of course there was a formatting error (
&pathinstead ofpath)
Changes since last push:
- Clippy hates me (
#[allow(clippy::collapsible_else_if)])
GNU testsuite comparison:
GNU test failed: tests/timeout/timeout. tests/timeout/timeout is passing on 'main'. Maybe you have to rebase?
@BenWiederhake needs rebasing, sorry
This feature requires a feature in upstream filetime, but they seem to refuse: https://github.com/alexcrichton/filetime/pull/105
How would you like to proceed?