libsepol: fix missing double quotes in typetransition CIL rule

CIL Reference Guide defines typetransition rule with double quotes
around object name, but those are not present in the format string.

This patch fixes this issue, so the CIL output produced by
sepol_kernel_policydb_to_cil() is in the correct format.

Signed-off-by: Juraj Marcin <juraj@jurajmarcin.com>
This commit is contained in:
Juraj Marcin 2022-08-25 15:27:18 +02:00 committed by James Carter
parent c2d58b378b
commit eca72d8e47

View File

@ -1894,7 +1894,7 @@ static int map_filename_trans_to_str(hashtab_key_t key, void *data, void *arg)
ebitmap_for_each_positive_bit(&datum->stypes, node, bit) {
src = pdb->p_type_val_to_name[bit];
rc = strs_create_and_add(strs,
"(typetransition %s %s %s %s %s)",
"(typetransition %s %s %s \"%s\" %s)",
5, src, tgt, class, filename, new);
if (rc)
return rc;