Repository navigation
chown, chgrp: change a directory operand that cannot be read - #15124
abendrothj wants to merge 3 commits into
Conversation
Merging this PR will improve performance by 4.17%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
214b811 to
f1ff0e1
Compare
f1ff0e1 to
d2406f8
Compare
d2406f8 to
c17a06e
Compare
|
sorry but it needs to be rebased |
c17a06e to
4f8ed95
Compare
The error itself stays on stderr, as in GNU. On Linux, files below a -R operand now get the line too.
On Linux the file is held with O_PATH, rechecked and changed through that descriptor, so a rename after the check no longer redirects it.
On Linux it was skipped without a message; it is now changed by name, or held with O_PATH under --from. -R still leaves it alone, as in GNU.
4f8ed95 to
a3ed451
Compare
Based on #15029; only the last commit is new here.
On Linux, a directory operand was changed through a descriptor opened for reading, and when that open failed the change was skipped without a message.
Without -R the directory is now changed like any other file: by name, or through an O_PATH descriptor with --from. Under -R it's still left alone with exit 1, as with GNU 9.12. Test:
test_chown_unreadable_dir_operand.Closes #15114