34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From eca72d8e47ac8b962f87c46aa77fb893aa0df0f8 Mon Sep 17 00:00:00 2001
|
|
From: Juraj Marcin <juraj@jurajmarcin.com>
|
|
Date: Thu, 25 Aug 2022 15:27:18 +0200
|
|
Subject: [PATCH] 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>
|
|
---
|
|
libsepol/src/kernel_to_cil.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/libsepol/src/kernel_to_cil.c b/libsepol/src/kernel_to_cil.c
|
|
index 5a1336a330..ad4121d50a 100644
|
|
--- a/libsepol/src/kernel_to_cil.c
|
|
+++ b/libsepol/src/kernel_to_cil.c
|
|
@@ -1854,7 +1854,7 @@ static int map_filename_trans_to_str(hashtab_key_t key, void *data, void *arg)
|
|
filename = ft->name;
|
|
new = pdb->p_type_val_to_name[datum->otype - 1];
|
|
|
|
- return strs_create_and_add(strs, "(typetransition %s %s %s %s %s)", 5,
|
|
+ return strs_create_and_add(strs, "(typetransition %s %s %s \"%s\" %s)", 5,
|
|
src, tgt, class, filename, new);
|
|
}
|
|
|
|
--
|
|
2.27.0
|
|
|