checkpolicy: Improve error message for type bounds

Make the error message consistent with other occurrences of the
same issue:
https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L243
https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L488

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Vit Mojzis 2022-11-24 17:31:52 +01:00 committed by James Carter
parent 2c3b818f5d
commit 1d33c911f5

View File

@ -1416,7 +1416,7 @@ static int define_typebounds_helper(char *bounds_id, char *type_id)
if (!type->bounds)
type->bounds = bounds->s.value;
else if (type->bounds != bounds->s.value) {
yyerror2("type %s has inconsistent master {%s,%s}",
yyerror2("type %s has inconsistent bounds %s/%s",
type_id,
policydbp->p_type_val_to_name[type->bounds - 1],
policydbp->p_type_val_to_name[bounds->s.value - 1]);