[Ovirt-devel] [PATCH node] do not preserve SELinux context when copying

Jim Meyering jim at meyering.net
Tue Sep 23 14:09:31 UTC 2008


Alan Pevec <apevec at redhat.com> wrote:
> iso9660_t cannot be applied on the normal filesystems
...
> diff --git a/scripts/ovirt-early b/scripts/ovirt-early
> index 3d2d0ca..6dff7ab 100755
> --- a/scripts/ovirt-early
> +++ b/scripts/ovirt-early
> @@ -263,9 +263,9 @@ local_install() {
>        rm -rf $ovirt/LiveOS
>        mkdir -p $ovirt/boot/grub
>        mkdir -p $ovirt/LiveOS
> -      cp -a $live/LiveOS/squashfs.img $ovirt/LiveOS \
> -      && cp -a $live/$syslinux/initrd0.img $ovirt/boot \
> -      && cp -a $live/$syslinux/vmlinuz0 $ovirt/boot
> +      cp -p $live/LiveOS/squashfs.img $ovirt/LiveOS \
> +      && cp -p $live/$syslinux/initrd0.img $ovirt/boot \
> +      && cp -p $live/$syslinux/vmlinuz0 $ovirt/boot

ACK.

FYI, the fact that "cp -a" copies SELinux attributes is Red Hat specific.
Never versions of cp make cp's -a act as documented: "like -dpPR",
which does not include copying SELinux context.




More information about the ovirt-devel mailing list