From 0023f65fd7a2ba53b0209c7b1a66c5c30612d0c2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 7 Oct 2009 15:31:17 +0200 Subject: chcon: don't disable just because SELinux is disabled * src/chcon.c (main): Now that gnulib provides getfilecon wrappers, we can revert most of the 2009-10-05 commit 3a97d664, "chcon: exit immediately if SELinux is disabled", since chcon is still useful as long as the file system provides handlers for the security.* name space. gnulib's getfilecon wrappers ensure that an offending context now evokes a return value of -1. Prompted by comments from Stephen Smalley in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18378/focus=18394 * NEWS (Bug fixes): Mention it. --- src/chcon.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/chcon.c b/src/chcon.c index c0da6949a..fbfdb4d29 100644 --- a/src/chcon.c +++ b/src/chcon.c @@ -519,10 +519,6 @@ main (int argc, char **argv) usage (EXIT_FAILURE); } - if (is_selinux_enabled () != 1) - error (EXIT_FAILURE, 0, - _("%s may be used only on a SELinux kernel"), program_name); - if (reference_file) { if (getfilecon (reference_file, &ref_context) < 0) -- cgit v1.2.3-54-g00ecf