From d513bef494b3986e64d8361a070b05953e8727a4 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 11 Apr 2005 21:26:18 +0000 Subject: [PATCH] * Mon Apr 11 2005 Dan Walsh 1.23.4-3 - remove is_selinux_enabled check from load_policy (Bad idea) --- policycoreutils-rhat.patch | 32 +++----------------------------- policycoreutils.spec | 6 +++--- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 0534527..84d8d89 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,15 +1,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy.c policycoreutils-1.23.4/load_policy/load_policy.c --- nsapolicycoreutils/load_policy/load_policy.c 2005-04-11 16:00:46.000000000 -0400 -+++ policycoreutils-1.23.4/load_policy/load_policy.c 2005-04-11 16:34:52.000000000 -0400 -@@ -33,6 +33,7 @@ - unsigned len, i; - size_t data_size; - struct stat sb; -+ int force=0; - void *map, *data; - char *polpath, *boolpath = NULL, **names; - -@@ -42,13 +43,11 @@ ++++ policycoreutils-1.23.4/load_policy/load_policy.c 2005-04-11 16:56:50.000000000 -0400 +@@ -42,11 +42,6 @@ textdomain (PACKAGE); #endif @@ -18,24 +10,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy. - exit(1); - } - -- while ((opt = getopt(argc, argv, "qb")) > 0) { -+ while ((opt = getopt(argc, argv, "fqb")) > 0) { + while ((opt = getopt(argc, argv, "qb")) > 0) { switch (opt) { -+ case 'f': -+ force = 1; -+ break; case 'b': - setbools = 1; - break; -@@ -61,6 +60,11 @@ - } - } - -+ if (force == 0 && is_selinux_enabled() <= 0 ) { -+ fprintf( stderr, "%s: Requires an enabled SELinux kernel.\n", argv[0] ); -+ exit(1); -+ } -+ - if ((argc-optind) != 1 && (argc-optind) != 2) { - usage(argv[0]); - } diff --git a/policycoreutils.spec b/policycoreutils.spec index 9368623..243181f 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,7 +3,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.23.4 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -82,8 +82,8 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sestatus.conf %changelog -* Mon Apr 11 2005 Dan Walsh 1.23.4-2 -- Add -f qualifier for anaconda. Basically forces load even if selinux not enabled +* Mon Apr 11 2005 Dan Walsh 1.23.4-3 +- remove is_selinux_enabled check from load_policy (Bad idea) * Mon Apr 11 2005 Dan Walsh 1.23.4-1 - Update to version from NSA