libsepol: Write CIL default MLS rules on separate lines

When converting a non-MLS kernel binary policy to CIL, write the CIL
default MLS rules (since CIL requires at least one sensitivity,
and sensitivityorder statements) on separate lines.

This improves the readability of the resulting CIL policy.

Signed-off-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
James Carter 2020-05-22 10:55:11 -04:00 committed by Stephen Smalley
parent d531a851bd
commit d379ee7e06

View file

@ -777,9 +777,9 @@ exit:
static void write_default_mls_level(FILE *out)
{
sepol_printf(out, "(sensitivity s0)");
sepol_printf(out, "(sensitivityorder (s0))");
sepol_printf(out, "(level %s (s0))", DEFAULT_LEVEL);
sepol_printf(out, "(sensitivity s0)\n");
sepol_printf(out, "(sensitivityorder (s0))\n");
sepol_printf(out, "(level %s (s0))\n", DEFAULT_LEVEL);
}
static int map_sensitivity_aliases_to_strs(char *key, void *data, void *args)