All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpolicy: mention class name on invalid permission
@ 2022-04-26 10:59 Christian Göttsche
  2022-05-04 16:55 ` Petr Lautrbach
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Göttsche @ 2022-04-26 10:59 UTC (permalink / raw)
  To: selinux; +Cc: Christian Göttsche

When a permission for a constraint statement cannot be found also
mention the related class name.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 checkpolicy/policy_define.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index 16b78346..a4c24115 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -3627,7 +3627,7 @@ int define_constraint(constraint_expr_t * expr)
 				}
 				if (!perdatum) {
 					yyerror2("permission %s is not"
-						 " defined", id);
+						 " defined for class %s", id, policydbp->p_class_val_to_name[i]);
 					free(id);
 					ebitmap_destroy(&classmap);
 					return -1;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-04 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26 10:59 [PATCH] checkpolicy: mention class name on invalid permission Christian Göttsche
2022-05-04 16:55 ` Petr Lautrbach
2022-05-04 17:07   ` Petr Lautrbach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.