* Thu Apr 7 2005 Dan Walsh <dwalsh@redhat.com> 1.23.3-2

- Don't run load_policy on a non SELinux kernel.
This commit is contained in:
Daniel J Walsh 2005-04-07 21:09:22 +00:00
parent 2919c0f4b8
commit ae8bbf5a65
2 changed files with 22 additions and 4 deletions

View File

@ -1,6 +1,21 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.23.2/restorecon/restorecon.c
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 @@
textdomain (PACKAGE);
#endif
+ if (is_selinux_enabled() <= 0 ) {
+ fprintf( stderr, "%s: Requires an enabled SELinux kernel.\n" );
+ 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.2/restorecon/restorecon.c 2005-04-06 09:42:05.000000000 -0400
+++ policycoreutils-1.23.3/restorecon/restorecon.c 2005-04-07 16:56:57.000000000 -0400
@@ -211,7 +211,7 @@
} else
if (verbose &&

View File

@ -3,7 +3,7 @@
Summary: SELinux policy core utilities.
Name: policycoreutils
Version: 1.23.3
Release: 1
Release: 2
License: GPL
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -34,7 +34,7 @@ context.
%prep
%setup -q
%patch -p1 -b rhat
%patch -p1 -b .rhat
%build
make CFLAGS="%{optflags}" all
@ -81,6 +81,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog
* Thu Apr 7 2005 Dan Walsh <dwalsh@redhat.com> 1.23.3-2
- Don't run load_policy on a non SELinux kernel.
* Wed Apr 6 2005 Dan Walsh <dwalsh@redhat.com> 1.23.3-1
- Update to version from NSA
* Merged context validation patch for genhomedircon from Eric Paris.