diff --git a/sed/sed.c b/sed/sed.c index ea147e6..e43a92e 100644 --- a/sed/sed.c +++ b/sed/sed.c @@ -29,6 +29,7 @@ #include "progname.h" #include "version.h" #include "xalloc.h" +#include #include "version-etc.h" @@ -130,6 +131,22 @@ General help using GNU software: .\n")); fprintf (out, _("E-mail bug reports to: <%s>.\n"), PACKAGE_BUGREPORT); } +static void +selinux_support (void) +{ + putchar ('\n'); +#if HAVE_SELINUX_SELINUX_H + puts (_("This sed program was built with SELinux support.")); + if (is_selinux_enabled()) + puts (_("SELinux is enabled on this system.")); + else + puts (_("SELinux is disabled on this system.")); +#else + puts (_("This sed program was built without SELinux support.")); +#endif + putchar ('\n'); +} + _Noreturn static void usage (int status) { @@ -344,6 +361,7 @@ main (int argc, char **argv) case 'v': version_etc (stdout, program_name, PACKAGE_NAME, Version, AUTHORS, (char *) NULL); + selinux_support (); contact (false); ck_fclose (NULL); exit (EXIT_SUCCESS);