* Mon Apr 11 2005 Dan Walsh <dwalsh@redhat.com> 1.23.4-3

- remove is_selinux_enabled check from load_policy  (Bad idea)
This commit is contained in:
Daniel J Walsh 2005-04-11 21:26:18 +00:00
parent f9d71f4c01
commit d513bef494
2 changed files with 6 additions and 32 deletions

View File

@ -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 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 --- 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 +++ policycoreutils-1.23.4/load_policy/load_policy.c 2005-04-11 16:56:50.000000000 -0400
@@ -33,6 +33,7 @@ @@ -42,11 +42,6 @@
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); textdomain (PACKAGE);
#endif #endif
@ -18,24 +10,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/load_policy/load_policy.
- exit(1); - exit(1);
- } - }
- -
- while ((opt = getopt(argc, argv, "qb")) > 0) { while ((opt = getopt(argc, argv, "qb")) > 0) {
+ while ((opt = getopt(argc, argv, "fqb")) > 0) {
switch (opt) { switch (opt) {
+ case 'f':
+ force = 1;
+ break;
case 'b': 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]);
}

View File

@ -3,7 +3,7 @@
Summary: SELinux policy core utilities. Summary: SELinux policy core utilities.
Name: policycoreutils Name: policycoreutils
Version: 1.23.4 Version: 1.23.4
Release: 2 Release: 3
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -82,8 +82,8 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog %changelog
* Mon Apr 11 2005 Dan Walsh <dwalsh@redhat.com> 1.23.4-2 * Mon Apr 11 2005 Dan Walsh <dwalsh@redhat.com> 1.23.4-3
- Add -f qualifier for anaconda. Basically forces load even if selinux not enabled - remove is_selinux_enabled check from load_policy (Bad idea)
* Mon Apr 11 2005 Dan Walsh <dwalsh@redhat.com> 1.23.4-1 * Mon Apr 11 2005 Dan Walsh <dwalsh@redhat.com> 1.23.4-1
- Update to version from NSA - Update to version from NSA