diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | src/chcon.c | 4 | ||||
-rw-r--r-- | src/runcon.c | 2 |
3 files changed, 6 insertions, 1 deletions
@@ -612,6 +612,7 @@ Wis Macomson wis.macomson@intel.com Wojciech Purczynski cliph@isec.pl Wolfram Kleff kleff@cs.uni-bonn.de Won-kyu Park wkpark@chem.skku.ac.kr +Yanko Kaneti yaneti@declera.com Yann Dirson dirson@debian.org Zvi Har'El rl@math.technion.ac.il diff --git a/src/chcon.c b/src/chcon.c index fbfdb4d29..c0da6949a 100644 --- a/src/chcon.c +++ b/src/chcon.c @@ -519,6 +519,10 @@ 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) diff --git a/src/runcon.c b/src/runcon.c index e0019da2a..f87eada6a 100644 --- a/src/runcon.c +++ b/src/runcon.c @@ -195,7 +195,7 @@ main (int argc, char **argv) if (is_selinux_enabled () != 1) error (EXIT_FAILURE, 0, - _("runcon may be used only on a SELinux kernel")); + _("%s may be used only on a SELinux kernel"), program_name); if (context) { |