coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

touch: enable touching a writable file of another user

Open BenWiederhake opened this issue 1 year ago • 5 comments

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.

BenWiederhake avatar Mar 25 '24 22:03 BenWiederhake

Changes since last push:

  • Of course there was a formatting error (&path instead of path)

BenWiederhake avatar Mar 25 '24 22:03 BenWiederhake

Changes since last push:

  • Clippy hates me (#[allow(clippy::collapsible_else_if)])

BenWiederhake avatar Mar 25 '24 22:03 BenWiederhake

GNU testsuite comparison:

GNU test failed: tests/timeout/timeout. tests/timeout/timeout is passing on 'main'. Maybe you have to rebase?

github-actions[bot] avatar Mar 31 '24 01:03 github-actions[bot]

@BenWiederhake needs rebasing, sorry

sylvestre avatar Sep 14 '24 07:09 sylvestre

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?

BenWiederhake avatar Sep 15 '24 03:09 BenWiederhake