diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-17 13:22:06 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-18 08:31:59 -0800 |
| commit | d0f035fc64fb348cb092fbb6ae7e8ce76b4d82db (patch) | |
| tree | 1cb743eeda83b1d8a04a7735e66337deed308af8 /src/digest.c | |
| parent | maint: update NEWS for macOS fix (diff) | |
| download | coreutils-d0f035fc64fb348cb092fbb6ae7e8ce76b4d82db.tar.gz coreutils-d0f035fc64fb348cb092fbb6ae7e8ce76b4d82db.zip | |
cp: fix security context race
This fixes an issue introduced in the fix for Bug#11100.
* NEWS: Mention this.
* src/copy.c (copy_reg): Fix obscure bug where open-without-CREAT
failed with ENOENT and we forget to call set_process_security_ctx
before calling open-with-CREAT. Also, don’t bother to unlink
DST_NAME if open failed with ENOENT; and if unlink fails with
ENOENT, don’t consider that to be an error (someone else could
have removed the file for us, and that’s OK). Also, don’t worry
about move mode, since we use O_EXCL|O_CREAT and so won’t open
an existing file.
Diffstat (limited to 'src/digest.c')
0 files changed, 0 insertions, 0 deletions
