coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make mv work better with SELinux.


From: Daniel J Walsh
Subject: Re: Make mv work better with SELinux.
Date: Thu, 08 Nov 2012 17:20:59 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Another pass at the patch.

This time -Z is not optional, only --context is.

- -Z or --context indicates use default label.

- --context=CTX uses previous behavior.

You can now do

cp -aZ and cp -Za and the right thing will happen.

I have turned off the warning SELinux is disabled if you specify -Z or
- --context.  Now it will quietly ignore.  I can add a comment to the usage if
you think it is worth while.   The reason I want to do this, is to allow
people to do "mkdir -Z /var/run/XYZ" in a script and not worry about whether
or not SELinux is enabled.  Currently we have lots of init script that do
things like

mkdir -Z /var/run/XYZ
restorecon /var/run/XYZ

Where restorecon quietly exits if SELinux is disabled.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCcMEsACgkQrlYvE4MpobMtdgCfduYKrGB3Igb4XJyi6AcPW/MV
pqIAoNXqgO4Sw0lbUt6xpWOacpG2dj2N
=3JB1
-----END PGP SIGNATURE-----

Attachment: 0001-build-Change-Z-opt-w-out-arg-label-target-with-defau.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]