Blob Blame History Raw
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", 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);
+	}
+
 	if ((argc-optind) != 1 && (argc-optind) != 2) {
 		usage(argv[0]);
 	}