diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-20 13:48:40 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-20 13:50:35 -0800 |
| commit | 5012223d78b8dc40159c30b391e2ce257f465bcd (patch) | |
| tree | a2ae8846ea71c53d4dcd2e37debb167d49ac0559 /scripts/git-hooks/applypatch-msg | |
| parent | maint: prefer MAYBE_UNUSED (diff) | |
| download | coreutils-5012223d78b8dc40159c30b391e2ce257f465bcd.tar.gz coreutils-5012223d78b8dc40159c30b391e2ce257f465bcd.zip | |
cp: fix --preserve=ownership permissions bug
This fixes a bug that I introduced in
2006-12-06T19:44:08Z!eggert@cs.ucla.edu.
* src/copy.c (USE_XATTR): New macro.
(copy_reg): Use it to help the compiler. Prefer open u+w to a
later chmod u=rw; u+r isn’t needed for xattr. For the later u-r,
do only one (or zero) chmod calls instead of two (or one).
In the last chmod, respect the umask instead of ignoring it.
* tests/cp/preserve-mode.sh: Test for the bug.
Diffstat (limited to 'scripts/git-hooks/applypatch-msg')
0 files changed, 0 insertions, 0 deletions
