policygen: respect CIL option when generating comments
Make explanatory comments follow the common style of comments (Classic language / CIL) Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
b6910aa68a
commit
e79a14c77b
|
@ -179,7 +179,9 @@ class PolicyGenerator:
|
||||||
rule.rule_type = rule.DONTAUDIT
|
rule.rule_type = rule.DONTAUDIT
|
||||||
rule.comment = ""
|
rule.comment = ""
|
||||||
if self.explain:
|
if self.explain:
|
||||||
rule.comment = str(refpolicy.Comment(explain_access(av, verbosity=self.explain)))
|
comment = refpolicy.Comment(explain_access(av, verbosity=self.explain))
|
||||||
|
comment.set_gen_cil(self.gen_cil)
|
||||||
|
rule.comment = str(comment)
|
||||||
|
|
||||||
if av.type == audit2why.ALLOW:
|
if av.type == audit2why.ALLOW:
|
||||||
rule.comment += "\n%s!!!! This avc is allowed in the current policy" % self.comment_start
|
rule.comment += "\n%s!!!! This avc is allowed in the current policy" % self.comment_start
|
||||||
|
|
Loading…
Reference in New Issue