This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 802006 - cp -avZ behaves incorrectly on a system without SELinux
cp -avZ behaves incorrectly on a system without SELinux
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
16
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-10 02:12 EST by Adam Pribyl
Modified: 2012-03-10 02:51 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-10 02:51:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Adam Pribyl 2012-03-10 02:12:59 EST
Description of problem:
cp -avZ does not copy a first directory in a bash expanded list, while cp -av works OK on a system where SELinux is not enabled.

Version-Release number of selected component (if applicable):
8.12-6.fc16.x86_64

How reproducible:
Always

Steps to Reproduce:
1. mkdir -p cptest/bin cptest/nonbin cptarget
2. cp -avZ cptest/* cptarget/
  
Actual results:
Warning:  ignoring --context (-Z). It requires a SELinux enabled kernel.
`cptest/nonbin' -> `cptarget/nonbin'

Only nonbin subdir si copied. The bin subdir is skipped.

Expected results:
cp -av copies both dirs.

This is true for both i686 and x86_64.
Comment 1 Ondrej Vasik 2012-03-10 02:51:17 EST
Thanks for report, but sorry - this not a bug. This is expected behaviour and misusing -Z option. Non-upstream, now deprecated -Z option requires an argument - to which the context of the destination files is set - therefore the first argument is "eaten" and skipped.

Note You need to log in before you can comment on or make changes to this bug.