Bug 802006 - cp -avZ behaves incorrectly on a system without SELinux
Summary: cp -avZ behaves incorrectly on a system without SELinux
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 16
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-10 07:12 UTC by Adam Pribyl
Modified: 2012-03-10 07:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-10 07:51:17 UTC
Type: ---


Attachments (Terms of Use)

Description Adam Pribyl 2012-03-10 07:12:59 UTC
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 07:51:17 UTC
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.