From f9d71f4c0165ee7a8f10549ff169ebc51cc0f5f0 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 11 Apr 2005 20:47:37 +0000 Subject: [PATCH] * Mon Apr 11 2005 Dan Walsh 1.23.4-2 - Add -f qualifier for anaconda. Basically forces load even if selinux not enabled --- policycoreutils-rhat.patch | 56 ++++++++++++++++++++++++-------------- policycoreutils.spec | 8 +++++- sources | 1 - 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 0de564c..0534527 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,27 +1,41 @@ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy.c policycoreutils-1.23.3/load_policy/load_policy.c ---- nsapolicycoreutils/load_policy/load_policy.c 2005-03-01 22:58:51.000000000 -0500 -+++ policycoreutils-1.23.3/load_policy/load_policy.c 2005-04-07 17:01:19.000000000 -0400 -@@ -42,6 +42,11 @@ +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 @@ textdomain (PACKAGE); #endif -+ if (is_selinux_enabled() <= 0 ) { -+ fprintf( stderr, "%s: Requires an enabled SELinux kernel.\n" ); +- if (is_selinux_enabled() <= 0 ) { +- fprintf( stderr, "%s: Requires an enabled SELinux kernel.\n", argv[0] ); +- exit(1); +- } +- +- while ((opt = getopt(argc, argv, "qb")) > 0) { ++ while ((opt = getopt(argc, argv, "fqb")) > 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); + } + - while ((opt = getopt(argc, argv, "qb")) > 0) { - switch (opt) { - case 'b': -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.23.3/restorecon/restorecon.c ---- nsapolicycoreutils/restorecon/restorecon.c 2005-03-08 14:03:04.000000000 -0500 -+++ policycoreutils-1.23.3/restorecon/restorecon.c 2005-04-07 16:56:57.000000000 -0400 -@@ -211,7 +211,7 @@ - } else - if (verbose && - (verbose > 1 || !user_only_changed)) -- fprintf(stderr,"%s reset context %s:%s->%s\n", -+ fprintf(stderr,"%s reset %s context %s->%s\n", - progname, filename, (retcontext >= 0 ? prev_context : ""), scontext); - } - if (verbose > 1 && customizable>0) { + if ((argc-optind) != 1 && (argc-optind) != 2) { + usage(argv[0]); + } diff --git a/policycoreutils.spec b/policycoreutils.spec index 2f65dc5..9368623 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,10 +3,11 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.23.4 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz +Patch: policycoreutils-rhat.patch Prefix: %{_prefix} BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver} @@ -33,6 +34,8 @@ context. %prep %setup -q +%patch -p1 -b .rhat + %build make CFLAGS="%{optflags}" all @@ -79,6 +82,9 @@ 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-1 - Update to version from NSA * Merged load_policy is_selinux_enabled patch from Dan Walsh. diff --git a/sources b/sources index c634484..6169079 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -5043b2a2b52ad21c55141798fef52e91 policycoreutils-1.23.3.tgz 960522dcdc378acc69c6da881c07c810 policycoreutils-1.23.4.tgz