diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-05-21 11:38:13 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-05-23 02:04:24 +0100 |
commit | 4ce7488e8d96080f18b518bcf6a6356e0c392dda (patch) | |
tree | d6ab80621d20c4eea51f817f105d68785434e789 /tests/mkdir/selinux.sh | |
parent | b5f332cfe06956f972aa385b38a40d2a0c675d09 (diff) | |
download | coreutils-4ce7488e8d96080f18b518bcf6a6356e0c392dda.tar.xz |
mkdir: fix -pZ with existing parent directories
When the parent directory exists and has a different
default context to the final directory, the context
was incorrectly left as that of the parent directory.
* src/mkdir.c (process_dir): Because defaultcon() is called for
existing ancestors (as it must be to avoid races), then we must
unconditionally call restorecon() on the last component due to
the already documented caveat with make_dir_parents().
Alternatively you could temp disable o->set_security_context
around make_dir_parents(), but that would be subject to races.
* tests (tests/mkdir/restorecon.sh): Add a TODO for improvement.
Reference mknod and mkfifo with print_ver_.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/20616
Diffstat (limited to 'tests/mkdir/selinux.sh')
0 files changed, 0 insertions, 0 deletions