aboutsummaryrefslogtreecommitdiffstats
path: root/src/mv.c
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2009-02-17 15:53:39 +0100
committerJim Meyering <meyering@redhat.com>2009-02-18 15:27:10 +0100
commit8c243ff965d477a89582a1b329923516a4d64668 (patch)
treeb0b9d6e5c1d4f3b9aa0134ffe327b1c9ddec4aed /src/mv.c
parentadd missing copyright dates (diff)
downloadcoreutils-8c243ff965d477a89582a1b329923516a4d64668.tar.gz
coreutils-8c243ff965d477a89582a1b329923516a4d64668.zip
cp: -a now preserves SELinux context, with reduced diagnostics
* copy.c (copy_reg): Reduce SELinux context diagnostics for 'cp -a'. (copy_internal): Likewise * copy.h (cp_options): Add boolean reduce_diagnostics. * cp.c (usage): Say that --archive (-a) behaves like -dR --preserve=all. (cp_option_init): Initialize added reduce_diagnostics. (main): Add reduce_diagnostics for the -a option, and preserve SELinux context, if possible. * mv.c (cp_options_init): Initialize new cp_options booleans. * install.c (cp_option_init): Likewise. * NEWS: Mention those behaviour changes. * doc/coreutils.texi: Document --preserve=context, document that diagnostics are not shown for failures of non-mandatory attributes (just SELinux at the moment). * tests/cp/cp-a-selinux: Check not only failures, but succesful use of preserving SELinux context in cp.
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mv.c b/src/mv.c
index db9207bd5..77ad2fbe9 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -122,9 +122,11 @@ cp_option_init (struct cp_options *x)
x->preserve_mode = true;
x->preserve_timestamps = true;
x->preserve_security_context = selinux_enabled;
+ x->reduce_diagnostics = false;
x->require_preserve = false; /* FIXME: maybe make this an option */
x->require_preserve_context = false;
x->preserve_xattr = true;
+ x->require_preserve_xattr = false;
x->recursive = true;
x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */
x->symbolic_link = false;