Skip to contentSkip to conversation

Make -B flag force rebuild (without changes)

SEMODULE Ivan Gyurdiev 1 participant 1 message Dec 24, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Use semanage_set_rebuild() to make the -B flag force a rebuild. This is necessary since I changed commit to only rebuild if changes were made.

The whitespace in semodule is an awful mess..

policycoreutils/semodule/semodule.c +6 -6
diff -Naurp --exclude-from excludes old/policycoreutils/semodule/semodule.c new/policycoreutils/semodule/semodule.c
@@ -334,13 +334,13 @@ int main(int argc, char *argv[]) {
         }
         
         if (commit) {
-                if (verbose) {
-                        printf("Committing changes:\n");
-                }
-		if (no_reload) {
+		if (verbose)
+			printf("Committing changes:\n");
+		if (no_reload)
 			semanage_set_reload(sh, 0);
-		}
-                result = semanage_commit(sh);
+		if (build)
+			semanage_set_rebuild(sh, 1);
+ 		result = semanage_commit(sh);
         }
         
         if (result < 0) {