[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with
From: |
Pádraig Brady |
Subject: |
Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics |
Date: |
Mon, 9 Feb 2009 15:51:31 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Ondřej Vašík wrote:
> Hello,
> I sent patch about cp -a and it's failure to preserve SELinux context in
> October 08.
I missed that.
> Meanwhile xattr support was added to cp. As described in
> info pages -a option means "Preserve as much as possible of the
> structure and attributes of the original files". Therefore it should
> preserve xattr if possible as well.
>
> After patch it should work like:
> 1) cp -a tries to preserve SELinux context and xattr, but doesn't inform
> about possible failures
> 2) cp --preserve=all tries to preserve SELinux context and xattr, but
> does inform about failures and doesn't fail if xattr/SELinux context are
> not preserved
> 3) cp --preserve=context,xattr obviously tries to preserve attributes,
> inform about failures and does fail if xattr/SELinux context is not
> preserved
I wondered about this in my review of Kamil's xattr patch...
"I'm a bit surprised that -a doesn't copy xattrs actually:
-a does copy ACLs (but doesn't copy [selinux] context),
but I guess if xattrs are a superset of SELinux context,
then that's consistent."
So making -a copy everything possible without warnings seems sensible to me.
Note ACLs are copied when --preserve=mode is specified/implied.
> NOTE: Added documentation of --preserve=context, description of current
> behaviour to cp --preserve=all and cp -a documentation. Added tests to
> ensure that cp -a actually works with SELinux (until now it was checking
> just failures.
I also wondered why there was no documentation of --preserve=context
so +1 from me
cheers,
Pádraig.
- [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Ondřej Vašík, 2009/02/09
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics,
Pádraig Brady <=
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Jim Meyering, 2009/02/11
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Ondřej Vašík, 2009/02/16
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Jim Meyering, 2009/02/16
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Ondřej Vašík, 2009/02/17
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Jim Meyering, 2009/02/17
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Ondřej Vašík, 2009/02/17
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Jim Meyering, 2009/02/17
- Re: [PATCH]: cp: make -a option preserve SELinux context and xattrs with reduced diagnostics, Jim Meyering, 2009/02/18